赞
踩
towhee+elasticsearch实现本地以图搜图
github地址:https://github.com/xjhqre/towhee-img-search
elasticsearch版本为 7.4.2
elasticsearch安装方法参考我的这篇文章:全文检索-ElasticSearch
一、使用 OSS 存储图片,将图片库上传到 OSS。
二、创建 elasticsearch 索引。
PUT imgsearch
{ "mappings": { "properties": { "feature": { "type": "dense_vector", "dims": 1024 }, "url": { "type": "keyword" }, "name": { "type": "keyword" } } } }
三、修改 config.py 中的配置。
四、运行 extractFeatures.py,提取图片特征向量并存储到elasticsearch。
五、运行 searchServer.py,启动 web 服务。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。