aosokin / os2d

OS2D: One-Stage One-Shot Object Detection by Matching Anchor Features

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in visualisation

saswat0 opened this issue · comments

I'm trying to run an evaluation and generate the detections on the fly. This is the error I'm facing

TypeError: show_detections() got multiple values for argument 'class_ids'

Full trace

Traceback (most recent call last):
  File "main_detector_retrieval.py", line 117, in <module>
    main()
  File "main_detector_retrieval.py", line 113, in main
    logger_prefix=logger_prefix)
  File "/home/user/os2d/baselines/detector_retrieval/evaluate_detector_retrieval.py", line 186, in evaluate
    visualizer.show_detections(boxes_one_image, image_id, dataloader, cfg_visualization, class_ids=None)
TypeError: show_detections() got multiple values for argument 'class_ids'

These are the changes in config.py file

cfg.visualization.eval.show_detections = True
cfg.visualization.eval.path_to_save_detections = "/home/user/os2d/baselines/detector_retrieval/gens"

This is how I'm running the evaluation

python main_detector_retrieval.py  --retrieval_multiscale  --maskrcnn_config_file detector/config/e2e_faster_rcnn_R_101_FPN_1x_multiscale_noClasses.yaml --maskrcnn_weight_file detector/output/exp0000-R-101-noCl-grozi/model_best.pth --retrieval_network_path retrieval/output/grozi/grozi-train-retrieval-rndCropPerImage10_resnet101_gem_whiten_contrastive_m0.85_adam_lr1.0e-06_wd1.0e-04_nnum5_qsize2000_psize20000_bsize32_imsize240/model_best.pth.tar --retrieval_image_size 240 is_cuda True eval.dataset_names "[\"grozi-val-new-cl\"]" eval.dataset_scales "[1280.0]" eval.mAP_iou_thresholds "[0.5]"

Thanks!