-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue running SAM 2 Video tracking #645
Comments
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 -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 |
Hey there i have a similar bit different issue where I do use the setup as you suggested however, I get a |
If you did what I suggested, you also need to change the config to sam2 instead sam2.1 |
hi @FunnyPocketBook Thanks, however I still see something strange happening. I have the model up and running in label studio. But now when I try to annotate something in the video I get the following:
The video looks normal, my docker-compose looks like
I already tried adding
But that also did not help anything. Can you give any pointers? |
In case other people might need, this is my docker-compose.yml: version: "3.8"
services:
segment_anything_2_video:
container_name: segment_anything_2_video
image: humansignal/segment_anything_2_video:v0
build:
context: .
args:
TEST_ENV: ${TEST_ENV}
environment:
# specify these parameters if you want to use basic auth for the model server
- BASIC_AUTH_USER=
- BASIC_AUTH_PASS=
# set the log level for the model server
- LOG_LEVEL=DEBUG
# any other parameters that you want to pass to the model server
- ANY=PARAMETER
# specify the number of workers and threads for the model server
- WORKERS=1
- THREADS=8
# specify the model directory (likely you don't need to change this)
- MODEL_DIR=/data/models
# specify device
- DEVICE=cuda # or 'cpu' (coming soon)
# SAM2 model config
- MODEL_CONFIG=configs/sam2.1/sam2.1_hiera_l.yaml
# SAM2 checkpoint
- MODEL_CHECKPOINT=sam2.1_hiera_large.pt
# Specify the Label Studio URL and API key to access
# uploaded, local storage and cloud storage files.
# Do not use 'localhost' as it does not work within Docker containers.
# Use prefix 'http://' or 'https://' for the URL always.
# Determine the actual IP using 'ifconfig' (Linux/Mac) or 'ipconfig' (Windows).
- LABEL_STUDIO_URL=
- LABEL_STUDIO_API_KEY=
ports:
- "9090:9090"
volumes:
- "./data/server:/data"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu] |
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!
The text was updated successfully, but these errors were encountered: