相似图像搜索(氛围)
Image retrieval system for my self-hosted photo gallery engine.
图像检索系统,用于我的自托管照片图库引擎。
One day I decided to build a photo gallery. I realized pretty quickly that "dumb" photo gallery is not a very interesting project, so I began to think about how to make it "smarter". Search is a really cool idea, I began my research and fell into the rabbit hole of image retrieval.
有一天我决定构建一个照片画廊。我很快意识到「dumb」照片画廊不是一个非常有趣的项目,所以我开始思考如何让它「smarter」。搜索是一个非常酷的想法,我开始了我的研究并掉进了 image retrieval 的兔子洞。
I've created a set of microservices, which can be used for reverse image search/similar image search or tasks like tagging/image captioning. I tried to keep it simple, so people could understand how it works just by looking at the code and easily make any changes they want. Well, I looked at the code again, sometimes it's super confusing, I hope it's readable enough to modify it.
我创建了一组微服务,可用于反向图像搜索/相似图像搜索或标记/图像字幕等任务。我试图保持简单,以便人们只需查看代码就能理解其工作原理,并轻松进行任何他们想要的更改。 嗯,我再次查看了代码,有时它超级混乱,我希望它足够可读以便修改。
current microservices:
current microservices:
- phash_web
- phash_web
- color_web
- color_web
- local_features_web
- local_features_web
- global_features_web
- global_features_web
- image_text_features_web
- image_text_features_web
- image_caption_web
- image_caption_web
- places365_tagger_web
- places365_tagger_web
- text_web (not released yet)
- text_web (尚未发布)
In the text below, I will try to briefly explain how they work, show search examples, runnable examples (Google Colab), links for further reading, and various tips/tricks. If you want to read about the photo gallery, click here
在下面的文本中,我将尝试简要解释它们的工作原理,展示搜索示例、可运行示例 (Google Colab)、进一步阅读链接以及各种技巧/窍门。如果您想阅读关于照片画廊的内容,请点击 这里
Tip: All microservices use Pillow for image resizing, so you can use Pillow-SIMD as a drop-in replacement for Pillow.
提示:所有微服务都使用 Pillow 进行图像调整大小,因此您可以使用 Pillow-SIMD 作为 Pillow 的即插即用替换。
The results show that for resizing Pillow is always faster than ImageMagick, Pillow-SIMD, in turn, is even faster than the original Pillow by the factor of 4-6. >In general, Pillow-SIMD with AVX2 is always 16 to 40 times faster than ImageM...