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
esguard provides a Python decorator that waits for processing while monitoring the load of Elasticsearch.

esguard esguard provides a Python decorator that waits for processing while monitoring the load of Elasticsearch. Quick Start You need to launch elast

po3rin 5 Dec 08, 2021
An open source, non-profit search engine implemented in python

Mwmbl: No ads, no tracking, no cruft, no profit Mwmbl is a non-profit, ad-free, free-libre and free-lunch search engine with a focus on useability and

639 Jan 04, 2023
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

honmaple 197 Dec 29, 2022
Image search service based on imgsmlr extension of PostgreSQL. Support image search by image.

imgsmlr-server Image search service based on imgsmlr extension of PostgreSQL. Support image search by image. This is a sample application of imgsmlr.

jie 45 Dec 12, 2022
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

Hadassah Engel 10 Jun 20, 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
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

Manos Pitsidianakis 152 Oct 29, 2022
Search emails from a domain through search engines

EmailFinder - search emails through Search Engines

Josué Encinar 155 Dec 30, 2022
GitScanner is a script to make it easy to search for Exposed Git through an advanced Google search.

GitScanner Legal disclaimer Usage of GitScanner for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to

Kaio Gomes 3 Oct 28, 2022
Jina allows you to build deep learning-powered search-as-a-service in just minutes

Cloud-native neural search framework for any kind of data

Jina AI 17k Dec 31, 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
A library for fast import of Windows NT Registry(REGF) into Elasticsearch.

A library for fast import of Windows NT Registry(REGF) into Elasticsearch.

S.Nakano 3 Apr 01, 2022
Reverse-ikea-image-search - A simple image of ikea search using jina.ai

IKEA Reverse Image Search This is a demo project to fetch ikea product images(IK

SOUVIK GHOSH 4 Mar 08, 2022
Google Drive file searcher

Google Drive file searcher

Hafitz Setya 25 Dec 09, 2022
Free and Open, Distributed, RESTful Search Engine

Elasticsearch Elasticsearch is the distributed, RESTful search and analytics engine at the heart of the Elastic Stack. You can use Elasticsearch to st

elastic 62.4k Jan 08, 2023
A play store search application programming interface ( API )

Play-Store-API A play store search application programming interface ( API ) Made with Python3

Fayas Noushad 8 Oct 21, 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
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
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
Super Simple Similarities Service

Super Simple Similarities Service

vincent d warmerdam 95 Dec 25, 2022