I've been given a trained mask r-cnn model with .pth checkpoint file and .py config files, and I'm able to perform the object segmentation on a video using the general tutorial. https://mmdetection.readthedocs.io/en/latest/1_exist_data_model.html
I'm trying to convert the result of the segmentation to coco format in json so I can insert it into my pipeline. To specify: I need the result of the inference detector to be transformed to a json file in coco format. Code from demo/video_demo from mmdetection github repo:
I have found a possible solution here: https://mmdetection.readthedocs.io/en/latest/api.html#module-mmdet.datasets . where the results2json function would dump the result of the segmentation (+ bbox etc.) to a coco json file but I should be making an instance of a CocoDataset to use this function. I don't have a json file with annotations, let alone a pipline? (check the arguments to create one).
How could I still generate the coco format json file using the results of the segmentation? Thanks in advance.