-
Notifications
You must be signed in to change notification settings - Fork 46
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
AttributeError: 'Namespace' object has no attribute 'dataset' #1
Comments
Same issue here |
Hi all, sorry for the late reply. I got the point. The error is caused by the version change. Now I have fixed the inference code. Actually, nothing changed only adding some attributes for the initialization. Now I can run inference.py successfully:) You could have a try now. thanks for the update! |
thanks!it’s nice job,but when i use this find another problem RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity |
The error shows no relationships above the threshold are found by RelTR. When you are using a customized image or image from other datasets. It could be that the entities in the image are not included in the VG-150 classes (also relationships). In this case, you could lower the threshold in Line137/138 (I set it to 0.3, for your example, I use 0.1 and get something interesting). However, the lower threshold means that RelTR is not confident in the output so there could be some dummy triplets. I will also release the pre-trained model on OpenImages which contains more than 250 object categories in the future. |
hi, i just follow readme/usage and type this conmand:
python inference.py --img_path demo/vg2.jpg --resume ckpt/checkpoint0149.pth
and i get this:
(scene_graph_benchmark) bash-4.2$ python inference.py --img_path demo/vg2.jpg --resume ckpt/checkpoint0149.pth
Namespace(aux_loss=True, backbone='resnet50', dec_layers=6, device='cuda', dilation=False, dim_feedforward=2048, dropout=0.1, enc_layers=6, hidden_dim=256, img_path='demo/vg2.jpg', lr_backbone=1e-05, nheads=8, num_entities=100, num_triplets=200, position_embedding='sine', pre_norm=False, resume='ckpt/checkpoint0149.pth', return_interm_layers=False)
yes
Traceback (most recent call last):
File "inference.py", line 191, in
main(args)
File "inference.py", line 104, in main
model = build_model(args)
File "/home/user/JL/myhome/juyterNotebook_folder/test/test_for_code/sgg_for_sgbEnv/reltr/RelTR-main/models/init.py", line 5, in build_model
return build(args)
File "/home/user/JL/myhome/juyterNotebook_folder/test/test_for_code/sgg_for_sgbEnv/reltr/RelTR-main/models/reltr.py", line 377, in build
num_classes = 151 if args.dataset != 'oi' else None #TODO: openimage v6
AttributeError: 'Namespace' object has no attribute 'dataset'
The text was updated successfully, but these errors were encountered: