You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to use the SegmentAnything model (speed version) for automatic annotation in LabelMe, the software crashes and the program closes abruptly.
However, using the balanced and accuracy models of SegmentAnything does not cause any issues.
Error :
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/labelme/widgets/canvas.py", line 773, in paintEvent
points = self._ai_model.predict_polygon_from_points(
File "/usr/local/lib/python3.10/site-packages/labelme/ai/models/segment_anything.py", line 64, in predict_polygon_from_points
polygon = _compute_polygon_from_points(
File "/usr/local/lib/python3.10/site-packages/labelme/ai/models/segment_anything.py", line 172, in _compute_polygon_from_points
contour = max(contours, key=_get_contour_length)
ValueError: max() arg is an empty sequence
[1] 30792 abort labelme
Expected Behavior
I expected LabelMe to perform automatic annotation using the SegmentAnything model (speed version) without crashing, similar to how it behaves with the balanced and accuracy models.
To Reproduce
Open LabelMe. ( 5.3.1)
Load any image and use Segment Anything ( Speed ) model to get annotations.
Click on image to get segmentation annotation.
Wait for sometime to model processing.
As this completed, immediately observe that the software crashes, without showing annotations or allowing us to edit or modify.
The text was updated successfully, but these errors were encountered:
Provide environment information
Python 3.10.0
Labelme 5.3.1
What OS are you using?
macOS Sanoma 14.0
Describe the Bug
When attempting to use the SegmentAnything model (speed version) for automatic annotation in LabelMe, the software crashes and the program closes abruptly.
However, using the balanced and accuracy models of SegmentAnything does not cause any issues.
Error :
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/labelme/widgets/canvas.py", line 773, in paintEvent
points = self._ai_model.predict_polygon_from_points(
File "/usr/local/lib/python3.10/site-packages/labelme/ai/models/segment_anything.py", line 64, in predict_polygon_from_points
polygon = _compute_polygon_from_points(
File "/usr/local/lib/python3.10/site-packages/labelme/ai/models/segment_anything.py", line 172, in _compute_polygon_from_points
contour = max(contours, key=_get_contour_length)
ValueError: max() arg is an empty sequence
[1] 30792 abort labelme
Expected Behavior
I expected LabelMe to perform automatic annotation using the SegmentAnything model (speed version) without crashing, similar to how it behaves with the balanced and accuracy models.
To Reproduce
The text was updated successfully, but these errors were encountered: