chengche6230 / ReST

[ICCV 2023] ReST: A Reconfigurable Spatial-Temporal Graph Model for Multi-Camera Multi-Object Tracking
MIT License
130 stars 15 forks source link

Training Configuration for SG and TG #6

Closed yangchris11 closed 7 months ago

yangchris11 commented 7 months ago

Thank you for your exciting work and the source code!

I tried reproducing the result from scratch using the same YML config to train the SG and TG separately on Wildtrack.

However, during the inference stage, it will become prolonged and produce unsatisfactory results as there are no edge predictions with a score> 0.9; therefore, all nodes will be retained after the SG predicting stage.

2023-11-13 19:12:40.077 | INFO     | src.tracker:__init__:49 - Detection: gt
2023-11-13 19:12:40.081 | INFO     | src.tracker:load_param:73 - Load Spatial Graph param from ./logs/ckpts/train-Wildtrack-sequence1-SG-1699763424/Wildtrack_sequence1_SG_epoch82.pth
2023-11-13 19:12:40.084 | INFO     | src.tracker:load_param:84 - Load Temporal Graph param from ./logs/ckpts/train-Wildtrack-sequence1-TG-1699690050/Wildtrack_sequence1_TG_epoch70.pth
...
2023-11-13 19:12:53.803 | INFO     | src.datasets.dataset:__getInference__:312 - Loaded graph with 94 nodes and 7462 edges.
2023-11-13 19:12:53.986 | INFO     | src.utils.tracklet:postprocessing_sg:133 - Post-processing done, removed 0 edges. Graph: 94 nodes, 0 edges.
2023-11-13 19:12:54.020 | INFO     | src.tracker:_test_one_epoch:230 - Iteration 0: Spatial Graph done.SG: 94 nodes and 0 edges.
2023-11-13 19:12:54.021 | INFO     | src.tracker:_test_one_epoch:261 - 【Finished inference iteration 0/39】
... stuck after 3 iteration or so

I tried to use the SG weights released by the author in this repository and the TG weights trained by myself and got the following results with gt detection, which is comparable :

2023-11-14 10:57:12.041 | INFO     | src.datasets.dataset:__getInference__:312 - Loaded graph with 94 nodes and 7462 edges.
2023-11-14 10:57:12.387 | INFO     | src.utils.tracklet:postprocessing_sg:134 - SG Post-processing done, removed 0 edges. Graph: 94 nodes, 225 edges.
2023-11-14 10:57:12.429 | INFO     | src.tracker:_test_one_epoch:230 - Iteration 0: Spatial Graph done.SG: 17 nodes and 0 edges.
2023-11-14 10:57:12.430 | INFO     | src.tracker:_test_one_epoch:261 - 【Finished inference iteration 0/39】
...
2023-11-14 10:56:56.618 | INFO     | src.tracker:__init__:49 - Detection: gt
2023-11-14 10:56:56.622 | INFO     | src.tracker:load_param:73 - Load Spatial Graph param from ./logs/ckpts/Wildtrack_sequence1_SG_epoch92_train90.pth
2023-11-14 10:56:56.645 | INFO     | src.tracker:load_param:84 - Load Temporal Graph param from ./logs/ckpts/train-Wildtrack-sequence1-TG-1699690050/Wildtrack_sequence1_TG_epoch70.pth
...

         IDF1   IDP   IDR   Rcll   Prcn  GT  MT PT ML FP FN IDs  FM  MOTA  MOTP IDt IDa IDm
0       91.0% 91.2% 91.0% 100.0% 100.0%  38  38  0  0  0  0  29   0 96.7% 0.000  12  20   4
1       93.1% 93.3% 93.1% 100.0% 100.0%  35  35  0  0  0  0  22   0 97.3% 0.001  10  14   4
2       91.8% 91.9% 91.8% 100.0% 100.0%  40  40  0  0  0  0  27   0 97.0% 0.000  10  20   4
3       83.2% 83.2% 83.2% 100.0% 100.0%  20  20  0  0  0  0  16   0 94.0% 0.000   4  12   0
4       97.2% 97.3% 97.2% 100.0% 100.0%  36  36  0  0  0  0  11   0 98.4% 0.000   6   7   4
5       89.7% 89.9% 89.7% 100.0% 100.0%  39  39  0  0  0  0  32   0 96.5% 0.000  13  22   4
6       94.6% 94.8% 94.6% 100.0% 100.0%  25  25  0  0  0  0  15   0 97.5% 0.001   5  10   2
OVERALL 92.1% 92.3% 92.1% 100.0% 100.0% 233 233  0  0  0  0 152   0 97.0% 0.000  60 105  22

Therefore I am curious if the training step or configuration of SG is different from TG? Thanks!

chengche6230 commented 7 months ago

Hi,

Once the inference stage becomes prolonged and all edges are removed, the training of SG(or TG) has failed. As described in the paper, the training process of both graphs is separated and independent. Spatial graph usually has fewer training data than Temporal graph, leading to potentially poor performance. You can add some data augmentation methods during the training of SG.

yangchris11 commented 7 months ago

Thank you for the replies 🙇 closing the issue

keqizero commented 3 months ago

Hi,

I also faced the same problem with Wildtrack dataset, where the training of SG has failed. Did you find a solution?