labelme icon indicating copy to clipboard operation
labelme copied to clipboard

When I click on Create AI-polygon the program crashes and flashes back

Open jaycecd opened this issue 2 years ago • 15 comments
trafficstars

Provide environment information

I'm using version v5.3.0a0 (Labelme.exe) in releases on windows, which should be able to run standalone without the python environment

What OS are you using?

Windows 10 22H2 19042.3086

Describe the Bug

When I click on Create AI-polygon the program crashes and flashes back. But I don't get any error message, how can I troubleshoot and solve this problem? image

Expected Behavior

SAM generates AI annotations like https://github.com/wkentaro/labelme/pull/1262

To Reproduce

No response

jaycecd avatar Jul 12 '23 04:07 jaycecd

Hi, I have same problem when using AI-Polygon. I tryed three ways using labelme, including standalone file, python environment, and conda environment. When I using labelme in the python environment and conda environment, after clicking “Create AI-Polygon”, an error message appear below requests.exceptions.SSLError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /wkentaro/labelme/releases/download/sam-20230416/sam_vit_l_0b3195.quantized.encoder.onnx (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')))

CakeT3q avatar Jul 13 '23 02:07 CakeT3q

@CakeT3q Well, thank you very much for the error message, I may know what triggered the error, it should be that there is no corresponding SAM weights file. The problem you're having now should be a network issue but how does a standalone exe file configure the SAM weights file?

jaycecd avatar Jul 13 '23 02:07 jaycecd

macos is ok, windows10 will crash

zacario-li avatar Jul 28 '23 05:07 zacario-li

crash all the way, no message

sipie800 avatar Aug 09 '23 07:08 sipie800

I also meet this problem, it worked well after I set some network proxy. This is a network issue. The weight file can not be downloaded without proxy.

cosimo17 avatar Aug 11 '23 07:08 cosimo17

Hi, is there any update related to this issue?

LuisC2802 avatar Aug 25 '23 13:08 LuisC2802

Just edit code to avoid downloading. Do downloading manually. The weights shall be assighed manually rather than downloading. In many countries (if not most of countries), auto downloading through http is still a very difficult thing. Very slow or impossible. Don't assume everyone can hold auto downloading smoothly just like in areas with advanced internet, please.

sipie800 avatar Aug 26 '23 00:08 sipie800

Bug: labelme.exe crash (on windows) when the create AI polygon option is selected. Solution: Add quite=True in lines 145 and 149 of the /widgets/canvas.py file, to avoid the use of tqdm when downloading the weights.

LuisC2802 avatar Aug 26 '23 18:08 LuisC2802

if you can't download the ai model by exe file, you can download it by yourself. https://github.com/labelmeai/labelme/releases/tag/sam-20230416

miandui-WuBo avatar Mar 20 '24 15:03 miandui-WuBo

@miandui-WuBo

if you can't download the ai model by exe file, you can download it by yourself. https://github.com/labelmeai/labelme/releases/tag/sam-20230416

Is there a mapping of the 6 ONNX files to the 5 models listed in the menu of Labelme.exe (version 5.4.1 downloaded today 3/20/2024)? Where should the downloaded .onnx files be saved, next to the .exe?

EDIT: I went through the source code and it appears that the onnx files should be saved to "C:\Users\your_username.cache\gdown", (the directory had already been created but was empty) however that didn't work either. The executable still crashes.

KDeser avatar Mar 21 '24 02:03 KDeser

@miandui-WuBo

if you can't download the ai model by exe file, you can download it by yourself. https://github.com/labelmeai/labelme/releases/tag/sam-20230416

Is there a mapping of the 6 ONNX files to the 5 models listed in the menu of Labelme.exe (version 5.4.1 downloaded today 3/20/2024)? Where should the downloaded .onnx files be saved, next to the .exe?

EDIT: I went through the source code and it appears that the onnx files should be saved to "C:\Users\your_username.cache\gdown", (the directory had already been created but was empty) however that didn't work either. The executable still crashes.

Everything about the model is in this file: "labelme/ai/init.py". I also tried to move the onnx file in gdown but I found every time I run the labelme.exe, it creates a new temporary folder, so I guess that's why it doesn't work. Maybe we can only download the source code to modify the download file path in init.py .

miandui-WuBo avatar Mar 22 '24 06:03 miandui-WuBo