YueLiao / CDN

Code for "Mining the Benefits of Two-stage and One-stage HOI Detection"
Apache License 2.0
89 stars 15 forks source link

the problem about the vcoco test #9

Closed ddwhzh closed 2 years ago

ddwhzh commented 2 years ago

could you please offer the data/v-coco/vsrl_eval.py file?

YueLiao commented 2 years ago

Please carefully check README, which indicates that you need to clone the v-coco repo from the official repo https://github.com/s-gupta/v-coco

chenyanyin commented 2 years ago

how to eval detection result with v-coco?

python generate_vcoco_official.py \
        --param_path pretrained/vcoco_cdn_s.pth \
        --save_path vcoco.pickle \
        --hoi_path data/v-coco \
        --dec_layers_hopd 3 \
        --dec_layers_interaction 3 \
        --use_nms_filter

cd data/v-coco
python vsrl_eval.py vcoco.pickle

but in v-coco, vsrl_eval.py is a func sets and not a main func. please check your eval code and steps. https://github.com/s-gupta/v-coco/blob/master/vsrl_eval.py

YueLiao commented 2 years ago

Sorry, we modified the vsrl_eval.py by adding the main function, but you could follow the official guide with the generated prediction to conduct an evaluation.

from vsrl_eval import VCOCOeval
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)