An Image Reverse Engine based on VGG16
This is a project for the course "Application of artificial intelligence and deep learning" in the National Kaohsiung University of Science and Technology. The goal of this project is to build an image reverse engine based on VGG16.
pip install -r requirements.txt
The main.ipynb is the main file of this project. You can run it on Jupyter Notebook or Google Colab. It contains the following parts:
- Load data
- Load VGG16 model
- Indexing images
- Save features and indexes
- Load features and indexes
- Search images
- Show results
The dataset we used is from Stanford University CS231n. You can download it and put it in the same directory as the main.ipynb.
The query.ipynb is a file for you to query images. You can run it on Jupyter Notebook or Google Colab. It contains the following parts:
- Search images without any modification
- Search images with Gaussian Noise
- Search images with clustering (K-Means) and Gaussian Noise
This file also explains the process of searching images in detail.
The indexing.py is a file for you to index images. It is separated from the index part in main.ipynb.
The model.py is a file for you to load VGG16 model. You can use it to load VGG16 model in other files.
from model import VGGNet
model = VGGNet()
and then you can use the model to extract features.
features = model.extract_feature(image)
The web_app.py is a file for you to run a web application built by Gradio. You can run it on your local machine.
python web_app.py
Tiny Imagenet 200 from Stanford University CS231n
how does the dot product determine similarity?