hikvision-research / opera

A Unified Toolbox for Object Perception & Application
Apache License 2.0
139 stars 12 forks source link

Inference own images #13

Closed Riverzxz closed 1 year ago

Riverzxz commented 1 year ago

Hello author, thank you for your contribution. In model inference and testing, the coco dataset is used, and the json file of coco is required, so how can I test and infer my own image? Hope to get your help

marsgravity commented 1 year ago

Thanks for your suggestion. We have provided image_demo to infer your own image, and you can use it like python /opera/demo/image_demo.py ${img_path} /opera/config/petr/petr_r50_16x2_100e_coco.py petr_r50_16x2_100e_coco.pth --out-file ${new_path}