Closed hutuo1213 closed 2 years ago
(py37) quan:~/qpic$ python generate_vcoco_official.py --param_path outputs/vcoco/ts_model/checkpoint.pth --save_path vcoco.pickle --hoi_path data/v-coco git: sha: N/A, status: clean, branch: N/A
Namespace(backbone='resnet50', batch_size=2, dec_layers=6, device='cuda', dilation=False, dim_feedforward=2048, dropout=0.1, enc_layers=6, hidden_dim=256, hoi_path='data/v-coco', missing_category_id=80, model_name='baseline', nheads=8, num_queries=100, num_verb_queries=100, num_workers=2, param_path='outputs/vcoco/ts_model/checkpoint.pth', position_embedding='sine', pre_norm=False, save_path='vcoco.pickle', subject_category_id=0)
Traceback (most recent call last):
File "generate_vcoco_official.py", line 572, in
When running the code in this article, I get this error, do you know why? The server environment can run Qpic.
(py37) quan:~/qpic$ python generate_vcoco_official.py --param_path outputs/vcoco/ts_model/checkpoint.pth --save_path vcoco.pickle --hoi_path data/v-coco git: sha: N/A, status: clean, branch: N/A
Namespace(backbone='resnet50', batch_size=2, dec_layers=6, device='cuda', dilation=False, dim_feedforward=2048, dropout=0.1, enc_layers=6, hidden_dim=256, hoi_path='data/v-coco', missing_category_id=80, model_name='baseline', nheads=8, num_queries=100, num_verb_queries=100, num_workers=2, param_path='outputs/vcoco/ts_model/checkpoint.pth', position_embedding='sine', pre_norm=False, save_path='vcoco.pickle', subject_category_id=0) Traceback (most recent call last): File "generate_vcoco_official.py", line 572, in main(args) File "generate_vcoco_official.py", line 461, in main dataset_val = build_dataset(image_set='val', args=args) File "/home1/quan107552101247/qpic/datasets/vcoco.py", line 221, in build num_queries=args.num_queries, dataset_file=args.dataset_file) AttributeError: 'Namespace' object has no attribute 'dataset_file'
When running the code in this article, I get this error, do you know why? The server environment can run Qpic.
add parser.add_argument('--dataset_file', default='vcoco') in get_args_parser function, will fix it soon
(py37) quan:~/qpic$ python runvcoco.py loading annotations into memory... Done (t=1.75s) creating index... index created! loading vcoco annotations... Traceback (most recent call last): File "runvcoco.py", line 15, in vcocoeval._do_eval('/home1/quan107552101247/qpic/vcocof.pickle', ovr_thresh=0.5) File "/home1/quan107552101247/qpic/vsrl_eval.py", line 192, in _do_eval self._do_agent_eval(vcocodb, detections_file, ovr_thresh=ovr_thresh) File "/home1/quan107552101247/qpic/vsrl_eval.py", line 417, in _do_agent_eval assert(np.amax(rec) <= 1) File "<array_function internals>", line 6, in amax File "/home1/quan107552101247/.local/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2621, in amax keepdims=keepdims, initial=initial, where=where) File "/home1/quan107552101247/.local/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 90, in _wrapreduction return ufunc.reduce(obj, axis, dtype, out, **passkwargs) ValueError: zero-size array to reduction operation maximum which has no identity
more details about runvcoco.py?
import vsrl_eval from vsrl_eval import VCOCOeval import os os.environ["CUDA_VISIBLE_DEVICES"] = "0" vsrl_annot_file='data/vcoco/vcoco_val.json' coco_file = '/home1/quan107552101247/qpic/data/v-coco/data/instances_vcoco_all_2014.json' split_file = '/home1/quan107552101247/qpic/data/v-coco/data/splits/vcoco_val.ids' det_file = '/home1/quan107552101247/qpic/vcoco3.pkl' vcocoeval = VCOCOeval(vsrl_annot_file, coco_file, split_file)
vcocoeval._do_eval(det_file, ovr_thresh=0.5)
import vsrl_eval from vsrl_eval import VCOCOeval import os os.environ["CUDA_VISIBLE_DEVICES"] = "0" vsrl_annot_file='data/vcoco/vcoco_val.json' coco_file = '/home1/quan107552101247/qpic/data/v-coco/data/instances_vcoco_all_2014.json' split_file = '/home1/quan107552101247/qpic/data/v-coco/data/splits/vcoco_val.ids' det_file = '/home1/quan107552101247/qpic/vcoco3.pkl' vcocoeval = VCOCOeval(vsrl_annot_file, coco_file, split_file)
e.g. vsrl_annot_file: data/vcoco/vcoco_val.json
coco_file: data/instances_vcoco_all_2014.json
split_file: data/splits/vcoco_val.ids
vcocoeval._do_eval(det_file, ovr_thresh=0.5)
the vsrl_annot_file and split_file should be the vcoco_test.json and vcoco_test.ids, not val set. and make sure the test images are correct
Thank you so much!
I looked at the file (hoi.py) and there is no "PostProcessVCOCO"
Traceback (most recent call last):
File "generate_vcoco_official.py", line 575, in
Thank you so much!
I looked at the file (hoi.py) and there is no "PostProcessVCOCO"
Traceback (most recent call last): File "generate_vcoco_official.py", line 575, in main(args) File "generate_vcoco_official.py", line 476, in main from models.hoi import DETRHOI, PostProcessVCOCO ImportError: cannot import name 'PostProcessVCOCO' from 'models.hoi' (/home1/quan107552101247/qpic/models/hoi.py)
try --model_name hoi_ts_qpos_eobj_kl
python generate_vcoco_official.py \ --param_path outputs/vcoco/ts_model/checkpoint.pth \ --save_path vcoco.pickle \ --hoi_path data/v-coco \ --model_name hoi_ts_qpos_eobj_kl
Really appreciate your suggestions!
(py37) quan:~/qpic$ python runvcoco.py loading annotations into memory... Done (t=1.75s) creating index... index created! loading vcoco annotations... Traceback (most recent call last): File "runvcoco.py", line 15, in
vcocoeval._do_eval('/home1/quan107552101247/qpic/vcocof.pickle', ovr_thresh=0.5)
File "/home1/quan107552101247/qpic/vsrl_eval.py", line 192, in _do_eval
self._do_agent_eval(vcocodb, detections_file, ovr_thresh=ovr_thresh)
File "/home1/quan107552101247/qpic/vsrl_eval.py", line 417, in _do_agent_eval
assert(np.amax(rec) <= 1)
File "<__array_function__ internals>", line 6, in amax
File "/home1/quan107552101247/.local/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2621, in amax
keepdims=keepdims, initial=initial, where=where)
File "/home1/quan107552101247/.local/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 90, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation maximum which has no identity