MexsonFernandes / 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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

License:GNU General Public License v3.0


Languages

Language:JavaScript 66.1%Language:CSS 27.0%Language:SCSS 6.5%Language:Python 0.5%