【发布时间】:2021-06-12 02:31:06
【问题描述】:
我已经获得了一个训练有素的掩码 r-cnn 模型,其中包含 .pth 检查点文件和 .py 配置文件,并且我能够使用通用教程对视频执行对象分割。 https://mmdetection.readthedocs.io/en/latest/1_exist_data_model.html 我正在尝试将分段结果转换为 json 中的 coco 格式,以便将其插入到我的管道中。指定:我需要将推理检测器的结果转换为 coco 格式的 json 文件。来自 mmdetection github repo 的 demo/video_demo 的代码:
我在这里找到了一个可能的解决方案:https://mmdetection.readthedocs.io/en/latest/api.html#module-mmdet.datasets。 results2json 函数会将分割结果(+ bbox 等)转储到 coco json 文件中,但我应该制作 CocoDataset 的实例以使用此函数。我没有带注释的 json 文件,更不用说管道了? (检查参数以创建一个)。
如何仍然使用分割的结果生成 coco 格式的 json 文件? 提前致谢。
【问题讨论】:
标签: python mask image-segmentation faster-rcnn