Content-Based Image Retrieval (CBIR) Applications of Information Retrieval with Fruit Images.
This is a web-based search engine program of Information Retrieval or Content-Based Image Retrieval (CBIR) application to search the most similar fruit images based on an uploaded image.
The result will also show the Euclidean distance between the uploaded image (query) and the resulting images.
This program is created with Flask using Python programming language.
Files informations:
- app.py: flask server
- feature_extractor.py: a Feature Extractor module to extract image features using VGG16 architecture, either training images or query image
- feature_extraction.py: run this file to extract features of new training images. Copy and paste your new training images into "static/img" folder, run feature_extraction.py, and the features will be saved in "static/feature" folder
Web App Fruit Images Search Engine: http://xxx.xxx
- HTML
- CSS
- Javascript
- Python
- Numpy
- Tensorflow
- Pillow
- Flask
- Clone this repo
git clone https://github.com/LinggarM/Fruit-Images-Search-Engine
- Open the repo folder you have cloned in your PC
- Create a virtual environment
python -m venv myenv
- Activate the virtual environment
myenv/Scripts/activate or "myenv/Scripts/activate" (Windows) myenv/bin/activate (Linux)
- Install the requirements/ dependencies
pip install -r requirements.txt
- Put all of the fruit image datasets that you want to add in the "static/img" folder
- Open CMD in Repository Folder
- Do the feature extraction to the image datasets by executing this command :
python feature_extraction.py
- The features of new image datasets would be saved on "static/feature" folder
- Run the web app by executing this command :
or :
python app.py
run Flask
- Open the given URL
http://127.0.0.1:5000/
- Upload any fruit image files as the query image, but make sure the fruit exists in the database in order to get a good result. You can use images in "Testing Images" folder
This project is licensed under the MIT License - see the LICENSE file for details
- Colorlib for HTML templates
- https://github.com/matsui528/sis as the source code for this project