Issue: Fine-Tuning SAM2.1 Model on Kaggle Free Tier

Hello everyone,

I’m attempting to fine-tune the SAM2.1 model following the RoboFlow tutorial on fine-tuning SAM2.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:

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

Before this, I encountered an issue related to Roboflow, which has been addressed in another post. 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.