-
Generate image embedding using a pre-trained network (trained on ImageNet) such as VGG19, VGG16, ResNet50, Inception etc. by removing its last few layers, and performing inference on our images vectors for the generation of flattened embedding.
-
No training is needed throughout this entire processing, only the loading of the pre-trained weights.
-
This approach takes single test image/multiple test images and find top-N similar images from the database using K-Nearest Neighbours with various similarity metrics.
-
This approach applies KMeans, Spectral clustering on the dataset and cluster them into N clusters.
-
This approach has been tested on 400 images from dataset. Works better for large datasets also.
- Example 1(a): Pre-trained model: VGG16, KNN Metric: Cosine
- Example 1(b): Pre-trained model: VGG16, KNN Metric: Euclidean
- Example 2(a): Pre-trained model: VGG19, KNN Metric: Cosine
- Example 2(b): Pre-trained model: VGG19, KNN Metric: Euclidean
For 31 samples, clustering results
- Cluster_1 has 18 samples
- Cluster_2 has 6 samples
- Cluster_3 has 4 samples
- Cluster_4 has 3 samples
- Tensorflow, skimage, sklearn, multiprocessing, numpy, matplotlib