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

Cannot Reproduce the MOT17 Scores #1156

Closed
1 task done
emirhanbayar opened this issue Oct 21, 2023 · 26 comments
Closed
1 task done

Cannot Reproduce the MOT17 Scores #1156

emirhanbayar opened this issue Oct 21, 2023 · 26 comments
Labels
question Further information is requested Stale

Comments

@emirhanbayar
Copy link

Search before asking

  • I have searched the Yolo Tracking issues and found no similar bug report.

Question

Hello,

I encounter an inconsistency between your implementation's HOTA scores and those stated in the paper of StrongSORT.

Setup:
Tracker: StrongSORT (did not change any parameter)
Detections: from https://drive.google.com/drive/folders/1Zk6TaSJPbpnqbz1w4kfhkKFCEzQbjfp_?usp=sharing
Re-ID: osnet_x0_25_msmt17.pt

HOTA scores after running your implementation:
MOT-17-Train: 63.8
MOT-17-Test: 59.69

HOTA scores claimed in the original paper:
MOT-17-Train: 68.2 (StrongSORT v4 in Table 1)
MOT-17-Test: 63.5 (StrongSORT online in Table 4)

I suspected this results from using a different Re-ID and switched to using features provided by the authors of StrongSORT. However, this even reduced the HOTA score on the MOT-17-Train.

Do you have any idea why this is happening? I would appreciate any comment on this.

Thanks in advance.

@emirhanbayar emirhanbayar added the question Further information is requested label Oct 21, 2023
@emirhanbayar emirhanbayar changed the title Cannot Reproduce the MOT17-Test Scores Cannot Reproduce the MOT17 Scores Oct 21, 2023
@mikel-brostrom
Copy link
Owner

Thank you for sharing these experiment results @emirhanbayar

Do you have any idea why this is happening?

I have not checked the config parameters for StrongSORT in a long time, I suggest you to start there

Re-ID: osnet_x0_25_msmt17.pt

According to my OSNet experiments osnetx1_0_dukemtcereid.pt should perform the best on MOT17.

Copy link

github-actions bot commented Nov 1, 2023

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

@github-actions github-actions bot added the Stale label Nov 1, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 5, 2023
@luke110
Copy link

luke110 commented Nov 23, 2023

询问前先搜索

  • 我搜索了 Yolo Tracking问题,没有发现类似的错误报告。

问题

你好,

我发现您的实现的 HOTA 分数与 StrongSORT 论文中所述的分数不一致。

设置: 跟踪器:StrongSORT(未更改任何参数) 检测:来自https://drive.google.com/drive/folders/1Zk6TaSJPbpnqbz1w4kfhkKFCEzQbjfp_?usp=sharing 重新 ID:osnet_x0_25_msmt17.pt

运行实施后的 HOTA 分数: MOT-17-Train:63.8 MOT-17-Test:59.69

原论文中声称的 HOTA 分数: MOT-17-Train:68.2(表 1 中的 StrongSORT v4) MOT-17-Test:63.5(表 4 中的 StrongSORT online)

我怀疑这是由于使用不同的 Re-ID 造成的,因此转而使用 StrongSORT 作者提供的功能。然而,这甚至降低了 MOT-17-Train 的 HOTA 分数。

您知道为什么会发生这种情况吗?如果对此有任何评论,我将不胜感激。

提前致谢。

Search before asking

  • I have searched the Yolo Tracking issues and found no similar bug report.

Question

Hello,

I encounter an inconsistency between your implementation's HOTA scores and those stated in the paper of StrongSORT.

Setup: Tracker: StrongSORT (did not change any parameter) Detections: from https://drive.google.com/drive/folders/1Zk6TaSJPbpnqbz1w4kfhkKFCEzQbjfp_?usp=sharing Re-ID: osnet_x0_25_msmt17.pt

HOTA scores after running your implementation: MOT-17-Train: 63.8 MOT-17-Test: 59.69

HOTA scores claimed in the original paper: MOT-17-Train: 68.2 (StrongSORT v4 in Table 1) MOT-17-Test: 63.5 (StrongSORT online in Table 4)

I suspected this results from using a different Re-ID and switched to using features provided by the authors of StrongSORT. However, this even reduced the HOTA score on the MOT-17-Train.

Do you have any idea why this is happening? I would appreciate any comment on this.

Thanks in advance.

How did you train to get your own weight file?

@emirhanbayar
Copy link
Author

I did not train anything. If you mean the reID weight file (osnet_x0_25_msmt17.pt). I chose it from the ones that are listed at: https://github.com/mikel-brostrom/yolo_tracking/blob/master/boxmot/appearance/reid_model_factory.py

@mikel-brostrom
Copy link
Owner

First of all. Which detector are you using?

@emirhanbayar
Copy link
Author

MOT17 train detections from: https://drive.google.com/drive/folders/1zzzUROXYXt8NjxO1WUcwSzqD-nn7rPNr
MOT17 test detections from: https://drive.google.com/drive/folders/16oC71eiWhDe5wJaYOyWkgE3h-zq2WGgi

