The implementation for this issue on detectron2
This python code uses detectron2 to perform instance segmentation on images, and these predictions are converted to labels/annotations in COCO JSON format
add your COCO JSON path and file name, as to where the files is located or has to be stored add your image/images ( use loop to call the main function, multiple times for multiple images ) path
all the changes related to output and input files and data should be made in detectToLabelConverter.py file

