dyhBUPT / StrongSORT

[TMM 2023] StrongSORT: Make DeepSORT Great Again
GNU General Public License v3.0
746 stars 75 forks source link

What data is required to run generate_detections.py? #97

Closed mj2323 closed 9 months ago

mj2323 commented 10 months ago

First of all, thank you for your inspiring work.

My goal is to accquire the performance of StrongSORT with my own custom dataset. Therefore, I first tested your performance and confirmed that it matches the performance metrics in the presented paper. The performance is the experimental value for the MOT17 validation set.

image

After that, I checked your Auxiliary tutorial and realized that first of all, I need detection data (.json). Additionally, Re-ID data (.npy) must be obtained using detection information.

In conclusion, my questions are below:

I would like to ask what the two variables (dir_in_det, dir_out_det) mean in the code in this link.

I understand that I need to use the code from this link, but I'm not sure what the causal relationship is between the json file obtained from that code and the dir_in_det and dir_out_det variables.

('/data/dyh/results/StrongSORT/TEST/MOT20_YOLOX_nms.8_score.1', '/data/dyh/results/StrongSORT/TEST/MOT20_YOLOX_nms.8_score.1_BoT-S50')

Also, I would appreciate it if you could tell me what I need to do to get this data.

Sincerely,

dyhBUPT commented 10 months ago

Hi, thanks for your interest in our work. The dir_in_det is the directory of input detections, and dir_out_det is to save output features. Specifically, take MOT-test as an example, the dir_in_det directory should contain the following files:

- MOT17-01-FRCNN.txt
- MOT17-03-FRCNN.txt
- MOT17-06-FRCNN.txt
- MOT17-07-FRCNN.txt
- MOT17-08-FRCNN.txt
- MOT17-12-FRCNN.txt
- MOT17-14-FRCNN.txt

And each file contains all detections of the corresponding video, and the format is like:

1,-1,834.30,490.39,70.20,88.42,0.76,-1,-1,-1
1,-1,901.80,491.40,54.00,96.53,0.86,-1,-1,-1
2,-1,1091.47,501.19,78.30,108.68,0.42,-1,-1,-1
2,-1,147.83,482.63,52.65,124.87,0.11,-1,-1,-1

To obtain these files, you should write a script to convert the obtained detection json file to the required txt file.

I hope this will help you.

mj2323 commented 9 months ago

Thanks for your answer, Du. I was able to understand the overall content from your answer.

Lastly, I would like to ask you one more question. Just do I only convert json type to txt without converting the format in the data? Or do you provide code for the process of converting json to txt?

dyhBUPT commented 9 months ago

Yes, you don't need to convert the format of data. So it may be easy for you to write a converting script~

Best wishes.