Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用gpu cuda跑大一点的图片 #236

Open
alexhmyang opened this issue Jul 9, 2024 · 1 comment
Open

用gpu cuda跑大一点的图片 #236

alexhmyang opened this issue Jul 9, 2024 · 1 comment

Comments

@alexhmyang
Copy link

alexhmyang commented Jul 9, 2024

    everything_results = model(input_image, device="cuda:0", retina_masks=args.retina, imgsz=args.imgsz, conf=args.conf, iou=args.iou)
    print("model loaded " , everything_results)

用gpu cuda跑大一点的图片
everything_results 直接 None了,小图片不会有问题 , 大家有遇到这个情况吗?我用gpu就是为了切大图片呀。

日志:
model loaded None
prompt_process <fastsam.prompt.FastSAMPrompt object at 0x7fb3d009b2b0>
Executing <Task pending name='Task-5' coro=<HttpProtocol.connection_task() running at /root/anaconda3/envs/FastSAM/lib/python3.9/site-packages/sanic/server/protocols/http_protocol.py:161> created at /root/anaconda3/envs/FastSAM/lib/python3.9/site-packages/sanic/server/protocols/http_protocol.py:301> took 6.141 seconds
Srv 0 16:33:16 ERROR: Exception occurred while handling uri: 'http://121.46.19.2:21329/cutzi'
Traceback (most recent call last):
File "/root/anaconda3/envs/FastSAM/lib/python3.9/site-packages/sanic/app.py", line 1385, in handle_request
response = await response
File "/root/FastSAM/infer.py", line 202, in cutzi
masks = [mask.cpu().numpy() for mask in ann] if isinstance(ann[0], torch.Tensor) else ann
IndexError: list index out of range

有什么办法解决吗?

另外,本地运行 网页版 app_gradio.py 是可以切 大图的,为什么呢?命令行 大图NONE, 为什么呢?

谢谢大佬

@Fshaw123
Copy link

我也遇到了跟你相同的问题,请问大佬解决了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants