Closed georgeYanch closed 10 months ago
Hi, thanks for your interest and question. This is because when using the HQ-SAM variants, you need to change not only the model but also the SAM predictor class being instantiated. Here's how you can update your sam_pt.yaml
configuration:
#...
defaults:
# ...
- sam@sam_predictor.sam_model: samhq_light_vit_tiny
sam_predictor:
_target_: segment_anything_hq.predictor.SamPredictor
# ...
iterative_refinement_iterations: 3
# ...
Please note that based on a small hyperparameter search, it's recommended to use iterative_refinement_iterations
equal to 3 for the Light HQ-SAM variant.
You can also override the configuration via the command line without modifying the .yaml
files, as shown in the VOS evaluation examples here. Hope this helps!
Thanks! Everything works just fine now
Hi, there's a problem when I try to use HQ-SAM-Light-VIT-T model
In sam_pt.yaml I set
- sam@sam_predictor.sam_model: samhq_light_vit_tiny
and when running demo I get
TypeError: forward() missing 2 required positional arguments: 'hq_token_only' and 'interm_embeddings'