KostadinovShalon / UAVDetectionTrackingBenchmark

78 stars 17 forks source link

bug: invalid `train_last_idx` value in `convert_drone_vs_bird_to_coco.py` script #6

Closed fcakyon closed 2 years ago

fcakyon commented 3 years ago

Hello,

Thanks a lot for this comprehensive repo! @KostadinovShalon @MattPoyser.

When I want to create coco annotation files using the image video and annotation folder, at this line: https://github.com/KostadinovShalon/UAVDetectionTrackingBenchmark/blob/c00cdf12086692ec02e43e07a0750db49d8f7baf/detection/utils/convert_drone_vs_bird_to_coco.py#L114

the value of train_last_idx is equal to 67547 but there are only 77 elements in _files so test_files list is always empty: https://github.com/KostadinovShalon/UAVDetectionTrackingBenchmark/blob/c00cdf12086692ec02e43e07a0750db49d8f7baf/detection/utils/convert_drone_vs_bird_to_coco.py#L118

Would you mind fixing this error and uploading the fully functional conversion script?

Bests

KostadinovShalon commented 3 years ago

Hi @fcakyon

Thank you for pointing out this error. I think the codes for this and anti-uav got a bit mixed up. Could you pull and check if it's working now? Thanks

fcakyon commented 3 years ago

Thanks a lot for the fast response @KostadinovShalon! When we shuffle the images and then split for train and val, then frames of the same video will be present in both training and validation set and it not an expected behaviour. Am I correct?

https://github.com/KostadinovShalon/UAVDetectionTrackingBenchmark/blob/130cd6a390cda733219969cf722499a3d36852e8/detection/utils/convert_drone_vs_bird_to_coco.py#L102

KostadinovShalon commented 3 years ago

I'm shuffling the annotation files, which in the case of drone-vs-bird there's one file per video. So no, frames of the same video won't appear at both sets. That's what I was trying to do in the anti-uav dataset, which it's not necessary here, and that's why I think it got mixed up.

fcakyon commented 3 years ago

@KostadinovShalon you are right, thanks a lot!

fcakyon commented 3 years ago

@KostadinovShalon one last question, what is the seed you used for generating dronevsbird coco annotations? Because at the moment every time we run the given script, train/val split changes.