Img2VecCosSim-Django-Pytorch
Img2VecCosSim-Django-Pytorch copied to clipboard
Extract a feature vector for any image and find the cosine similarity for comparison using Pytorch. I have used ResNet-18 to extract the feature vector of images. Finally a Django app is developed to...
Img2VecCosSim-Django-Pytorch
Extract a feature vector for any image and find the cosine similarity for comparison using Pytorch. I have used ResNet-18 to extract the feature vector of images. Finally a Django app is developed to input two images and to find the cosine similarity.
Packages:
- Pytorch
- Django 2.0
Credits:
- Inspired from Medium post by Christian Safka
How to start:
-
Clone repository
git clone https://github.com/MexsonFernandes/Img2VecCosSim-Django-Pytorch
-
Change directory
cd Img2VecCosSim-Django-Pytorch
-
Install virtual environment
pipenv install
-
Install all dependencies
pipenv install -r requirements.txt
orpip install -r requirements.txt
-
Start django server
python manage.py runserver
Showcase:
Dashboard
Example Comparison