Skip to content

pg56714/Segment-Anything-finetune

Repository files navigation

Segment-Anything-finetune

Getting Started

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

Datasets Steps

  1. Download from the ViSha Dataset Source Link or SOBA_v2-Datasets and place the files inside the datasets folder.

  2. Run the save_json.py script in the tool folder to create sam_train.json and sam_test.json and place them inside the datasets folder.

  3. 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.

Weights

Download the weights from the following links and save them in the weights directory.

ViT-B

Fine-tune

python sam_finetune.py

Test

python sam_test.py

Eval

python sam_eval.py

Demo

python demo_app.py

Source

segment-anything

Detect-AnyShadow

ViSha-Dataset-Source-Link

ViSha-Dataset-Link

learn-how-to-fine-tune-the-segment-anything-model-sam

fine-tune-the-segment-anything-model-sam-colab

SOBA_v2-Datasets

SSIS

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages