Closed erliding closed 3 months ago
Your understanding is almost right, except for the meaning of t_fail
, which if True, means we failed to find a suitable t_id
. So this loop is to find the suitable t_id
. Thus, once T > t_id * frame_interval
, a suitable t_id
is found, and then we set t_fail
to False as we successfully find the t_id
, and break.
oh yeah, thanks for explanation :)
Dear Open-Sora,
i have a noob question, in the code https://github.com/hpcaitech/Open-Sora/blob/cdaa1d6c32fd00aed7e1ee2ae6087af5f650a78f/opensora/datasets/bucket.py#L102-L103 my understanding is
t_id * frame_interval
is the minimum required number of frames the video should have, such that after performing temporal crop, the remaining frames can match the t_id of the assigned bucket, if so it seems the code should be instead something like below or i might misunderstand something here?