wkentaro / labelme

Image Polygonal Annotation with Python (polygon, rectangle, circle, line, point and image-level flag annotation).
https://labelme.io
Other
13.59k stars 3.42k forks source link

Fix index error due to missing previously selected shapes in current image #1503

Open Ynjxsjmh opened 1 month ago

Ynjxsjmh commented 1 month ago

The problem (#1396) can be reproduced by selecting a shape in current image a, and go on next image b then press backspace to delete point. self.selectedShapes is in image a thus it doesn't exist in any shapes in image b.

Another possible solution is to clear selected shapes after loading a new image, but user may want to go back to original image and use those selected shapes.