lucasjinreal/yolov7_d2

How to perform inference for instance segmentation trained on custom data?

ankita-chatterjee opened this issue · 3 comments

I tried using my_demo.py using this command !python my_demo.py --config-file output/wall_yolomask1/config.yaml --input dataset/hyper_floorplan_datasets_old/tests/floorplan_68_solid_r90_flipn.jpg --output output/detected/1.jpg --opts MODEL.WEIGHTS output/wall_yolomask1/model_final.pth

I am getting detection images with coco dataset class names not my dataset class names

could you please help me?

yaml didn't contains any information about your dataset class names (inference will not read your annotation data as well).

You can manually edit demo.py in visualize sending your classes names to visualization func.

You might need to check "https://github.com/jinfagang/yolov7_d2/blob/main/demo.py#L139" with those calls of vis_bitmasks_with_classes().

According to the dependency "alfred", see "https://github.com/jinfagang/alfred/blob/main/alfred/vis/image/mask.py#L313", if no detected-class-name is given, then the original coco_label_map_list will be used.