Deep Image Search - AI-Based Image Search Engine

Overview

Deep Image Search - AI-Based Image Search Engine

Brain+Machine

Deep Image Search is an AI-based image search engine that includes deep transfer learning features Extraction and tree-based vectorized search technique.

Generic badge Generic badge Generic badge Generic badge Generic badge Downloads

Brain+Machine Creators

Nilesh Verma

Features

  • Faster Search O(logN) Complexity.
  • High Accurate Output Result.
  • Best for Implementing on python based web application or APIs.
  • Best implementation for College students and freshers for project creation.
  • Applications are Images based E-commerce recommendation, Social media and other image-based platforms that want to implement image recommendation and search.

Installation

This library is compatible with both windows and Linux system you can just use PIP command to install this library on your system:

pip install DeepImageSearch

If you are facing any VS C++ 14 related issue in windows during installation, kindly refer to following solution: Pip error: Microsoft Visual C++ 14.0 is required

How To Use?

We have provided the Demo folder under the GitHub repository, you can find the example in both .py and .ipynb file. Following are the ideal flow of the code:

1. Importing the Important Classes

There are three important classes you need to load LoadData - for data loading, Index - for indexing the images to database/folder, SearchImage - For searching and Plotting the images

# Importing the proper classes
from DeepImageSearch import Index,LoadData,SearchImage

2. Loading the Images Data

For loading the images data we need to use the LoadData object, from there we can import images from the CSV file and Single/Multiple Folders.

