Open jaycecd opened 1 year ago
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 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?
macos is ok, windows10 will crash
crash all the way, no message
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.
Hi, is there any update related to this issue?
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.
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.
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
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.
@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 .
放在这里:C:\Users\xxx.cache\gdown\下,模型名称手动下载后,在模型前面添加"https-COLON--SLASH--SLASH-github.com-SLASH-wkentaro-SLASH-labelme-SLASH-releases-SLASH-download-SLASH-sam-20230416-SLASH-",如下图所示
i have a solution (at least for the windows10 issues with this app):
just download conda, create a 'labelme' venv and download labelme natively.
and then when you have your image just WAIT for the SAM to automatically download and track its progress from the terminal you'd opened your venv from. this also solved my problems with file size! i hope this solution helps.
I solved this problem by running it from the console. For convenience, I created a batch file for Windows.
This might help someone:
labelme
.labelme.bat
with the following content and run it.@echo off
PUSHD "%~dp0"
setlocal
if not exist ".venv\" (
call python -m venv .venv
call .venv\Scripts\activate.bat & pip install labelme
)
call .venv\Scripts\activate.bat & labelme
pause
exit /b
In a Windows 11 environment, I successfully installed labelme
and its dependencies with the following commands:
conda install labelme -c conda-forge
pip install -U labelme
pip install -U pyqt5_tools
pip install -U scikit-image
This setup worked well!
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?
Expected Behavior
SAM generates AI annotations like https://github.com/wkentaro/labelme/pull/1262
To Reproduce
No response