I'm running demo.py and using the DAVE_3_shot.pth weight for 3-shot detection. The count result I got is particularly poor. Could you please tell me what might be the cause of this and how I can solve it? Thank you!
(dave) root@ZDxdRR:/mnt# python demo_infer.py --skip_train --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_query_pos_emb --use_objectness --use_appearance --batch_size 1 --pre_norm
/root/miniconda3/envs/dave/lib/python3.10/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
/root/miniconda3/envs/dave/lib/python3.10/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=ResNet50_Weights.IMAGENET1K_V1. You can also use weights=ResNet50_Weights.DEFAULT to get the most up-to-date weights.
warnings.warn(msg)
/mnt/demo_infer.py:39: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
torch.load(os.path.join(args.model_path, 'DAVE_3_shot.pth'))['model'], strict=False
/mnt/demo_infer.py:42: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
torch.load(os.path.join(args.model_path, 'verification.pth'))['model'].items()
[DBG] predict_density_map: bs,c,h,w = torch.Size([4096, 1, 256])
[DBG] predict_density_map: memory.shape = torch.Size([4096, 1, 256])
[DBG] predict_density_map: objectness is None? True
[DBG] predict_density_map: appearance is None? False
appearance.shape: torch.Size([27, 1, 256])
/root/miniconda3/envs/dave/lib/python3.10/site-packages/sklearn/manifold/_spectral_embedding.py:309: UserWarning: Array is not symmetric, and will be converted to symmetric by average with its transpose.
adjacency = check_symmetric(adjacency)
Density count: 78.1, Box count: 35
✅ 结果已保存:
图像: material/7_result.jpg
数据: material/7_result.json
(dave) root@ZDxdRR:/mnt#

I'm running demo.py and using the DAVE_3_shot.pth weight for 3-shot detection. The count result I got is particularly poor. Could you please tell me what might be the cause of this and how I can solve it? Thank you!
(dave) root@ZDxdRR:/mnt# python demo_infer.py --skip_train --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_query_pos_emb --use_objectness --use_appearance --batch_size 1 --pre_norm
/root/miniconda3/envs/dave/lib/python3.10/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
/root/miniconda3/envs/dave/lib/python3.10/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or
Nonefor 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passingweights=ResNet50_Weights.IMAGENET1K_V1. You can also useweights=ResNet50_Weights.DEFAULTto get the most up-to-date weights.warnings.warn(msg)
/mnt/demo_infer.py:39: FutureWarning: You are using
torch.loadwithweights_only=False(the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value forweights_onlywill be flipped toTrue. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user viatorch.serialization.add_safe_globals. We recommend you start settingweights_only=Truefor any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.torch.load(os.path.join(args.model_path, 'DAVE_3_shot.pth'))['model'], strict=False
/mnt/demo_infer.py:42: FutureWarning: You are using
torch.loadwithweights_only=False(the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value forweights_onlywill be flipped toTrue. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user viatorch.serialization.add_safe_globals. We recommend you start settingweights_only=Truefor any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.torch.load(os.path.join(args.model_path, 'verification.pth'))['model'].items()
[DBG] predict_density_map: bs,c,h,w = torch.Size([4096, 1, 256])
[DBG] predict_density_map: memory.shape = torch.Size([4096, 1, 256])
[DBG] predict_density_map: objectness is None? True
[DBG] predict_density_map: appearance is None? False
appearance.shape: torch.Size([27, 1, 256])
/root/miniconda3/envs/dave/lib/python3.10/site-packages/sklearn/manifold/_spectral_embedding.py:309: UserWarning: Array is not symmetric, and will be converted to symmetric by average with its transpose.
adjacency = check_symmetric(adjacency)
Density count: 78.1, Box count: 35
✅ 结果已保存:
图像: material/7_result.jpg
数据: material/7_result.json
(dave) root@ZDxdRR:/mnt#