可以在 Elasticsearch 中存储图像吗? [英] Possible to store images in Elasticsearch?

查看:74
本文介绍了可以在 Elasticsearch 中存储图像吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 Elasticsearch 集群中存储图像?如果是,那么是否有关于工作流程的资源?我检查了以下链接:https://github.com/kzwang/elasticsearch-imagep>

由于我们必须处理大型图像文件(超过 500GB),我们计划使用 HDFS.

解决方案

将整个图像存储在 Elasticsearch 中并没有什么好处,因为如果图像被缩放/裁剪然后用作查询,它​​会给出不正确的结果.您需要什么取决于您为什么要为这些图像编制索引.

在我的情况下,我需要查找经过一些缩放或裁剪后的图像是否在我的数据库中具有紧密匹配.我正在提取图像的本地描述符 (SIFT/SURF) 并使用它们来构建 Elasticsearch 索引.这将减少图像索引大小,因为不是存储整个图像,而是仅存储几个特征.我现在将所有这些图像存储在 S3 上,Elasticsearch 将存储这些图像的 id 以及从中提取的特征.

关于 elasticsearch-image:这个插件已经有一段时间没有更新了,最近对问题的回复来自去年.该插件将 LIRE 与 Elasticsearch 集成,其中 LIRE 提供了多图像指纹提取器的功能.p>

可能的解决方案:

  1. 集成 OpenCv 库(计算图像的特征向量)和 Elasticsearch 并使用这些图像特征构建您自己的索引,而不是存储整个图像.对于产品架构,您可以在这里获得一些提示.

  2. 使用旧版本的 Elasticsearch 和兼容版本的 elasticsearch-image.

  3. 升级 elasticsearch-image 以使用最新版本的 Elasticsearch.

  4. 您还可以将 SOLR 与 LireSolr 插件一起使用以与 LireSolr 库集成.

更新:- 这是图像检索任务的更新,您需要搜索接近的图像匹配.我建议您通过此链接 https://paperswithcode.com/task/image-retrieval.最好的解决方案 - Deep Local Features 已经集成在 tensorflow 中.

Is it possible to store images in Elasticsearch clusters? If yes, then is there a resource about the work flow? I checked the following link: https://github.com/kzwang/elasticsearch-image

Since we have to handle large image files (over 500GB), we are planning to use HDFS.

解决方案

Storing whole images in Elasticsearch will not be very beneficial, because if the image is scaled/cropped and then used as a query, it will give incorrect results. What you need depends on why you want to index these images.

In my case, I need to find if an image after some scaling or cropping, has a close match in my database. I am extracting local descriptors (SIFT/SURF) of images and using them to build an Elasticsearch index. This will reduce the image index size as instead of storing the whole image, only a few features are stored. I will be storing all these images on S3 for now and Elasticsearch will store ids for these images along with the features extracted from them.

Regarding elasticsearch-image: This plugin has not been updated in a while and the most recent responses to issues were from last year. This plugin integrates LIRE with Elasticsearch, where LIRE provides the functionality of a multiple image fingerprints extractor.

Possible solutions:

  1. Integrate the library OpenCv (to compute feature vectors for an image) and Elasticsearch and build your own index using these image features instead of storing a whole image. For the product architecture, you can get some hints here.

  2. Use an older version of Elasticsearch with a compatible version of elasticsearch-image.

  3. Upgrade elasticsearch-image to work with the latest version of Elasticsearch.

  4. You can also use SOLR along with LireSolr plugin to integrate with the LireSolr library.

UPDATE:- This is update on task of Image retrieval where you need to search for close image matches. I would recommend you to go through this link https://paperswithcode.com/task/image-retrieval. The best solution - Deep Local Features is already integrated in tensorflow.

这篇关于可以在 Elasticsearch 中存储图像吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