Example #1
0
def get_vcocoeval(args, imageset):
    return vsrl_eval.VCOCOeval(
        os.path.join(args.data_root, '..',
                     'v-coco/data/vcoco/vcoco_{}.json'.format(imageset)),
        os.path.join(args.data_root, '..',
                     'v-coco/data/instances_vcoco_all_2014.json'),
        os.path.join(args.data_root, '..',
                     'v-coco/data/splits/vcoco_{}.ids'.format(imageset)))
import __init__
import vsrl_eval as eva

if __name__ == '__main__':
    vcocoeval = eva.VCOCOeval('data/vcoco/vcoco_test.json',
                              'data/instances_vcoco_all_2014.json',
                              'data/splits/vcoco_test.ids')
    # todo need to change according to your own path
    this_output = '/path/to/detections/detections.pkl'
    vcocoeval._do_eval(this_output, ovr_thresh=0.5)
import vsrl_eval as eva
import argparse

#  python eval/eval_example.py --file
if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument("--file")

    vcocoeval = eva.VCOCOeval('eval/data/vcoco_test.json',
                              'eval/data/instances_vcoco_all_2014.json',
                              'eval/data/vcoco_test.ids')

    this_output = parser.parse_args().file
    vcocoeval._do_eval(this_output, ovr_thresh=0.5, mode=1)