AlbertoSabater / Robust-and-efficient-post-processing-for-video-object-detection

GNU General Public License v3.0
146 stars 20 forks source link

REPP with one class #8

Closed Adrian398 closed 3 years ago

Adrian398 commented 3 years ago

Have you any ideas or comments in case I am only having one class? Should it work the same or can I get better detections if I change something in your code if I only have one class?

AlbertoSabater commented 3 years ago

Hi Adrian. I haven't tested, but REPP should work properly with a single class. In this case, the vector of class scores for each detection must have just size 1. Detections should be re-scored or suppressed the same way as when working with multiple classes. No update of the method should be done. Let me know how REPP performs in the single-class problem if you test it :)

Adrian398 commented 3 years ago

Hi Alberto, Thank you for your answer it works fine! :) I have trouble with selecting the right hyperparameters. I am using the new yolov5 repo (https://github.com/ultralytics/yolov5) together with your implementation. I do not really understand why for yolov3 you set the clf_thr to 0.7 and the other thresholds to 0.005. As I understand it the min_pred_score is the most important threshold as this is filtering the whole tublets. Why are you already filtering on the pairs and not on the tublets? Btw thank you for you great work!!!

Adrian398 commented 3 years ago

I am not using appearance_matching. Could this be an issue?

AlbertoSabater commented 3 years ago

clf_thris used to filter out low-scoring linkings/pairs. It is set as a high value (0.7-0.8) to remove undesired detections like the ones corresponding to background scenarios. min_pred_score and min_tubelet_score remove the low-scoring detections of both the originals and the re-scored ones. The clf_thr parameter is usually the most important since its optimal value frequently depends on the data domain and the detector model you have trained. So it should be tuned for better results. You can also experiment with re-training the LogisticRegression that predicts the linking scores. How is the mAP that you are getting both from your original detections and the post-processed ones?

Adrian398 commented 3 years ago

Thank you for your comments. :) Now I understand it. I tested different thresholds, in the end, your default threshold was really the best for me. I am detecting polyps in coloscopy. REPP improve my MAP by 0.5 % so not that much. By F1 score was improved by 5 %! :) So thank you very much it's a great repo. Have you already worked at an implementation for online REPP. So predicting in realtime and still using the tublets? PS: I will try to learn thee logisticRegression do you think I will improvement my results a lot?

AlbertoSabater commented 3 years ago

Thank you for your interest. I don't think that re-training the LogReg would suppose a huge increment since ImagenetVID already provides a great data variability, but you can try. Note that if you are already getting high detection performance there won't be much margin of improvement. I am not planning to develop an online version soon, I don't have time enough.