trackformer icon indicating copy to clipboard operation
trackformer copied to clipboard

Train on custom dataset

Open Arashzarindast opened this issue 3 years ago • 3 comments

Dear author, I am trying to train your model on my custom dataset i am using following command !python src/train.py with deformable tracking resume=r50_deformable_detr-checkpoint.pth output_dir=models/custom_dataset_train_deformable mot_path=data/custom_dataset train_split=train val_split=val epochs=20 i get following error message

frame_id = self.coco.imgs[idx]['frame_id'] KeyError: 'frame_id'

Arashzarindast avatar Feb 01 '22 22:02 Arashzarindast

I think you should convert your own dataset to COCO-style first, so you can get the key of 'frame_id'

JackWoo0831 avatar Mar 06 '22 01:03 JackWoo0831

Hi @atousaz, Check your dataset. It might have the key 'image_id', instead of 'frame_id'. Some tools can do that. Such as CocoAnnotation.

Abrahamon avatar Apr 21 '22 04:04 Abrahamon

There is a difference between image_id and frame_id. Please check the generate_coco_from_mot.py to understand each field. The latter does not exist in the original COCO annotations and is related to the position of the image as a frame in a video sequence.

timmeinhardt avatar Apr 21 '22 11:04 timmeinhardt