用于标注多目标追踪视频数据的工具,使用Qt编写
视频数据主要用于多目标追踪中,与目标检测不同,用于训练追踪模型的数据最重要的是目标的ID号(若某一帧中某目标被标为1号,在所有的视频帧中都应为1号),目前现成的数据集有行人追踪的MOT Challenge,车辆追踪的UA-DETRAC,如果要追踪其他类型目标需要自己采集并标注。所以自己编写了一个工具
进行标注之前先要用检测器检测到每一帧中的所有目标,并将检测结果按照MOT的格式保存到txt文件中,检测结果保存的格式为: 帧号,ID号,边界框左上顶点横坐标,边界框左上顶点纵坐标,边界框宽度,边界框高度,置信度
帧号即图片的编号;ID号表示该目标的轨迹号,检测结果中统一都为设置为-1,我们程序要标注的就是这个参数。
此程序生成的标注完全参照MOT的格式,所以图片的目录格式也要遵从MOT,具体操如下:新建一个目录,名称可以任意,里面再新建两个子目录命名为det和img1,两个子目录的名称不能错,否则程序读取不到图片和检测结果,将保存检测结果的文件命名为det.txt,放到det目录,需要标注的图片放到img1目录。
现在开始标注目标的ID即轨迹号,鼠标所在的位置边界框内会变成绿色,左上角的下拉框内可以选择要标注的ID号,默认为0(建议每一张只标一个,按D键切换下一张,A切换上一张,直到把所有的图片都标完,这样可以节省时间)一张图片的目标的目标ID号不能重复,否则程序提示错误,如果不小心标错了,也可以点右键删除或修改。
如果出现检测器漏检的情况,可以手动画框,点击Draw,可以手动画框,画完后点Click退出,手动画的框可以删除,根据检测结果画的框不能删除,这是程序的一个不足这处,后面会陆续改
将所有的图片标注完后点Save会将结果保存到当前目录的gt子目录下,并命名为gt.txt,保存格式同样为MOT官方格式.