Article directory
1.anylabeling instructions
Official website : https://anylabeling.nrl.ai/docs
As a smart labeling tool with Segment Anything and YOLO models, this tool can quickly and accurately label images.
2. Installation tutorial
1. Executable program mode
-
Download the executable program from the official website (https://github.com/vietanhdev/anylabeling/releases)
-
Check the required CUDA and cuDNN versions through the onnx official website (anylabeling version 0.3.3 uses onnxruntime-gpu 1.14, which needs to be adapted to CUDA 11.6 and cuDNN 8.5)
-
Install the corresponding versions of cuda and cuDNN as required.
CUDA download address : https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64
cuDNN download address : https://developer.nvidia.com/rdp/cudnn-archive -
Run program
-
Change software language
-
Select automatic labeling, select from the model, and the software will automatically download the model (clicking to crash means that the download source cannot be connected and a VPN needs to be turned on). You
can also choose to download the model directly from the official website (https://github.com/vietanhdev/anylabeling-assets/releases ) Download the corresponding version of the model and then load it directly (you know the download speed of github)
-
You can also go directly to see where the software itself was downloaded from. After running the software, you can see the folder where the model is saved under the path C:\Users***\anylabeling_data\models (the * represents the username of your computer). As shown in the figure below,
the config.yaml in each folder saves the download path of the model. You can see it by opening it with txt:
We open the path: https://huggingface.co/vietanhdev/segment-anything- onnx-models, you can enter the following web page:
you can download the model file from here
-
Manually configure the model file.
We unzip the downloaded file, open the config.yaml in it, and compare it with the original:config_file: C:\Users\aodeluo\anylabeling_data\models\mobile_sam_20230629\config.yaml display_name: Segment Anything (MobileSAM) download_url: https://huggingface.co/vietanhdev/segment-anything-onnx-models/resolve/main/mobile_sam_20230629.zip has_downloaded: false is_custom_model: false name: mobile_sam_20230629
type: segment_anything name: mobile_sam_20230629 display_name: Segment Anything (MobileSAM) encoder_model_path: mobile_sam.encoder.onnx decoder_model_path: sam_vit_h_4b8939.decoder.onnx input_size: 1024 max_width: 1024 max_height: 682
We make the following modifications:
type: segment_anything name: mobile_sam_20230629 display_name: Segment Anything (MobileSAM) encoder_model_path: mobile_sam.encoder.onnx decoder_model_path: sam_vit_h_4b8939.decoder.onnx input_size: 1024 max_width: 1024 max_height: 682 config_file: C:\Users\aodeluo\anylabeling_data\models\mobile_sam_20230629\config.yaml has_downloaded: true
Then copy the entire file directly to the corresponding model directory for overwriting.
Open anylabeling and select the replaced model.
Open an image and you can automatically label it
2. python program
-
installation environment, environment
conda create -n anylabeling python=3.8 anaconda conda activate anylabeling
-
Install anylabeling
pip install anylabeling-gpu -i https://mirrors.aliyun.com/pypi/simple/
-
By
pip list
checking the installed onnx version
-
Check the required CUDA and cuDNN versions through the onnx official website
-
Install the corresponding versions of cuda and cuDNN as required.
CUDA download address : https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64
cuDNN download address : https://developer.nvidia.com/rdp/cudnn-archive