Skip to content

Crash at interrupting SAM box drawing #47

@cofade

Description

@cofade

When labelling larger datasets with SAM, occasionally I realize after I have already started drawing the bounding box, that the start point was incorrect. Out of a reflex, I then hit the Esc button to abort, so I can start drawing a new box without having to wait for unnecessary SAM segmentation.
Unfortunately, this leads to the following error, after which the program crashes:

Traceback (most recent call last):
  File "C:\Users\wienh\VSCode\digitalsreeni-image-annotator\src\digitalsreeni_image_annotator\image_label.py", line 754, in mouseReleaseEvent
    self.sam_bbox[2] = pos[0]
    ~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object does not support item assignment

This will lead to losing all annotations since last saving / export.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions