dbolya / yolact

A simple, fully convolutional model for real-time instance segmentation.
MIT License
5k stars 1.33k forks source link

output coco json for Video #532

Open kaiguy23 opened 3 years ago

kaiguy23 commented 3 years ago

I was wondering if it is possible to output the bbox_det_file and the mask_det_file when running yolact on a video.

I tried the following command line calls without any luck:

python eval.py --trained_model=weights/yolact_base_54_800000.pth --output_coco_json --video_multiframe=4 --video=input_video.mp4:output_video.mp4

python eval.py --trained_model=weights/yolact_base_54_800000.pth --output_web_json --video_multiframe=4 --video=input_video.mp4:output_video.mp4

I could alternatively convert each frame of the video into images, create a custom dataset of those images, and then use YOLACT on each image. However, this seems like an unnecessary process to go through.

Thanks, Kai

davodogster commented 3 years ago

@KaiKaneshina did you figure it out? I'm also interested

kaiguy23 commented 3 years ago

Not yet unfortunately. I ended up just saving out each frame of the video as a png then feeding those into yolact to process. Inefficient but it works

areebsyed commented 3 years ago

Not yet unfortunately. I ended up just saving out each frame of the video as a png then feeding those into yolact to process. Inefficient but it works

Hi @KaiKaneshina I was wondering if you could tell me how you extracted the mask contour points of the detected polygons from an image? I tried these commands and I was expecting that the output would be a JSON file with the contour coordinates. Note: not talking about the bbox (rectangle) coordinates.