Skip to content

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.

License

Notifications You must be signed in to change notification settings

MexsonFernandes/Img2VecCosSim-Django-Pytorch

Repository files navigation

Img2VecCosSim-Django-Pytorch

HitCount

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.

Buy Me a Coffee at ko-fi.com

Packages:

  • Pytorch
  • Django 2.0

Credits:

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 or pip install -r requirements.txt

  • Start django server

    python manage.py runserver

Showcase:

Dashboard Dashboard


Example Comparison Example Comparison

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published