jbwang1997 / OBBDetection

OBBDetection is an oriented object detection library, which is based on MMdetection.
Apache License 2.0
522 stars 112 forks source link

How to Train on custom Dataset if don't want to crop like dota dataset #102

Open sarangtamrakar opened 2 years ago

sarangtamrakar commented 2 years ago

How to Train on custom Dataset if don't want to crop like dota dataset

  1. How to prepare dataset for custom dataset & annotation format & which tool to use for annotation.

I have tried two stretegy as of now which is not working:-

  1. I have annotate object in the format of lableme's polygons & try to convert it into the dota txt format, but when I call the split function it is saving .pkl file for both but inside pickle file bboxes is empty because it is not splitting the object.
    
    this is read data from pickle file  after splitting............................

{'cls': ('ship',), 'content': [{'gsd': 0.108079065446, 'ann': {'bboxes': array([], dtype=float32), 'labels': array([0], dtype=int64), 'diffs': array([0], dtype=int64)}, 'width': 1166, 'height': 753, 'filename': '100000001.bmp', 'id': '100000001'},



2.  In second approach , i have created the parser to directly convert the annotation from json polygons to .pkl format but again it is not working.

Kindly give suggestion how to prepare dataset for custom., If you will prepare the beautifull docs on that will be great.
jbwang1997 commented 2 years ago

You can refer to here to create a custom dataset class.

The only difference is the bboxes should be BboxToolkit defination.

The pipelines can refer to the dota pipeline