jerpelhan / DAVE

MIT License
34 stars 3 forks source link

Zero-shot demo #9

Closed GioFic95 closed 2 months ago

GioFic95 commented 2 months ago

I propose a zero-shot demo that can be fully executed via command line.

You can run it with:

python demo_zero.py --img_path <input file or dir path> --out_path <output_path> --zero_shot --two_passes --skip_train --model_name DAVE_0_shot --model_path material --backbone resnet50 --swav_backbone --reduction 8 --num_enc_layers 3 --num_dec_layers 3 --kernel_dim 3 --emb_dim 256 --num_objects 3 --num_workers 8 --use_objectness --use_appearance --batch_size 1 --pre_norm

where:

If you prefer to show the result instead of saving it, just run:

python demo_zero.py --img_path <input file or dir path> --show --zero_shot --two_passes --skip_train --model_name DAVE_0_shot --model_path material --backbone resnet50 --swav_backbone --reduction 8 --num_enc_layers 3 --num_dec_layers 3 --kernel_dim 3 --emb_dim 256 --num_objects 3 --num_workers 8 --use_objectness --use_appearance --batch_size 1 --pre_norm

with --show instead of --out_path.

jerpelhan commented 2 months ago

Great! Thank you so much for contributing to this repository. Did you try setting bounding boxes to torch.zeros((1,3,4)), as only the shape of bounding boxes sent to this function is important? This way no modification is needed in the dave.py.

GioFic95 commented 2 months ago

Thank you for the hint, I applied what you suggested in the new commit dc5f2d3 (#9).