yijingru / BBAVectors-Oriented-Object-Detection

[WACV2021] Oriented Object Detection in Aerial Images with Box Boundary-Aware Vectors
MIT License
466 stars 88 forks source link

Is it args for data_path(Train / Validation Set)? #19

Open piantic opened 4 years ago

piantic commented 4 years ago

Hi, First thanks for sharing your results.

I found your repo a few hours ago. I'm trying to train my custom datasets.

  1. How to set Train / Validation data_path? I want to split datasets for cross-validation.

├─dataset │ ├─train │ │ ├─images │ │ └─labelTxt │ └─val │ ├─images │ └─labelTxt

I checked dataset_dota.py but i don't know exactly. I just found difficulty in DOTA format but it seems not option for k-fold. (I am not familiar with the DOTA format. My datasets label format is geojson.)

If not in code, I probably need to write code.

p.s. I recently used efficientDet, yolov5, DETR, so I have some format_change code except for dota format.

  1. How to use your pretrained weights?

I also checked this point, is it '--resume' args?

(It's like resume, but I think that it seems like a purpose to learn again in the middle.)

  1. Some wrong help in parser

I found that '--resume' and '--dataset' helps are same.

parser.add_argument('--resume', type=str, default='model_44.pth', help='weights to be resumed') parser.add_argument('--dataset', type=str, default='dota', help='weights to be resumed')

And '--phase' is also same others.

parser.add_argument('--data_dir', type=str, default='../Datasets/dota', help='data directory') parser.add_argument('--phase', type=str, default='test', help='data directory') parser.add_argument('--wh_channels', type=int, default=8, help='data directory')

Not long after checking the code, I added it to the issue without making pull requests right away.

If I succeed in using the custom dataset later, I will contribute.

Thanks!

yijingru commented 4 years ago
  1. You can write a class that inherits BaseDataset in datasets/base.py, and arrange data in your way but need to provide the images and annotations, for example, write function of load_image (return 3 channels image) and load_annotation (return a python dictionary that contains keys of ['pts': [bl, tl, tr, br],'cat':category index], you can take dataset_hrsc.py as an example

  2. --resume is for general usage, you may not need it in train.py. It will not raise error if you don't put any resume weights

  3. My fault. I will correct it. Thanks for your help!

Sure, thanks

piantic commented 4 years ago

Thanks. I will try your advices!