hu64 / SpotNet

Repository for the paper SpotNet: Self-Attention Multi-Task Network for Object Detection
MIT License
51 stars 10 forks source link

annotation data #9

Closed habibian closed 4 years ago

habibian commented 4 years ago

Hi, could you please share your annotation files? i.e. '/store/datasets/UA-Detrac/COCO-format/test-1-on-30_b.json' or sharing some code elaborating how the annotations are being created? Thanks.

hu64 commented 4 years ago

Hi! The script used for my annotations is "object detection/src/tools/convert_csv_to_coco.py". I use csv files with basic format (one object per line, etc.) that themselves are converted from the official XML annotations of UA-DETRAC, which you can find on their website. I can definitely share my files with you, I will put the link here soon.

hu64 commented 4 years ago

You can now find them at same location as our weights: https://polymtlca0-my.sharepoint.com/:f:/g/personal/hughes_perreault_polymtl_ca/EhqSkfDIJ-JBh9_YhCrPQrEBocvfP6BIucODKdcNjZzlcA?e=niahaB. Thank you for your interest!

habibian commented 4 years ago

Thanks for your swift response and for sharing the files. The shared folder includes:

I wonder which splits should I use for training and for evaluation to replicate the results reported in your paper?

the default values in the code are (as in UADETRAC1ON10_b): if split == 'test': self.annot_path = '/store/datasets/UA-Detrac/COCO-format/test-1-on-30_b.json' elif split == 'val': self.annot_path = '/store/datasets/UA-Detrac/COCO-format/val_b.json' else: self.annot_path = '/store/datasets/UA-Detrac/COCO-format/train-1-on-10_b.json'

Thank you 👍

hu64 commented 4 years ago

Hi, we train on train-1-on10_b.json, monitor on either val_b.json, or val-1-on-10_b.json (faster), and do an evaluation on test-1-on-30_b.json (I will add it). This gives results, but in coco format. To get UA-DETRAC official results, we use the run_on_csv script on the entire test set and do the evaluation on their Matlab benchmark.

habibian commented 4 years ago

Great. Thanks for the clarification :)

sisrfeng commented 3 years ago

Hi, I can not download the files from the links above. Would you mind sharing them in another way or sending them to lwf17@mails.tsinghua.edu.cn or 584400706@qq.com ? Many thanks!

hu64 commented 3 years ago

Hi, I just sent the files to both emails using WeTransfer. I hope this works for you! Download link (will expire in one week): https://we.tl/t-ir9etWyY5o

sisrfeng commented 3 years ago

Downloading the full folder from OneDrive or WeTransfer fails. (I am in China) I just need the annotation files so I download them instead of your full folder. Succeed in few minutes. Thank you very much!!

sisrfeng commented 3 years ago

I asked you about ignore_regions some months ago, and I find that handling the ignore_regions improve the results. But I can not find the convert script now. Would you mind sharing your scrip which converts UA-DETRAC to COCO? I want to add the ignore regions to it and share you later.

hu64 commented 3 years ago

Hi, my script is in the repo, in src/tools/convert_csv_to_coco.py. The input file is the csv format, one line per detection. the format is: file_name, x0, y0, x1, y1, label.

sisrfeng commented 3 years ago

The official annotations are: image

Could you please share your scrpit converting XML files to csv?( I tried this tool but failed: https://github.com/knadh/xmlutils.py)

hu64 commented 3 years ago

Yeah sure here it is. You can play around with it, change the validation set and whether the label is the actual label are just 'object' for binary classification. I had not intended to share this so you might have to adapt it to your system. (I joined a .txt file since GitHub won't let me join a Python script, but of course it is a Python script). convert_to_csv.txt

sisrfeng commented 3 years ago

Thank you for your quick reply!