Open vs-nth opened 1 week ago
Hey! It looks like with the update to SAM2.1 some things in the back have changed. If you just want to use SAM2 and not necessarily SAM 2.1, then you can change the following in the Dockerfile
in the segment_anything_2 directory:
-RUN cd / && git clone --depth 1 --branch main --single-branch https://github.com/facebookresearch/segment-anything-2.git
+RUN cd / && git clone --branch main --single-branch https://github.com/facebookresearch/segment-anything-2.git && cd segment-anything-2 && git checkout 0f6515ae853c40420ea8e3dd250f8031bbf03023
This essentially just checks out the repo to the commit before SAM2.1 was added. Then changing the env variables MODEL_CHECKPOINT
and MODEL_CONFIG
back to sam2 and rebuilding the image worked for me!
Hello, I'm trying to run Sam2 with docker compose on my local system for video tracking. However, the upstream repo for Segment anything 2 updated the checkpoints to point to Sam2.1 and as a result the default configuration does not work. Here's the contents of my docker-compose.yml file.
I set the checkpoint and the config to Sam2.1 and on running
docker compose up
, i encounter this error:Anything obvious that i'm doing wrong?
Thank you!