The authors say that they used YOLOX.

@mikel-brostrom
Copy link
Owner

MOT17 train detections from: https://drive.google.com/drive/folders/1zzzUROXYXt8NjxO1WUcwSzqD-nn7rPNr MOT17 test detections from: https://drive.google.com/drive/folders/16oC71eiWhDe5wJaYOyWkgE3h-zq2WGgi

The authors say that they used YOLOX.

Ok. Then you are using the right detections 😄.

  • What MOTA and IDF1 scores do you get?
  • Have you fine-tuned the parameters?

@emirhanbayar
Copy link
Author

emirhanbayar commented Nov 23, 2023

  • What MOTA and IDF1 scores do you get?

I had recorded the following results:
MOT17 train: HOTA: 68.3, MOTA: 66.619, IDF1: 73.868
MOT17 test: HOTA: 59.69, MOTA: 71.54, IDF1: 73.63

I newly ran the code with the following parameters:
model_weights: osnet_x0_25_msmt17.pt
max_dist: 0.2
max_iou_dist: 0.7
max_age: 30
n_init: 1
nn_budget: 100
mc_lambda: 0.995
ema_alpha: 0.9

And got the following result:
MOT17 train: HOTA: 64.033, MOTA: 66.365, IDF1: 74.329

  • Have you fine-tuned the parameters?

No.

@mikel-brostrom
Copy link
Owner

@emirhanbayar
Copy link
Author

emirhanbayar commented Nov 23, 2023

https://drive.google.com/drive/folders/1wdG-vJOMGynf5QjqEa1jNZNYtz0PQqPu

I had already modified the ground truth accordingly. Now, I downloaded them from the link that you shared. The result is exactly the same.

An update: I fed both detections and features that are shared by the authors of StrongSORT as input and kept the same parameters as in your implementation. On the MOT17 train, I got:

HOTA: 63.105
MOTA: 66.354
IDF1: 71.77

Changed parameters as in the original implemenataion of StrongSORT:
max_dist=0.4,
max_iou_dist=0.7,
max_age=30,
n_init=1,
nn_budget=100,
mc_lambda=0.98,
ema_alpha=0.9,

Then, on the MOT17 train, I got:

HOTA: 65.353
MOTA: 66.758
IDF1: 76.239

I am not sure. Maybe, I am making a mistake. You can inspect how I modified your implementation by looking at my fork at: https://github.com/emirhanbayar/yolo_tracking

To run the code:

  1. Place MOT17 into the folder named data
  2. Remove all the sequences in the MOT17 that end with -DPM or -SDP. Only the ones that end with -FRCNN should remain.
  3. Download detections from https://drive.google.com/drive/folders/1zzzUROXYXt8NjxO1WUcwSzqD-nn7rPNr
  4. Place detections into the folder named MOT17_train_dets
  5. Run python run.py --tracker strongsort
  6. The results will be saved into the folder named results

@github-actions github-actions bot removed the Stale label Nov 24, 2023
@mikel-brostrom
Copy link
Owner

mikel-brostrom commented Nov 24, 2023

Great! We are getting closer... 😄

MOT-17 hota
paper implementation 68.2
boxmot 65.4

