{"id":21711874,"url":"https://github.com/hukaixuan19970627/dota_devkit_yolo","last_synced_at":"2025-08-20T18:33:55.363Z","repository":{"id":47123410,"uuid":"347313759","full_name":"hukaixuan19970627/DOTA_devkit_YOLO","owner":"hukaixuan19970627","description":"Trans DOTA OBB format(poly format) to YOLO format.","archived":false,"fork":false,"pushed_at":"2021-05-29T05:57:31.000Z","size":40507,"stargazers_count":199,"open_issues_count":9,"forks_count":39,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-09T20:49:21.623Z","etag":null,"topics":["aerial-imagery","detection","dota-devkit","oriented","rotation","yolo-obb-labels","yolov5"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hukaixuan19970627.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-13T08:21:33.000Z","updated_at":"2024-12-03T01:24:02.000Z","dependencies_parsed_at":"2022-08-26T14:00:43.110Z","dependency_job_id":null,"html_url":"https://github.com/hukaixuan19970627/DOTA_devkit_YOLO","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hukaixuan19970627%2FDOTA_devkit_YOLO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hukaixuan19970627%2FDOTA_devkit_YOLO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hukaixuan19970627%2FDOTA_devkit_YOLO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hukaixuan19970627%2FDOTA_devkit_YOLO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hukaixuan19970627","download_url":"https://codeload.github.com/hukaixuan19970627/DOTA_devkit_YOLO/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230445927,"owners_count":18227060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aerial-imagery","detection","dota-devkit","oriented","rotation","yolo-obb-labels","yolov5"],"created_at":"2024-11-25T23:30:38.189Z","updated_at":"2024-12-19T14:08:06.849Z","avatar_url":"https://github.com/hukaixuan19970627.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Brief Introduction\nBased on [DOTA_devkit](https://github.com/CAPTAIN-WHU/DOTA_devkit).  \nAdd some modules to trans DOTA annotation format to YOLO annotation format.  \nAdd some files for every demo.\n\n\n## Fuction\n* `DOTA.py`  Load image, and show the bounding oriented box.\n\n* `ImgSplit.py` Split image and the label.\n\n* `ResultMerge.py` Merge the detection result annotation txt.\n\n* `dota_×_evaluation_task×.py` Evaluate the detection result annotation txt.\n\n* `YOLO_Transformer.py`     Trans DOTA format to YOLO(OBB or HBB) format.\n\n* `Draw_DOTA_YOLO.py` Picture the YOLO_OBB labels(after augmented).\n\n## Installation\nSame as [DOTA_devkit](https://github.com/CAPTAIN-WHU/DOTA_devkit).  Then:\n\n```\n$  pip install -r requirements.txt\n```\n\n## More detailed explanation\n想要了解这几个函数实现的细节和原理可以看我的知乎文章;    \n[DOTA遥感数据集以及相关工具DOTA_devkit的整理(踩坑记录)](https://zhuanlan.zhihu.com/p/355862906);    \n[DOTA数据格式转YOLO数据格式工具(cv2.minAreaRect踩坑记录)](https://zhuanlan.zhihu.com/p/356416158);\n\n\n## Usage Example\n* `DOTA.py`     \n```javascript\n$  python DOTA.py\n```\n![DOTA_HBB_label](./P0003_HBB.png)\n![DOTA_OBB_label](./P0003_OBB.png)\n* `ImgSplit.py` \n```javascript\n$  python ImgSplit_multi_process.py\n```\n![Img_before_split](./P0130.png)\n![Img_after_split](./P0130__1__0___0.png)\n* `ResultMerge.py` \n```javascript\n$  python ResultMerge.py\n```\n![visualize_detection_result1](./P0004__1__0___0.png)\n![visualize_detection_result2](./P0004__1__0___440.png)\n![visualize_merged_result](./P0004_.png)\n\n\n\n\n* `dota_v1.5_evaluation_task1.py` \n\nchange the path with yours.\n```javascript\ndetpath = r'/.../evaluation_example/result_classname/Task1_{:s}.txt'\nannopath = r'/.../evaluation_example/row_DOTA_labels/{:s}.txt'\nimagesetfile = r'/.../evaluation_example/imgnamefile.txt'\n```\n```javascript\n$  python dota_v1.5_evaluation_task1.py\n```\n\n* `YOLO_Transform.py` \n```javascript\n$  python YOLO_Transform.py\n```\n```javascript\nDOTA format:    poly classname diffcult\n    To\nYOLO HBB format: classid x_c y_c width height   ——   def dota2Darknet()\nlongside format： classid x_c y_c longside shortside Θ  Θ∈[0, 180)  ——  def dota2LongSideFormat()\n```\n\n\n* `Draw_DOTA_YOLO.py`\n\n1.Run YOLO_Transformer.py to get the YOLO_OBB_labels first.\n\n2.then augment YOLO_OBB_labels and visualize it:\n```javascript\n$  Draw_DOTA_YOLO.py\n```\n![visualize_augmented_labels](./P0003_augment_.png)\n\n\n## 有问题反馈\n在使用中有任何问题，欢迎反馈给我，可以用以下联系方式跟我交流\n\n* 知乎（@[略略略](https://www.zhihu.com/people/lue-lue-lue-3-92-86)）\n* 代码问题提issues,其他问题请知乎上联系\n\n\n## 感激\n感谢以下的项目,排名不分先后\n\n* [DOTA_devkit](https://github.com/CAPTAIN-WHU/DOTA_devkit)\n\n## 关于作者\n\n```javascript\n  Name  : \"胡凯旋\"\n  describe myself：\"咸鱼一枚\"\n  \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhukaixuan19970627%2Fdota_devkit_yolo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhukaixuan19970627%2Fdota_devkit_yolo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhukaixuan19970627%2Fdota_devkit_yolo/lists"}