Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About MOT dataset PREV #129

Open
Tsai-chia-hsiang opened this issue Aug 11, 2024 · 4 comments
Open

About MOT dataset PREV #129

Tsai-chia-hsiang opened this issue Aug 11, 2024 · 4 comments

Comments

@Tsai-chia-hsiang
Copy link

At

prev_frame_id = random.randint(
max(0, frame_id - self._prev_frame_range),
min(frame_id + self._prev_frame_range, self.seq_length(idx) - 1))
prev_image_id = self.coco.imgs[idx]['first_frame_image_id'] + prev_frame_id

Here, I would like to ask why the prev_frame_id needs may take the subsequent frame ID.
For example:

frame_id = 90 and self._prev_frame_range = 5 and self.seq_length = 100

and the

prev_frame_id =  random.randint( max(0, 90-5), min(90+5, 100) ) 

It will become random.randint(85, 95) and can generate prev_frame_id = 91 and it is actually the next frame.

In the next few lines

prev_img, prev_target = self._getitem_from_id(prev_image_id, random_state)
target[f'prev_image'] = prev_img
target[f'prev_target'] = prev_target

It seems that it didn't deal with the relationship between preceding and subsequent frames, and keys in ``target` ' also don't provide the frame number information.

Why the prev_image and prev_target may be the information about the later frame while it is named PREVIOUS?

Thanks.

@Maxvgrad
Copy link

I also found this piece of code confusing. There's another edge case that might result in the same frame_id as the current one.

I'm curious if it's an issue to have a future or identical frame as the previous frame.

I would also be interested in the rationale behind this code.

Cheers!

@userkw2
Copy link

userkw2 commented Aug 17, 2024

hi @Maxvgrad I want to use TrackFormer for multi-object tracking with my own dataset. According to the instructions, I need to create a COCO-style annotation file and extend it with fields like seq_length, first_frame_image_id, and track_id for multi-object tracking. I'm unsure how to prepare my dataset with these extensions and how to use the generate_coco_from_mot.py script. Could you guide me on how to structure my dataset and generate the necessary COCO-style annotations for TrackFormer?

@Maxvgrad
Copy link

Maxvgrad commented Aug 19, 2024

@Tsai-chia-hsiang btw it seems like this logic is mentioned in the paper

The frame t − 1 for step (i) is sampled from a range of frames around frame t, thereby generating challenging frame pairs where the objects have moved substantially from their previous position. Such a sampling allows for the simulation of camera motion and low frame rates from usually benevolent sequences.

@Tsai-chia-hsiang
Copy link
Author

Oh, ok, I see.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants