KyanChen / RSPrompter

This is the pytorch implement of our paper "RSPrompter: Learning to Prompt for Remote Sensing Instance Segmentation based on Visual Foundation Model"
https://kychen.me/RSPrompter
Apache License 2.0
520 stars 36 forks source link

无法使用huggingface down下来的bin模型做预测 #108

Open Lily-gittee opened 2 months ago

Lily-gittee commented 2 months ago

当我参考readme.md文件中的指示使用命令python demo/image_demo.py .//images//xixi_33.tif configs/rsprompter/samseg-maskrcnn-whu.py --weights ./checkpoint\sam-vit-base/pytorch_model.bin --out-dir ./output 控制台报错:OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like huggingface/sam_vit_base is not the path to a directory containing a file named config.json. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'. 应该是找不到权重文件所在位置,于是自动连接huggingface下载,但我无法科学上网,所以总失败。请问有什么办法可以解决?或者我的预测命令是否正确? 谢谢各位!!!

Lily-gittee commented 2 months ago

已解决,因为下载的文件是-横杠,而代码中是_下划杠,所以找不到,闹了个乌龙

Berlin000000 commented 2 months ago

请问你的checkpoints是在哪里下载的呀 configs/rsprompter/下所有的模型都可以使用这个吗

cj534-art commented 2 months ago

运行出现这个错误要如何纠正Incorrect path_or_model_id: 'work_dirs/sam_cache/sam_vit_base'. Please provide either the path to a local folder or the repo_id of a model on the Hub.

cj534-art commented 2 months ago

请问你的checkpoints是在哪里下载的呀 configs/rsprompter/下所有的模型都可以使用这个吗

在下面几个常见问题里面有please use the [download script]这句话

Lily-gittee commented 2 months ago

看一下文件路径,再看一下是否因下划线引起的

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年8月17日(星期六) 晚上7:29 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [KyanChen/RSPrompter] 无法使用huggingface down下来的bin模型做预测 (Issue #108)

运行出现这个错误要如何纠正Incorrect path_or_model_id: 'work_dirs/sam_cache/sam_vit_base'. Please provide either the path to a local folder or the repo_id of a model on the Hub.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Lily-gittee commented 2 months ago

我在huggingface的中文镜像网站下载的,不然就要科学上网。

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年8月17日(星期六) 晚上7:31 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [KyanChen/RSPrompter] 无法使用huggingface down下来的bin模型做预测 (Issue #108)

请问你的checkpoints是在哪里下载的呀 configs/rsprompter/下所有的模型都可以使用这个吗

在下面几个常见问题里面有please use the [download script]这句话

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

cj534-art commented 1 month ago

您好可以问一下得到结果中vis文件中的图片为什么和原图一样(并没有颜色)(似乎没有完成实例分割)

ucasyjz commented 1 week ago

同样得到结果中vis文件中的图片和原图一样,并没有颜色,没有完成实例分割

ucasyjz commented 1 week ago

已解决,因为下载的文件是-横杠,而代码中是_下划杠,所以找不到,闹了个乌龙

有遇到出不来结果的情况吗,感谢