Fine tuning sam 2.1 segmentation model

I am trying to fine tune the new SAM 2.1 segmentation model using the roboflow guide given here using VsCode python 3.10 and on windows 10: https://blog.roboflow.com/fine-tune-sam-2-1/

This code runs all fine when using google collab and no errors are encountered. As soon as I run the exact same code provided on my local machine is gives the following error when running the training code command:

!python training/train.py -c 'configs/train.yaml' --use-cluster 0 --num-gpus 1

I get the following error when running on windows 10, using vscode:

hydra.errors.MissingConfigException: Primary config module 'sam2' not found.
Check that it's correct and contains an __init__.py file

my working directory:

C:\..\SAM_2_1\sam2

Thank you for creating this topic.

We recommend running the training job in a Linux environment with an A100 GPU.

If you are using a Windows machine, Windows Subsystem for Linux may be useful.

1 Like

Thanks for the response, will the provided code not run on windows, as this is my main OS so would be ideal to get it working on there if possible, or is the error an OS issue related one?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.