MCG-NJU / MOTIP

Multiple Object Tracking as ID Prediction
https://arxiv.org/abs/2403.16848
Apache License 2.0
90 stars 8 forks source link

训练自己的数据集 #27

Closed caoxh428 closed 1 month ago

caoxh428 commented 1 month ago

您好,我最近开始做追踪任务,想知道我想训练自己的数据集,可以参考哪个代码?生成模型需要的数据格式呢?

HELLORPG commented 1 month ago

你的数据集的标注格式是什么呢?一般来说在 MOT 这边常用的标注格式是 MOTChallenge 和 COCO 两种,不知道你用的是哪种。

caoxh428 commented 1 month ago

我的是coco,有点搞不明白,video和frame序号是怎么处理的,

HELLORPG commented 1 month ago

对于 COCO 格式的 MOT 数据集,我也不太了解,因为我目前常用的 MOT Datasets 都不是 COCO 格式下的,在公开的转换代码中,貌似也只有将 MOTChallenge Format 转换成 COCO Format 的代码。

或许你可以考虑参考一下 DanceTrack 数据集格式,如果你能将你数据集的格式转化成为 DanceTrack 所用的格式的话(也是 MOTChallenge 格式的一种),就可以直接使用 DanceTrack 的数据加载进行简单修改就可以了。

caoxh428 commented 1 month ago

十分感谢您的回复,我试试

HELLORPG commented 1 month ago

不用谢,有问题再交流。

caoxh428 commented 1 month ago

您好,我在用您的模型去训练自己的数据集,下载了预训练权重文件,但是在MOTIP初始化那里,build_deformable_detr一直提示downloading ***resnet20-11ad3fa6.pth 这是我下载的文件有问题,还是我哪里没有配置对呢?

HELLORPG commented 1 month ago

这应该是因为在代码中使用了 ResNet-50 的预训练结果,需要从 pytorch 官方自动吸在,你的机器是没有联网吗?

caoxh428 commented 1 month ago

是的,我单独下载了这个权重,现在可以跑了,另外 我想要torch1.12.0跑训练模型,这个可以跑吗?

HELLORPG commented 1 month ago

目前代码中有一处应该是只支持 torch >= 2.0 的环境,如下所示: https://github.com/MCG-NJU/MOTIP/blob/55e108c0beaaa67d1979cc6f8c6ccdb0c28a48f4/models/id_decoder.py#L194 我目前手里没有更低的 torch 环境,但是我如果没有记错的话,这里应该是关于某个 mask 的设置在 2.0 和之前的版本之间有不同。你直接运行的话应该是会报错的,修改掉报错就可以运行了。

caoxh428 commented 1 month ago

好嘞 感谢,我在跑代码时候,GPU显存持续增加,直到cuda out of memory,我的显卡是12G显存,我按照你那里说的设置了值为1,感觉还是跑不了哎

HELLORPG commented 1 month ago

多少个 iteration 之后会 CUDA OOM?还是说第一个 iteration 都过不了。

caoxh428 commented 1 month ago

我bs1 大概第一个epoch中300-400个iteration会cuda oom

HELLORPG commented 1 month ago

方便把你运行之后导出的 config.yaml 上传我看一下?

HELLORPG commented 1 month ago

似乎因为你 QQ @.***

caoxh428 @.***> 于2024年8月24日周六 01:07写道:

得周一了 或者方便+qq?我到时候发您 github还是用着不是很方便(1021863362

— Reply to this email directly, view it on GitHub https://github.com/MCG-NJU/MOTIP/issues/27#issuecomment-2307483787, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ7F6X2RUNAB5LJ5BDXH423ZS5T6HAVCNFSM6AAAAABM5MGGTCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBXGQ4DGNZYG4 . You are receiving this because you commented.Message ID: @.***>

-- RPG