AndsGo / reverse_image_search

以图搜图基于Towhee(resnet50 模型) + Milvus
40 stars 11 forks source link

milvus/img/add 错误 #1

Open Challotter opened 1 year ago

Challotter commented 1 year ago

{ "code": 10100, "message": "Image.__init__() missing 3 required positional arguments: 'height', 'channel', and 'mode'" }

AndsGo commented 1 year ago

你可以提供下请求参数吗,看着应该是上传的image用点问题

TankTim68 commented 1 year ago

{ "id": 3, "url": "https://k.sinaimg.cn/n/sinakd20230518s/688/w1080h408/20230518/4070-4475f485dcdb0ac410fa739177e34874.png/w700d1q75cms.jpg", "tags": "1", "brief": "2", "table": "test" } 也是报这个错误了。

{ "code": 10100, "message": "init() missing 3 required positional arguments: 'height', 'channel', and 'mode'" }

AndsGo commented 1 year ago

你这个报错应该是模型加载的问题,你可以先手动下载下然后再上传到指定文件夹。linux 默认下载到 /root/.cache/torch/hub/checkpoints ,windows 默认下载到 C:\Users\Administrator.cache\torch\hub\checkpoints

模型地址 : https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/resnet50_a1_0-14fe96d1.pth

golangboy commented 1 year ago

pip install towhee==0.8.0

huotianyu commented 2 months ago

我也是把towhee从0.6.0升级到pip install towhee==0.8.0后,可以上传图片成功