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

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

Generic badge Generic badge Generic badge Generic badge Generic badgeGeneric badge

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.

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

You might also like...
A hobby project which includes a hand-gesture based virtual piano using a mobile phone camera and OpenCV library functions
A hobby project which includes a hand-gesture based virtual piano using a mobile phone camera and OpenCV library functions

Overview This is a hobby project which includes a hand-gesture controlled virtual piano using an android phone camera and some OpenCV library. My moti

Softlearning is a reinforcement learning framework for training maximum entropy policies in continuous domains. Includes the official implementation of the Soft Actor-Critic algorithm.

Softlearning Softlearning is a deep reinforcement learning toolbox for training maximum entropy policies in continuous domains. The implementation is

A fast, dataset-agnostic, deep visual search engine for digital art history

imgs.ai imgs.ai is a fast, dataset-agnostic, deep visual search engine for digital art history based on neural network embeddings. It utilizes modern

This is a simple backtesting framework to help you test your crypto currency trading. It includes a way to download and store historical crypto data and to execute a trading strategy.

You can use this simple crypto backtesting script to ensure your trading strategy is successful Minimal setup required and works well with static TP a

The Hailo Model Zoo includes pre-trained models and a full building and evaluation environment
The Hailo Model Zoo includes pre-trained models and a full building and evaluation environment

Hailo Model Zoo The Hailo Model Zoo provides pre-trained models for high-performance deep learning applications. Using the Hailo Model Zoo you can mea

Code for "Learning Structural Edits via Incremental Tree Transformations" (ICLR'21)

Learning Structural Edits via Incremental Tree Transformations Code for "Learning Structural Edits via Incremental Tree Transformations" (ICLR'21) 1.

Code for Graph-to-Tree Learning for Solving Math Word Problems (ACL 2020)

Graph-to-Tree Learning for Solving Math Word Problems PyTorch implementation of Graph based Math Word Problem solver described in our ACL 2020 paper G

Home repository for the Regularized Greedy Forest (RGF) library. It includes original implementation from the paper and multithreaded one written in C++, along with various language-specific wrappers.

Regularized Greedy Forest Regularized Greedy Forest (RGF) is a tree ensemble machine learning method described in this paper. RGF can deliver better r

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
null
Implementation of fast algorithms for Maximum Spanning Tree (MST) parsing that includes fast ArcMax+Reweighting+Tarjan algorithm for single-root dependency parsing.

Fast MST Algorithm Implementation of fast algorithms for (Maximum Spanning Tree) MST parsing that includes fast ArcMax+Reweighting+Tarjan algorithm fo

Miloš Stanojević 11 Oct 14, 2022
Deep Text Search is an AI-powered multilingual text search and recommendation engine with state-of-the-art transformer-based multilingual text embedding (50+ languages).

Deep Text Search - AI Based Text Search & Recommendation System Deep Text Search is an AI-powered multilingual text search and recommendation engine w

null 19 Sep 29, 2022
A python library for face detection and features extraction based on mediapipe library

FaceAnalyzer A python library for face detection and features extraction based on mediapipe library Introduction FaceAnalyzer is a library based on me

Saifeddine ALOUI 14 Dec 30, 2022
improvement of CLIP features over the traditional resnet features on the visual question answering, image captioning, navigation and visual entailment tasks.

CLIP-ViL In our paper "How Much Can CLIP Benefit Vision-and-Language Tasks?", we show the improvement of CLIP features over the traditional resnet fea

null 310 Dec 28, 2022
[ACL 20] Probing Linguistic Features of Sentence-level Representations in Neural Relation Extraction

REval Table of Contents Introduction Overview Requirements Installation Probing Usage Citation License ?? Introduction REval is a simple framework for

null 13 Jan 6, 2023
This repo contains the code and data used in the paper "Wizard of Search Engine: Access to Information Through Conversations with Search Engines"

Wizard of Search Engine: Access to Information Through Conversations with Search Engines by Pengjie Ren, Zhongkun Liu, Xiaomeng Song, Hongtao Tian, Zh

null 19 Oct 27, 2022
Static Features Classifier - A static features classifier for Point-Could clusters using an Attention-RNN model

Static Features Classifier This is a static features classifier for Point-Could

ABDALKARIM MOHTASIB 1 Jan 25, 2022
NAS Benchmark in "Prioritized Architecture Sampling with Monto-Carlo Tree Search", CVPR2021

NAS-Bench-Macro This repository includes the benchmark and code for NAS-Bench-Macro in paper "Prioritized Architecture Sampling with Monto-Carlo Tree

null 35 Jan 3, 2023
This is the paddle code for SeBoW(Self-Born wiring for neural trees), a kind of neural tree born form a large search space

SeBoW: Self-Born Wiring for neural trees(PaddlePaddle version) This is the paddle code for SeBoW(Self-Born wiring for neural trees), a kind of neural

HollyLee 13 Dec 8, 2022
A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.

Light Gradient Boosting Machine LightGBM is a gradient boosting framework that uses tree based learning algorithms. It is designed to be distributed a

Microsoft 14.5k Jan 8, 2023