You can now try osnetx1_0_dukemtcereid.pt. It is the best lightweight performant model for MOT17 on this repo (https://github.com/mikel-brostrom/yolo_tracking/wiki/OSNet-architecture-performances-on-MOT16). I think this will lead to a result very close to the paper 😄. Notice you won't get the paper result as we are not using the exact same ReID model.

@emirhanbayar
Copy link
Author

Notice you won't get the paper result as we are not using the exact same ReID model.

Actually, hota 65.4 is obtained by feeding reid features from the ones that pre-extracted and shared by authors of StrongSORT. Neither detector nor thr reID model is used from boxmot.

@mikel-brostrom
Copy link
Owner

I am unfamiliar with this data

MOT17 train detections from: https://drive.google.com/drive/folders/1zzzUROXYXt8NjxO1WUcwSzqD-nn7rPNr MOT17 test detections from: https://drive.google.com/drive/folders/16oC71eiWhDe5wJaYOyWkgE3h-zq2WGgi

The authors say that they used YOLOX.

Are the features normalized?

@emirhanbayar
Copy link
Author

Sorry for the late reply. The entries are generally between -2 and 4. Some examples of distributions of the feature vectors from the detections from MOT17 sequence 2:

135

152

You can see the distributions for each of the detections at: https://drive.google.com/file/d/1Ef8zms1Ph5JOn5kRjpRYc7kdYHIe3lCw/view?usp=sharing

@mikel-brostrom
Copy link
Owner

I just noticed that the MOTA score (66.354) you get is quite low compared to the reported one (77.0). This could be due to some misconfiguration in the Kalman Fillter. You could try importing the official one and that one instead.

@mikel-brostrom
Copy link
Owner

Aaand you need to normalize the embeddings for better IDF1 results 😄

@lvfengkun
Copy link

Hi,guys,I have partially addressed your issue by setting "track.time_since_update" of "strong_sort" to >2, resulting in an HOTA of 68.184 on MOT17. The deviation from the results in the paper is less than 1, indicating that there is still room for optimization. The reason why adjusting "time_since_update" proves to be effective in enhancing HOTA is currently under exploration. If you have any findings on this matter, I would appreciate the opportunity for further discussion.

@lvfengkun
Copy link

https://drive.google.com/drive/folders/1wdG-vJOMGynf5QjqEa1jNZNYtz0PQqPu

I had already modified the ground truth accordingly. Now, I downloaded them from the link that you shared. The result is exactly the same.

An update: I fed both detections and features that are shared by the authors of StrongSORT as input and kept the same parameters as in your implementation. On the MOT17 train, I got:

HOTA: 63.105 MOTA: 66.354 IDF1: 71.77

Changed parameters as in the original implemenataion of StrongSORT: max_dist=0.4, max_iou_dist=0.7, max_age=30, n_init=1, nn_budget=100, mc_lambda=0.98, ema_alpha=0.9,

Then, on the MOT17 train, I got:

HOTA: 65.353 MOTA: 66.758 IDF1: 76.239

I am not sure. Maybe, I am making a mistake. You can inspect how I modified your implementation by looking at my fork at: https://github.com/emirhanbayar/yolo_tracking

To run the code:

  1. Place MOT17 into the folder named data
  2. Remove all the sequences in the MOT17 that end with -DPM or -SDP. Only the ones that end with -FRCNN should remain.
  3. Download detections from https://drive.google.com/drive/folders/1zzzUROXYXt8NjxO1WUcwSzqD-nn7rPNr
  4. Place detections into the folder named MOT17_train_dets
  5. Run python run.py --tracker strongsort
  6. The results will be saved into the folder named results

You have to comment out the part from if tlwh[0] < 0: to tlwh[1] = 0, I'm not sure why you want to do this, but no doubt this reduces HOTA

@mikel-brostrom
Copy link
Owner

Hi,guys,I have partially addressed your issue by setting "track.time_since_update" of "strong_sort" to >2, resulting in an HOTA of 68.184 on MOT17. The deviation from the results in the paper is less than 1, indicating that there is still room for optimization. The reason why adjusting "time_since_update" proves to be effective in enhancing HOTA is currently under exploration. If you have any findings on this matter, I would appreciate the opportunity for further discussion.

https://github.com/mikel-brostrom/yolo_tracking/blob/eecf37a22175c20526e70e30d8f0dfe8a2c96a09/boxmot/trackers/strongsort/strong_sort.py#L84C1-L84C73

@lvfengkun
Copy link

Hi,guys,I have partially addressed your issue by setting "track.time_since_update" of "strong_sort" to >2, resulting in an HOTA of 68.184 on MOT17. The deviation from the results in the paper is less than 1, indicating that there is still room for optimization. The reason why adjusting "time_since_update" proves to be effective in enhancing HOTA is currently under exploration. If you have any findings on this matter, I would appreciate the opportunity for further discussion.

https://github.com/mikel-brostrom/yolo_tracking/blob/eecf37a22175c20526e70e30d8f0dfe8a2c96a09/boxmot/trackers/strongsort/strong_sort.py#L84C1-L84C73

yeah, that's it, change >= to >

@mikel-brostrom
Copy link
Owner

mikel-brostrom commented Dec 15, 2023

Just intuition here. Have not tested any of this. I believe this will cause to output the last detected bbox for 2 frames more. So when a track fails in associating with a detection, the last detected bbox will be output'ed anyways instead of not giving an output at all. Could be beneficial for when the track is lost for a few frames. Let me know if you experiment with this idea!

@lvfengkun
Copy link

lvfengkun commented Dec 15, 2023 via email

@lvfengkun
Copy link

lvfengkun commented Dec 15, 2023 via email

@mikel-brostrom
Copy link
Owner

mikel-brostrom commented Dec 16, 2023

Hi,guys,I have partially addressed your issue by setting "track.time_since_update" of "strong_sort" to >2, resulting in an HOTA of 68.184 on MOT17. The deviation from the results in the paper is less than 1, indicating that there is still room for optimization. The reason why adjusting "time_since_update" proves to be effective in enhancing HOTA is currently under exploration. If you have any findings on this matter, I would appreciate the opportunity for further discussion.

I believe the remaining performance increase can be easily obtained by fine-tuning.

@mikel-brostrom
Copy link
Owner

mikel-brostrom commented Dec 22, 2023

I have also noticed that modifying track.time_since_update >= 1 leads to errors due to the detection filtering based on tracking results arising here:

https://github.com/ultralytics/ultralytics/blob/38eaf5e29f2a269ee50de659470c91ae44bb23f8/ultralytics/trackers/track.py#L64-L66

For making predictions ahead some modifications are needed

Copy link

github-actions bot commented Jan 2, 2024

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

@github-actions github-actions bot added the Stale label Jan 2, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale
Projects
None yet
Development

No branches or pull requests

4 participants