conda create --name sam-finetune python=3.10 -y
conda activate sam-finetune
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt
-
Download from the ViSha Dataset Source Link or SOBA_v2-Datasets and place the files inside the
datasets
folder. -
Run the
save_json.py
script in thetool
folder to createsam_train.json
andsam_test.json
and place them inside thedatasets
folder. -
Finish.
You can use the save_labels.py
script in the tool
folder to verify the labels.
Organized SOBA_v2-Datasets for use with the SAM model.
Download the weights from the following links and save them in the weights
directory.
python sam_finetune.py
python sam_test.py
python sam_eval.py
python demo_app.py
learn-how-to-fine-tune-the-segment-anything-model-sam