-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Custom Dataset for tracking #1030
Comments
I really recommend you to switch to this branch: #959 for evaluation on multi-class datasets. Trackeval is not design for being flexible with respect to which dataset is evaluated. The only reason it is still used in this repo is that the current main MOT metric, HOTA, is not available anywhere else. |
This may help you out: #927 😄 |
Hi, I appreciate your response a lot! I realise I have made an error! I realised that I don't need multiclass detection since I only have cows being detected. Therefore, I used the default yolo model. Since that is trained on the COCO dataset, I specified str(19) in val.py for classes
I changed the mot_challenge_2d_box.py as follows,
I ran the following command
Then I got the following error. I deleted some of the tracking outputs but kept a handful for you to see that it repeated over all the CustomCow-01 and CustomCow-02 img1 files.
This time, I could see that it was tracking and it was able to detect cows. However, then it threw an error at the end because of invalid class. I did make changes in the mot_challenge_2d_box.py as I previously states. I made no changes to the run_mot_challenge.py file. Could you please advise? |
I trained a YOLOv8 model that only had one class - cow. My reasoning was that if it had only one type of detection then it wouldn't affect the multiclass issue. For this trial, I did not change the val.py or the mot_challenge_2d_box.py file. I ran the following code
I get the following error,
When I run it without the --yolo-model best_OnlyCow.pt,
it iterates over the files with no detections and then throws the error
It also iterates if I specify --classes 19
It iterates over the files and detects cows. Then it throws the error of only detecting pedestrian classes
I am currently going through issues #883 and #889 and they were very helpful. @mesllo-bc mentioned something that stuck out to me about the det.txt files for MOT20 and I have no idea what they are. Have you figured out how to get them? My next steps will be to fix my gt.txt files according to @Hunter-v1 's suggestion.
Should I just set my class_id to 1 to avoid the issue of only one class valid since I don't have multiple classes in my class? Would that simplify my work? I will continue to work on this comment. Just commenting now to keep you updated on where I am with this issue. |
👍
It is absolutely not production ready code. That is why I suggest you to try out |
👋 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. |
Search before asking
Question
Thank you so much for such a valuable repository!
I am trying to run the tracking on a custom dataset.
The dataset is from the following paper
Nguyen, C., Wang, D., Von Richter, K., Valencia, P., Alvarenga, F. A. P., & Bishop-Hurley, G. (2021). Video-based cattle identification and action recognition. 2021 Digital Image Computing: Techniques and Applications (DICTA), 01–05. https://doi.org/10.1109/DICTA52665.2021.9647417
I converted their JSON COCO annotation to MOT annotations. I followed the same structure suggested in the tutorial. I then put the folder under yolo_tracking/examples/val_utils/data
For added reproducibility, you can download the CustomCow MOT dataset that I created from this link
I also converted to YOLO annotations. I then trained my own YOLO model and added the weights as best_Chuong.pt. You can also find the weight here
I made the following changes to the mot_challenge_2d_box.py
I ran the following
Then I got this error message
I am confused why the only valid class is 'pedestrian' even after changing the mot_challenge_2d_box.py
I also created seqinfo.ini files for each CustomCow-0X folder. I wonder why
SEQ_INFO : {'CustomCow-01': None, 'CustomCow-02': None}
One possible issue:
You had mentioned
In the current val.py, it doesn't specify str(0) so I just left it as is. Would this be here I went wrong as well?
I would greatly appreciate any insight!
The text was updated successfully, but these errors were encountered: