If FastSAM finds nothing to segment, things crash. I've attached an image that crashes FastSAM-s (on your replicate link https://replicate.com/casia-iva-lab/fastsam). It yields this error:
Running predict()...
image 1/1 /tmp/tmp9i0napfutheimage.png: 448x576 (no detections), 107.1ms
Speed: 2.3ms preprocess, 107.1ms inference, 0.4ms postprocess per image at shape (1, 3, 576, 576)
Traceback (most recent call last):
File "/root/.pyenv/versions/3.8.17/lib/python3.8/site-packages/cog/server/worker.py", line 217, in _predict
result = predict(**payload)
File "predict.py", line 130, in predict
annotations=results[0].masks.data,
AttributeError: 'NoneType' object has no attribute 'data'
If FastSAM finds nothing to segment, things crash. I've attached an image that crashes FastSAM-s (on your replicate link https://replicate.com/casia-iva-lab/fastsam). It yields this error: