Skip to main content

Deep Image Search 是一个基于 AI 的图像搜索引擎,包括深度转换学习特征提取和基于树的矢量化搜索。

项目描述

深度图像搜索 - 基于人工智能的图像搜索引擎

大脑+机器

Deep Image Search是一个基于 AI 的图像搜索引擎,包括深度迁移学习特征提取基于树的矢量化搜索技术。

通用徽章 通用徽章 通用徽章 通用徽章 通用徽章 下载

大脑+机器创作者

尼莱什·维尔玛

特征

  • 更快的搜索O(logN)复杂度。
  • 高精度输出结果。
  • 最适合在基于 python 的 Web 应用程序或 API 上实现。
  • 大学生和新生项目创建的最佳实施。
  • 应用是基于图像的电子商务推荐、社交媒体和其他想要实现图像推荐和搜索的基于图像的平台。

安装

该库与WindowsLinux 系统兼容,您只需使用PIP 命令在您的系统上安装此库:

pip install DeepImageSearch

如果您在安装过程中在 windows 中遇到任何与 VS C++ 14 相关的问题,请参考以下解决方案:Pip error: Microsoft Visual C++ 14.0 is required

如何使用?

我们在GitHub 存储库下提供了Demo文件夹,您可以在.py.ipynb 文件中找到示例。以下是代码的理想流程:

1. 导入重要类

您需要加载三个重要的类LoadData - 用于数据加载,Index - 用于将图像索引到数据库/文件夹,SearchImage - 用于搜索和绘制图像

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

2.加载图像数据

为了加载图像数据,我们需要使用LoadData对象,从那里我们可以从 CSV 文件和单个/多个文件夹中导入图像。

# 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. 索引并保存本地文件夹中的文件

为了更快地检索,我们对图像特征使用基于树的索引技术,因此,我们需要将元信息存储在本地路径[meta-data-files/]文件夹中。

# 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. 搜索

搜索操作通过以下方法进行:

# 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)

您还可以按照代码方法绘制一些类似的图像以供查看:

# 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])

完整代码

# 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])

执照

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.

如果它对您有所帮助,请对存储库进行 STAR 操作。

未来将添加更多酷炫的功能。随时提供建议、报告错误和贡献。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

DeepImageSearch-1.4.tar.gz (6.5 kB 图哈希)

已上传 source