Skip to content
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

Different SAM model not giving correct masks #8158

Closed
2 tasks done
realtimshady1 opened this issue Jul 12, 2024 · 1 comment
Closed
2 tasks done

Different SAM model not giving correct masks #8158

realtimshady1 opened this issue Jul 12, 2024 · 1 comment
Labels
question Further information is requested

Comments

@realtimshady1
Copy link

Actions before raising this issue

  • I searched the existing issues and did not find anything similar.
  • I read/searched the docs

Steps to Reproduce

  1. Download sam_vit_b_01ec64.pth
  2. Replace decoder.onnx in /root/cvat/cvat-ui/plugins/sam/assets/decoder.onnx
  3. Update serverless/pytorch/facebookresearch/sam/nuclio/model_handler.py
self.sam_checkpoint = "/opt/nuclio/sam/sam_vit_b_01ec64.pth"
self.model_type = "vit_b" 
  1. Update serverless/pytorch/facebookresearch/sam/nuclio/function.yaml
value: curl -O https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth
  1. Build
docker compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.https.yml -f components/serverless/docker-compose.serverless.yml -f docker-compose.dev.yml up -d --build
  1. Deploy function deploy_cpu.sh serverless/pytorch/facebookresearch/sam/nuclio/
    image

  2. Use the SAM tool on an image and the results look like the following
    image

Expected Behavior

I believe that the new decoder is not being used properly. Either I did not build correctly or further steps are needed to accommodate the SAM-b model

Possible Solution

No response

Context

No response

Environment

Version: ad1bcd5474582c24119a4a49909eb3f1e3979899 (HEAD -> develop, origin/develop, origin/HEAD)
Docker version: 20.10.22
Docker Swarm/ Kubernetes: No
OS: Debian GNU/Linux 11 (bullseye)
@realtimshady1 realtimshady1 added the bug Something isn't working label Jul 12, 2024
@bsekachev bsekachev added question Further information is requested and removed bug Something isn't working labels Jul 12, 2024
@bsekachev
Copy link
Member

Make sure that the previous decoder.onnx not cached by the browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants