kamkyu94 / Fast_Online_MTMCT

Fast online multi-target multi-camera tracking for vehicles
https://github.com/kamkyu94/Fast_Online_MTMCT
10 stars 0 forks source link

How to do Temporal alignment? #2

Closed yjl326 closed 2 months ago

yjl326 commented 3 months ago

` temp_align = {} for cam in cams: temp_align[cam] = {} for i in range(0, np.max(f_nums) + 1):

Default

        temp_align[cam][i] = 0

        # Set for each camera
        if cam == 'c006':
            temp_align[cam][i] = i

        elif cam == 'c007':
            if i <= 1037:
                temp_align[cam][i] = i + 1
            elif 1040 <= i <= 1309:
                temp_align[cam][i] = i - 1
            elif 1320 <= i <= 1339:
                temp_align[cam][i] = i - 11
            elif 1350 <= i <= 1379:
                temp_align[cam][i] = i - 21
            elif 1400 <= i <= 1449:
                temp_align[cam][i] = i - 41
            elif 1460 <= i <= 1499:
                temp_align[cam][i] = i - 51
            elif 1510 <= i <= 1537:
                temp_align[cam][i] = i - 61
            elif 1540 <= i <= 1542:
                temp_align[cam][i] = i - 63
            elif 1560 <= i <= 1609:
                temp_align[cam][i] = i - 80
            elif 1620 <= i <= 1639:
                temp_align[cam][i] = i - 90
            elif 1650 <= i <= 1864:
                temp_align[cam][i] = i - 100
            elif 1870 <= i <= 1893:
                temp_align[cam][i] = i - 105
            elif 1901 <= i <= 1920:
                temp_align[cam][i] = i - 112
            elif 1927 <= i <= 1933:
                temp_align[cam][i] = i - 118
            elif 1940 <= i <= 1989:
                temp_align[cam][i] = i - 124
            elif 2000 <= i <= 2049:
                temp_align[cam][i] = i - 134
            elif 2060 <= i:
                temp_align[cam][i] = i - 144

        elif cam == 'c008':
            if 7 <= i <= 421:
                temp_align[cam][i] = i - 6
            elif 439 <= i <= 472:
                temp_align[cam][i] = i - 23
            elif 479 <= i <= 548:
                temp_align[cam][i] = i - 29
            elif 603 <= i <= 685:
                temp_align[cam][i] = i - 83
            elif 728 <= i <= 925:
                temp_align[cam][i] = i - 125
            elif 934 <= i <= 1397:
                temp_align[cam][i] = i - 133
            elif 1401 <= i <= 1612:
                temp_align[cam][i] = i - 136
            elif 1621 <= i <= 1752:
                temp_align[cam][i] = i - 144
            elif 1763 <= i <= 1920:
                temp_align[cam][i] = i - 154
            elif 1958 <= i:
                temp_align[cam][i] = i - 191

        elif cam == 'c009':
            temp_align[cam][i] = i - 9`

Hello Dear Author, I would like to ask you some questions. I am trying to use your code on the S06 dataset of AIC22_Track1_MTMC_Tracking, but I am experiencing problems with temporal alignment. I would like to know how you implemented the time alignment, especially in terms of determining the time alignment of the image frames. I'm not very clear on the methodology and implementation of this, so I was hoping you could provide some guidance or explanation. Thank you very much for your help!

kamkyu94 commented 3 months ago

Hello.

For the temporal alignment, we manually checked the videos and set the adjusting parameters. More specifically, we aligned the frames of all other cameras based on c006 so that the tracking model can get the frames that share the same time zone as their inputs. Since the videos have slightly different start timings and sometimes have frame drops in the middle, we watched every video and manually set the adjusting parameters.

Thank you for your attention.