VeloDC / oshot_detection

One-Shot Unsupervised Cross Domain Detection
12 stars 5 forks source link

Some problem about 'python tools/oshot_net.py --config-file configs/amd/oshot_clipart_target.yaml --ckpt VOC_RS_baseline/model_final.pth' #2

Open HuangLian126 opened 4 years ago

HuangLian126 commented 4 years ago

I have done the two steps 'Performing OSHOT pretraining' and 'Testing pretrained model', however get this error when running 'Performing OSHOT adaptation': ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Traceback (most recent call last): File "tools/oshot_net.py", line 119, in main() File "tools/oshot_net.py", line 108, in main cfg=cfg File "/home/hl/hl/oshot_detection-master/maskrcnn_benchmark/engine/oshot.py", line 151, in oshot_inference predictions = compute_on_dataset(model, data_loader, device, oshot_breakpoints, inference_timer, cfg) File "/home/hl/hl/oshot_detection-master/maskrcnn_benchmark/engine/oshot.py", line 99, in compute_on_dataset log_test_image(cfg, summarywriter, "detections{}_its".format(oshot_it+1), image_ids[0], images, output, image_name=image_name) File "/home/hl/hl/oshot_detection-master/maskrcnn_benchmark/utils/log_image_bb.py", line 136, in log_test_image log_image_and_bb(summary_writer, name, global_step, image, targets, image_name) File "/home/hl/hl/oshot_detection-master/maskrcnn_benchmark/utils/log_image_bb.py", line 32, in log_image_and_bb image = _overlay_boxes(image, targets) File "/home/hl/hl/oshot_detection-master/maskrcnn_benchmark/utils/log_image_bb.py", line 98, in _overlay_boxes colors = _compute_colors_for_labels(labels).tolist() File "/home/hl/hl/oshot_detection-master/maskrcnn_benchmark/utils/log_image_bb.py", line 71, in _compute_colors_for_labels cmcolors.append(np.array(cmap(lbl)[:3])*255) File "/home/hl/anaconda3/envs/python37/lib/python3.7/site-packages/matplotlib/colors.py", line 561, in call elif np.any(np.isnan(X)): File "<__array_function__ internals>", line 6, in any File "/home/hl/anaconda3/envs/python37/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2330, in any return _wrapreduction(a, np.logical_or, 'any', axis, None, out, keepdims=keepdims) File "/home/hl/anaconda3/envs/python37/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 85, in _wrapreduction return reduction(axis=axis, out=out, **passkwargs) TypeError: any() received an invalid combination of arguments - got (out=NoneType, axis=NoneType, ), but expected one of:

VeloDC commented 4 years ago

Dear HuangLian126, Thank you for raising this issue, unfortunately we couldn't replicate the error on our side. I am still looking into it, meanwhile you could set logging_enabled=False in line 32 of "/home/hl/hl/oshot_detection-master/maskrcnn_benchmark/engine/oshot.py" (or comment out lines 98-99 of the same file) so that you can proceed with the evaluation