代码拉取完成,页面将自动刷新
以图搜图
1.这里是列表文本集成服务 将图片保存到本地,并将图片push到使用zimg搭建的图床容器服务中,zimg返回一个图片url.
2. 这里是列表文本将图片插入到vearch_plugin中,插入支持本地图片和url图片。本地图片需要指定图片在vearch_plugin中的位置。因此1中集成服务保存本地的位置为vearch_plugin卷映射的位置。
3. 这里是列表文本verach_plugin 使用服务内部自带的特征向量,计算图片的特征,并将特征向量值和标量(建space时如果有)插入到verach数据库。
PUT http://127.0.0.1:4102/space/zhijie_tuku/_create
{
"name": "zhijie_image",
"partition_num": 1,
"replica_num": 1,
"engine": {
"index_size": 1,
"retrieval_type": "IVFPQ",
"retrieval_param": {
"metric_type": "InnerProduct",
"ncentroids": -1,
"nsubvector": -1
}
},
"properties": {
"url": {
"type": "keyword",
"index": true
},
"name": {
"type": "string",
"index": true
},
"feature1": {
"type": "vector",
"dimension": 512,
"format": "normalization"
}
}
}
version: '3.3'
services:
vearch:
image: vearch/vearch:latest
ports:
- "8817:8817"
- "9001:9001"
volumes:
- /home/vearch/config_plugin.toml:/vearch/config.toml
- /home/vearch/data:/datas
- /home/vearch/logs:/logs
logging:
driver: "json-file"
options:
max-size: "1g"
vearch-plugin:
image: haojunyu/vimgs:3.2.2
ports:
- "4102:4101"
volumes:
- /home/vearch/python-algorithm-plugin/src/config.py:/app/src/config.py
- /home/vearch/images/imgs:/app/src/imgs
command: ["bash", "../bin/run.sh", "image"]
zhijie_zimg:
image: iknow0612/zimg:latest
ports:
- "4869:4869"
volumes:
- /home/vearch/img_data:/zimg/bin/img
command: ["bash", "app.sh"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。