facebookresearch / facebookresearch/sam2
Issue: Fine-Tuning SAM2.1 Model on Kaggle Free Tier
- Dominant language
- Jupyter Notebook
- Stars
- 19.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
Hello everyone,
I’m attempting to fine-tune the SAM2.1 model following [this tutorial from Roboflow](https://blog.roboflow.com/fine-tune-sam-2-1/). I’m using Kaggle as the cloud platform for training, leveraging the free tier with 2× T4 GPUs.
The issue arises when I try to start the training process using the following command:
```bash
!python training/train.py -c 'configs/training_new.yaml' --use-cluster 0 --num-gpus 2
```
I’ve tried various approaches to resolve the issue, including modifying the YAML configuration file. I even attempted to use the built-in YAML file from the SAM2 Git repository (`sam2/sam2/configs/sam2.1_training/sam2.1_hiera_b+_MOSE_finetune.yaml`) by adjusting the `img_folder` and `gt_folder` paths to fit my use case. Unfortunately, none of these attempts have resolved the error.
The dataset I am using is from [Roboflow Universe](https://universe.roboflow.com/robocup-9jdud/black-parts-panorama-image).
Before this, I encountered an issue related to Roboflow, [which has been resolved](https://discuss.roboflow.com/t/assistance-needed-invalid-rle-mask-representation-in-new-dataset/8086). However, I’m now facing this new error during the training step.
Could someone please guide me on how to resolve this issue? Any help would be greatly appreciated!
Thank you for your time and support.
Contributor guide
Research direction
Reproduce the reported command in training/train.py using configs/training_new.yaml and the Kaggle 2×T4 setup. Compare that configuration with sam2/sam2/configs/sam2.1_training/sam2.1_hiera_b+_MOSE_finetune.yaml, including the adjusted img_folder and gt_folder paths. Done means the training process starts successfully or the specific blocking error is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python, yaml
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100