wkentaro / labelme

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

Intermittent crash #1194

Open er1czz opened 2 years ago

er1czz commented 2 years ago

Provide environment information

/Library/miniconda3/bin/python Python 3.8.12

What OS are you using?

macOS Monterey Version 12.5

Describe the Bug

During label editing, labelme would crash unexpectedly.

I tested both version 4.5.12 and 5.0.2 4.5.12 is the latest version of labelme that can be installed through brew. 5.0.2 is installed as a stand-alone app, directly downloaded from the release

It used to happen once or twice per day when I was working on polygon or box labels. I start to work on point labels recently, and the crash happened much more frequently, like every 15 minuets.

Error message in command line:

Traceback (most recent call last): File "app.py", line 1885, in removeSelectedPoint AttributeError: 'NoneType' object has no attribute 'points' zsh: abort labelme

Expected Behavior

No response

To Reproduce

The crash occurs intermittently while I was creating / editing point labels.

Edit1: It tends to crash more often when deleting point labels.

Edit2: I found that in edit mode, right-click deleting points (usually 2 or 3 points) on the image will always crash the app. However, removing point labels from the right side panel (Polygon Labels) seems fine.

wanghao14 commented 2 years ago

I have encountered the same problem. My environment information is: Python 3.8.12 and macOS 11.6. I installed labelme by pip install labelme with version 5.0.1 installed.

wanghao14 commented 2 years ago

@wkentaro This Indexerror is more likely to occur when doing deleting point with dense points, which greatly affects my data processing, and I hope to get your attention.

image
wkentaro commented 2 years ago

Yeah, but it seems hard to reproduce, and I don't think I have time to reproduce and fix.

wanghao14 commented 2 years ago

@wkentaro Thanks for your reply! I've uploaded a video recording the issue when it happened and the images and json files involved at https://drive.google.com/drive/folders/1FNJhtm-kyZgR_Bow5KX0OkhkkIZuDE1B, please check it if it's convenient for you. Any ideas on possible solutions would be greatly appreciated.

er1czz commented 2 years ago

@wkentaro Thank you so much for looking into this issue! My workaround solution is to delete the whole label (from the label panel) instead of single points on the image. This approach is relatively straightforward for point labels. However, it is probably impractical for polygon masks, such as the one shown in @wanghao14 's video.