Retrieve top k similar images using Haar Cascade, MobileNetV2, KDTree.
- Dataset preparation:
- Using face-detection classifier model Haar Cascade for all images in the dataset.
- Apply pretrained model MobileNetV2 for extracting all images in the dataset into feature vectors.
- Save all feature vectors into dictionary and load into .pkl file.
- Load feature vectors into module.
- Build KDTree by these feature vectors for optimize indexing step.
- Retrieve image:
- Upload input image into the module.
- Apply face-detection classifier model Haar Cascade for input image.
- Apply pretrained model MobileNetV2 for extracting input image into feature vector.
- Retrieve top k similar images from KDTree.
- Display images.
- Haar Cascade
- MobileNet V2
- KDTree
- Flask
