用gpu cuda跑大一点的图片
alexhmyang opened this issue · 1 comments
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, 为什么呢?
谢谢大佬
我也遇到了跟你相同的问题,请问大佬解决了吗?