This is a simple image clustering algorithm which uses KMeans for clustering and performs 3 types of vectorization using vgg16, vgg19 and resnet50 using the weights from ImageNet
A folder named "output" will be created and the different clusters formed using the different algorithms will be present.
Change the following variables(present in the main() function) as per your convinience:
Python Modules used:
-Keras
-Theano (as backend for keras)
-os
-sys
-random
-cv2 (openCV)
-numpy
-sklearn (scikit-learn for KMeans and PCA)
-shutil
Pipeline:
step 1: Set the different parameters for the model. (The Variables mentioned above)
step 2: Initialize an object of the class "image_clustering" with the parameters set in the previous step.
step 3: Call the class's load_data() function.
step 4: Call the class's get_new_imagevector() function.
step 5: Call the clustering() function.