# load the Images from the Folder (You can also import data from multiple folders in python list type)
image_list = LoadData().from_folder(['images','wiki-images'])
# Load data from CSV file
image_list = LoadData().from_csv(csv_file_path='your_csv_file.csv',images_column_name='column_name)

3. Indexing and Saving The File in Local Folder

For faster retrieval we are using tree-based indexing techniques for Images features, So for that, we need to store meta-information on the local path [meta-data-files/] folder.

# For Faster Serching we need to index Data first, After Indexing all the meta data stored on the local path
Index(image_list).Start()

3. Searching

Searching operation is performed by the following method:

# for searching, you need to give the image path and the number of the similar image you want
SearchImage().get_similar_images(image_path=image_list[0],number_of_images=5)

you can also plot some similar images for viewing purpose by following the code method:

# If you want to plot similar images you can use this method, It will plot 16 most similar images from the data index
SearchImage().plot_similar_images(image_path = image_list[0])

Complete Code

# Importing the proper classes
from DeepImageSearch import Index,LoadData,SearchImage
# load the Images from the Folder (You can also import data from multiple folder in python list type)
image_list = LoadData().from_folder(['images','wiki-images'])
# For Faster Serching we need to index Data first, After Indexing all the meta data stored on the local path
Index(image_list).Start()
# for searching you need to give the image path and the number of similar image you want
SearchImage().get_similar_images(image_path=image_list[0],number_of_images=5)
# If you want to plot similar images the you can use this method, It will plot 16 most similar images from the data index
SearchImage().plot_similar_images(image_path = image_list[0])

License

MIT License

Copyright (c) 2021 Nilesh Verma

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Please do STAR the repository, if it helped you in anyway.

More cool features will be added in future. Feel free to give suggestions, report bugs and contribute.

You might also like...
An image inline search telegram bot.

Image-Search-Bot An image inline search telegram bot. Note: Use Telegram picture bot. That is better. Not recommending to deploy this bot. Made with P

Modular search for Django

Haystack Author: Daniel Lindsley Date: 2013/07/28 Haystack provides modular search for Django. It features a unified, familiar API that allows you to

Full text search for flask.

flask-msearch Installation To install flask-msearch: pip install flask-msearch # when MSEARCH_BACKEND = "whoosh" pip install whoosh blinker # when MSE

document organizer with tags and full-text-search, in a simple and clean sqlite3 schema
document organizer with tags and full-text-search, in a simple and clean sqlite3 schema

document organizer with tags and full-text-search, in a simple and clean sqlite3 schema

A web search server for ParlAI, including Blenderbot2.
A web search server for ParlAI, including Blenderbot2.

Description A web search server for ParlAI, including Blenderbot2. Querying the server: The server reacting correctly: Uses html2text to strip the mar

This project is a sample demo of Arxiv search related to AI/ML Papers built using Streamlit, sentence-transformers and Faiss.
This project is a sample demo of Arxiv search related to AI/ML Papers built using Streamlit, sentence-transformers and Faiss.

This project is a sample demo of Arxiv search related to AI/ML Papers built using Streamlit, sentence-transformers and Faiss.

Google Project: Search and auto-complete sentences within given input text files, manipulating data with complex data-structures.
Google Project: Search and auto-complete sentences within given input text files, manipulating data with complex data-structures.

Auto-Complete Google Project In this project there is an implementation for one feature of Google's search engines - AutoComplete. Autocomplete, or wo

Full-text multi-table search application for Django. Easy to install and use, with good performance.

django-watson django-watson is a fast multi-model full-text search plugin for Django. It is easy to install and use, and provides high quality search

 rclip - AI-Powered Command-Line Photo Search Tool
rclip - AI-Powered Command-Line Photo Search Tool

rclip is a command-line photo search tool based on the awesome OpenAI's CLIP neural network.

Comments
  • Similar images

    Similar images

    The function to plot similar images plot 16 images, how do we know which image is related to or similar to the which image according to the algorithm?

    I mean like it should say these two are similar and the other two are similar to each other, no?

    opened by amrrs 3
  • TypeError: show() takes 1 positional argument but 2 were given

    TypeError: show() takes 1 positional argument but 2 were given

    Classification.py:

    from DeepImageSearch import Index, LoadData, SearchImage

    folders = [] folders.append("monos_segmented") image_list = LoadData().from_folder(folders)

    print (image_list)

    Index(image_list).Start()

    SearchImage().get_similar_images(image_path=image_list[0],number_of_images=5)

    SearchImage().plot_similar_images(image_path = image_list[0])

    Running...

    Traceback (most recent call last): File "Classification.py", line 13, in SearchImage().plot_similar_images(image_path = image_list[0]) File "/home/mike/.local/lib/python3.8/site-packages/DeepImageSearch/DeepImageSearch.py", line 132, in plot_similar_images plt.show(fig) File "/home/mike/.local/lib/python3.8/site-packages/matplotlib/pyplot.py", line 378, in show return _backend_mod.show(*args, **kwargs) TypeError: show() takes 1 positional argument but 2 were given

    opened by mikedorin 1
  • Single thread.

    Single thread.

    Hello,

    What i want to ask is, cant we make extracting features parallel? I'm using 3060 Ti and it seems a little bit slow for this GPU.

    Or am i wrong?

    1/1 [==============================] - 0s 14ms/step
    1/1 [==============================] - 0s 14ms/step                                                                                                                    | 3070/242451 [02:25<3:08:09, 21.20it/s]
    1/1 [==============================] - 0s 14ms/step
    1/1 [==============================] - 0s 14ms/step
    1/1 [==============================] - 0s 13ms/step                                                                                                                    | 3073/242451 [02:25<3:07:27, 21.28it/s]
    1/1 [==============================] - 0s 15ms/step
    1/1 [==============================] - 0s 13ms/step
    1/1 [==============================] - 0s 14ms/step                                                                                                                    | 3076/242451 [02:25<3:07:21, 21.29it/s]
    1/1 [==============================] - 0s 14ms/step
    1/1 [==============================] - 0s 13ms/step
    1/1 [==============================] - 0s 14ms/step                                                                                                                    | 3079/242451 [02:25<3:06:30, 21.39it/s]
    1/1 [==============================] - 0s 14ms/step
    1/1 [==============================] - 0s 14ms/step
    1/1 [==============================] - 0s 14ms/step                                                                                                                    | 3082/242451 [02:26<3:07:04, 21.33it/s]
    1/1 [==============================] - 0s 14ms/step
    1/1 [==============================] - 0s 13ms/step
    1/1 [==============================] - 0s 14ms/step                                                                                                                    | 3085/242451 [02:26<3:08:38, 21.15it/s]
    1/1 [==============================] - 0s 14ms/step
    1/1 [==============================] - 0s 14ms/step
    1/1 [==============================] - 0s 14ms/step                                                                                                                    | 3088/242451 [02:26<3:09:21, 21.07it/s]
    1/1 [==============================] - 0s 14ms/step
    1/1 [==============================] - 0s 14ms/step
    1/1 [==============================] - 0s 15ms/step                                                                                                                    | 3091/242451 [02:26<3:09:04, 21.10it/s]
    1/1 [==============================] - 0s 13ms/step
    1/1 [==============================] - 0s 14ms/step
    1/1 [==============================] - 0s 13ms/step                                                                                                                    | 3094/242451 [02:26<3:11:12, 20.86it/s]
    1/1 [==============================] - 0s 13ms/step
    1/1 [==============================] - 0s 14ms/step
    

    Best regards.

    opened by ucyildirim 0
  • Problems with TensorFlow

    Problems with TensorFlow

    Hello,

    when trying to install DeepImageSearch on a Windows machine I got this:

    ERROR: Cannot install deepimagesearch==1.0, deepimagesearch==1.1, deepimagesearch==1.2, deepimagesearch==1.3 and deepimagesearch==1.4 because these package versions have conflicting dependencies.
    
    The conflict is caused by:
        deepimagesearch 1.4 depends on tensorflow
        deepimagesearch 1.3 depends on tensorflow
        deepimagesearch 1.2 depends on tensorflow
        deepimagesearch 1.1 depends on tensorflow
        deepimagesearch 1.0 depends on tensorflow`
    

    I tried to install it like stated here: https://stackoverflow.com/questions/69751318/i-had-trouble-installing-python-deepimagesearch-library but also same error as mentioned there by using this.

    ERROR: Could not find a version that satisfies the requirement tensorflow==2.3.2 (from versions: none)
    ERROR: No matching distribution found for tensorflow==2.3.
    

    Digging into TensorFlow itself, it seems that it is not running on windows properly anymore beginning from version 2.11 - that would not matter, if the version required by your library would still be available

    Using Windows 10 with Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)] on win32

    Installing https://pypi.org/project/tensorflow-intel/ and changing requirements in your library did not help either.

    So, what else I can do ?

    Thanks in advance for any help !

    opened by Creat1veM1nd 6
Owner
Data Science Enthusiast & Digital Influencer
ElasticSearch ODM (Object Document Mapper) for Python - pip install esengine

esengine - The Elasticsearch Object Document Mapper esengine is an ODM (Object Document Mapper) it maps Python classes in to Elasticsearch index/doc_t

SEEK International AI 109 Nov 22, 2022
a Telegram bot writen in Python for searching files in Drive. Based on SearchX-bot

Drive Search Bot This is a Telegram bot writen in Python for searching files in Drive. Based on SearchX-bot How to deploy? Clone this repo: git clone

Hafitz Setya 25 Dec 09, 2022
A real-time tech course finder, created using Elasticsearch, Python, React+Redux, Docker, and Kubernetes.

A real-time tech course finder, created using Elasticsearch, Python, React+Redux, Docker, and Kubernetes.

Dinesh Sonachalam 130 Dec 20, 2022
txtai executes machine-learning workflows to transform data and build AI-powered semantic search applications.

txtai executes machine-learning workflows to transform data and build AI-powered semantic search applications.

NeuML 3.1k Dec 31, 2022
A search engine to query social media insights with political theme

social-insights Social insights is an open source big data project that generates insights about various interesting topics happening every day. Curre

UMass GDSC 10 Feb 28, 2022
A simple tool for searching images inside a local folder with text/image input using CLIP

clip-search (WIP) A simple tool for searching images inside a local folder with text/image input using CLIP 10 results for "a blonde woman" in a folde

5 Dec 25, 2022
Yuno is context based search engine for anime.

Yuno yuno.mp4 Table of Contents Introduction Power Of Yuno Try Yuno How Yuno was created? References Introduction Yuno is a context based search engin

IAmParadox 354 Dec 19, 2022
rclip - AI-Powered Command-Line Photo Search Tool

rclip is a command-line photo search tool based on the awesome OpenAI's CLIP neural network.

Yurij Mikhalevich 394 Dec 12, 2022
A sphinx extension for designing beautiful, screen-size responsive web components.

sphinx-design A sphinx extension for designing beautiful, view size responsive web components. Created with inspiration from Bootstrap (v5), Material

Executable Books 109 Jan 01, 2023
This project is a sample demo of Arxiv search related to AI/ML Papers built using Streamlit, sentence-transformers and Faiss.

This project is a sample demo of Arxiv search related to AI/ML Papers built using Streamlit, sentence-transformers and Faiss.

Karn Deb 49 Oct 30, 2022
Home for Elasticsearch examples available to everyone. It's a great way to get started.

Introduction This is a collection of examples to help you get familiar with the Elastic Stack. Each example folder includes a README with detailed ins

elastic 2.5k Jan 03, 2023
Pysolr — Python Solr client

pysolr pysolr is a lightweight Python client for Apache Solr. It provides an interface that queries the server and returns results based on the query.

Haystack Search 626 Dec 01, 2022
High level Python client for Elasticsearch

Elasticsearch DSL Elasticsearch DSL is a high-level library whose aim is to help with writing and running queries against Elasticsearch. It is built o

elastic 3.6k Dec 30, 2022
Python script for finding duplicate images within a folder.

Python script for finding duplicate images within a folder.

194 Dec 31, 2022
solrpy is a Python client for Solr

solrpy solrpy is a Python client for Solr, an enterprise search server built on top of Lucene. solrpy allows you to add documents to a Solr instance,

Jiho Persy Lee 37 Jul 22, 2021
Modular search for Django

Haystack Author: Daniel Lindsley Date: 2013/07/28 Haystack provides modular search for Django. It features a unified, familiar API that allows you to

Haystack Search 3.4k Jan 04, 2023
Super Simple Similarities Service

Super Simple Similarities Service

vincent d warmerdam 95 Dec 25, 2022
A fast, efficiency python package for searching and getting search results with many different search engines

search A fast, efficiency python package for searching and getting search results with many different search engines. Installation To install the pack

Neurs 0 Oct 06, 2022
cve-search - a tool to perform local searches for known vulnerabilities

cve-search cve-search is a tool to import CVE (Common Vulnerabilities and Exposures) and CPE (Common Platform Enumeration) into a MongoDB to facilitat

cve-search 2k Jan 01, 2023
Senginta is All in one Search Engine Scrapper for used by API or Python Module. It's Free!

Senginta is All in one Search Engine Scrapper. With traditional scrapping, Senginta can be powerful to get result from any Search Engine, and convert to Json. Now support only for Google Product Sear

33 Nov 21, 2022