oriented-det 0.2.0__tar.gz → 0.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. {oriented_det-0.2.0 → oriented_det-0.3.1}/PKG-INFO +64 -27
  2. {oriented_det-0.2.0 → oriented_det-0.3.1}/README.md +57 -19
  3. oriented_det-0.3.1/export/__init__.py +13 -0
  4. oriented_det-0.3.1/export/__main__.py +6 -0
  5. oriented_det-0.3.1/export/cli.py +95 -0
  6. oriented_det-0.3.1/export/nms.py +309 -0
  7. {oriented_det-0.2.0 → oriented_det-0.3.1}/export/ort_runtime.py +6 -47
  8. oriented_det-0.3.1/export/postprocess.py +322 -0
  9. oriented_det-0.3.1/export/preprocess.py +130 -0
  10. oriented_det-0.3.1/export/runtime.py +222 -0
  11. oriented_det-0.3.1/export/scripts/__init__.py +6 -0
  12. oriented_det-0.3.1/export/scripts/demo.py +184 -0
  13. {oriented_det-0.2.0 → oriented_det-0.3.1}/export/scripts/export_onnx.py +150 -43
  14. oriented_det-0.3.1/export/scripts/infer_onnx.py +105 -0
  15. oriented_det-0.3.1/export/scripts/save_predictions_onnx.py +325 -0
  16. oriented_det-0.3.1/export/scripts/zip_bundle.py +49 -0
  17. oriented_det-0.3.1/export/val_dataset.py +5 -0
  18. {oriented_det-0.2.0 → oriented_det-0.3.1}/export/wrappers.py +61 -12
  19. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/cli/__init__.py +9 -17
  20. oriented_det-0.3.1/oriented_det/cli/__main__.py +6 -0
  21. oriented_det-0.3.1/oriented_det/configs/_base_/datasets/fair1m.json +15 -0
  22. oriented_det-0.3.1/oriented_det/configs/_base_/datasets/hrsc2016.json +15 -0
  23. oriented_det-0.3.1/oriented_det/configs/_base_/datasets/hrsid.json +16 -0
  24. oriented_det-0.3.1/oriented_det/configs/_base_/datasets/ssdd.json +16 -0
  25. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/_base_/schedules/1x.json +7 -4
  26. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/config.schema.json +74 -30
  27. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/oriented_rcnn/dota_le90_1x.json +11 -7
  28. oriented_det-0.3.1/oriented_det/configs/oriented_rcnn/dota_le90_3x.json +9 -0
  29. oriented_det-0.3.1/oriented_det/configs/oriented_rcnn/fair1m_le90_1x.json +109 -0
  30. oriented_det-0.3.1/oriented_det/configs/oriented_rcnn/hrsc2016_le90_1x.json +115 -0
  31. oriented_det-0.3.1/oriented_det/configs/oriented_rcnn/hrsc2016_le90_3x.json +16 -0
  32. oriented_det-0.3.1/oriented_det/configs/oriented_rcnn/hrsid_le90_1x.json +115 -0
  33. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/rotated_faster_rcnn/dota_le90_1x.json +12 -8
  34. oriented_det-0.3.1/oriented_det/configs/rotated_faster_rcnn/dota_le90_3x.json +7 -0
  35. oriented_det-0.3.1/oriented_det/configs/rotated_faster_rcnn/fair1m_le90_1x.json +108 -0
  36. oriented_det-0.3.1/oriented_det/configs/rotated_faster_rcnn/hrsc2016_le90_1x.json +113 -0
  37. oriented_det-0.3.1/oriented_det/configs/rotated_faster_rcnn/hrsc2016_le90_3x.json +16 -0
  38. oriented_det-0.3.1/oriented_det/configs/rotated_faster_rcnn/hrsid_le90_1x.json +115 -0
  39. oriented_det-0.3.1/oriented_det/configs/rotated_faster_rcnn/ssdd_le90_1x.json +115 -0
  40. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/rotated_fcos/dota_le90_1x.json +26 -10
  41. oriented_det-0.2.0/oriented_det/configs/rotated_fcos/dota_le90_1x_kfiou_aux.json → oriented_det-0.3.1/oriented_det/configs/rotated_fcos/dota_le90_1x_l1_kfiou_aux.json +3 -1
  42. oriented_det-0.3.1/oriented_det/configs/rotated_fcos/dota_le90_3x.json +7 -0
  43. oriented_det-0.3.1/oriented_det/configs/rotated_fcos/fair1m_le90_1x.json +106 -0
  44. oriented_det-0.3.1/oriented_det/configs/rotated_fcos/hrsc2016_le90_1x.json +115 -0
  45. oriented_det-0.2.0/oriented_det/configs/oriented_rcnn/dota_le90_3x.json → oriented_det-0.3.1/oriented_det/configs/rotated_fcos/hrsc2016_le90_3x.json +3 -3
  46. oriented_det-0.3.1/oriented_det/configs/rotated_fcos/hrsid_le90_1x.json +112 -0
  47. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/rotated_retinanet/dota_le90_1x.json +29 -10
  48. oriented_det-0.3.1/oriented_det/configs/rotated_retinanet/dota_le90_1x_hbb.json +9 -0
  49. oriented_det-0.3.1/oriented_det/configs/rotated_retinanet/dota_le90_3x.json +7 -0
  50. oriented_det-0.3.1/oriented_det/configs/rotated_retinanet/dota_le90_3x_hbb.json +7 -0
  51. oriented_det-0.3.1/oriented_det/data/__init__.py +195 -0
  52. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/data/airbus_playground.py +126 -16
  53. oriented_det-0.3.1/oriented_det/data/build.py +291 -0
  54. oriented_det-0.3.1/oriented_det/data/coco_obb.py +509 -0
  55. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/data/dota.py +144 -41
  56. oriented_det-0.3.1/oriented_det/data/dota_task1.py +198 -0
  57. oriented_det-0.3.1/oriented_det/data/fair1m.py +843 -0
  58. oriented_det-0.3.1/oriented_det/data/fair1m_classes.py +126 -0
  59. oriented_det-0.3.1/oriented_det/data/hrsc2016.py +436 -0
  60. oriented_det-0.3.1/oriented_det/data/hrsid.py +379 -0
  61. oriented_det-0.3.1/oriented_det/data/lookalike.py +65 -0
  62. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/data/preprocessing.py +61 -2
  63. oriented_det-0.3.1/oriented_det/data/rotates.py +95 -0
  64. oriented_det-0.3.1/oriented_det/data/ssdd.py +661 -0
  65. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/data/transforms.py +5 -175
  66. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/geometry/transforms.py +4 -5
  67. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/__init__.py +4 -0
  68. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/faster_rcnn_inference.py +3 -1
  69. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/oriented_rcnn.py +58 -46
  70. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/oriented_roi.py +94 -41
  71. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/oriented_rpn.py +190 -46
  72. oriented_det-0.3.1/oriented_det/models/retinanet_assign.py +220 -0
  73. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/rotated_fcos.py +93 -8
  74. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/rotated_retinanet.py +377 -244
  75. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/utils.py +292 -13
  76. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/ops/diff_iou_rotated.py +11 -11
  77. oriented_det-0.3.1/oriented_det/pretrained/manifest.json +120 -0
  78. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/runtime/checkpoint.py +21 -19
  79. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/runtime/collate.py +97 -10
  80. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/runtime/inference.py +121 -62
  81. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/train/__init__.py +6 -0
  82. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/train/config.py +426 -38
  83. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/train/engine.py +20 -33
  84. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/train/utils.py +53 -4
  85. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/utils/viz.py +5 -1
  86. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det.egg-info/PKG-INFO +64 -27
  87. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det.egg-info/SOURCES.txt +60 -22
  88. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det.egg-info/requires.txt +5 -7
  89. {oriented_det-0.2.0 → oriented_det-0.3.1}/pyproject.toml +15 -12
  90. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_airbus_playground.py +190 -0
  91. oriented_det-0.3.1/tests/test_class_tile_oversampling.py +167 -0
  92. oriented_det-0.3.1/tests/test_coco_obb.py +136 -0
  93. oriented_det-0.3.1/tests/test_config_behavior.py +342 -0
  94. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_config_model_wiring.py +149 -26
  95. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_cosine_tail_scheduler.py +45 -3
  96. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_deploy_generate_description.py +17 -0
  97. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_diff_iou_rotated.py +13 -0
  98. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_dota.py +33 -0
  99. oriented_det-0.3.1/tests/test_dota_task1.py +231 -0
  100. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_evaluation.py +18 -0
  101. oriented_det-0.3.1/tests/test_fair1m.py +423 -0
  102. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_geometry_transforms.py +2 -2
  103. oriented_det-0.3.1/tests/test_hard_tile_oversampling.py +136 -0
  104. oriented_det-0.3.1/tests/test_hrsc2016.py +286 -0
  105. oriented_det-0.3.1/tests/test_hrsid.py +154 -0
  106. oriented_det-0.3.1/tests/test_lookalike.py +490 -0
  107. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_models.py +238 -11
  108. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_piecewise_schedule.py +9 -9
  109. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_preprocessing.py +39 -1
  110. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_pretrained_hub.py +84 -27
  111. oriented_det-0.3.1/tests/test_retinanet_assign.py +295 -0
  112. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_roi.py +15 -13
  113. oriented_det-0.3.1/tests/test_sigmoid_focal_class_weights.py +213 -0
  114. oriented_det-0.3.1/tests/test_sliding_window_margin.py +131 -0
  115. oriented_det-0.3.1/tests/test_ssdd.py +246 -0
  116. oriented_det-0.3.1/tests/test_tile_dota.py +70 -0
  117. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_train_flips.py +11 -9
  118. oriented_det-0.3.1/tests/test_train_rotates.py +86 -0
  119. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_training_config_strict.py +136 -12
  120. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_utils_viz.py +1 -0
  121. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_viewer_gradio_compat.py +4 -0
  122. oriented_det-0.3.1/tests/test_wizard.py +141 -0
  123. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/app.py +10 -3
  124. oriented_det-0.3.1/tools/coco_to_dota.py +172 -0
  125. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/dataset_stats.py +5 -40
  126. oriented_det-0.3.1/tools/dota_task1_submit.py +219 -0
  127. oriented_det-0.3.1/tools/fair1m_to_dota.py +131 -0
  128. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/generate_airbus_playground_csv.py +10 -0
  129. oriented_det-0.3.1/tools/hrsc_to_dota.py +80 -0
  130. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/image_demo.py +4 -8
  131. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/lr_finder.py +53 -45
  132. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/playground_to_dota.py +13 -0
  133. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/preview_augmentation.py +25 -49
  134. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/save_predictions.py +197 -108
  135. oriented_det-0.3.1/tools/ssdd_to_dota.py +95 -0
  136. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/tile_dota.py +98 -14
  137. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/train.py +478 -181
  138. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/viewer_annotations.py +2 -1
  139. oriented_det-0.2.0/export/__init__.py +0 -9
  140. oriented_det-0.2.0/export/contract.json +0 -73
  141. oriented_det-0.2.0/export/postprocess.py +0 -228
  142. oriented_det-0.2.0/export/scripts/__init__.py +0 -6
  143. oriented_det-0.2.0/export/scripts/build_faster_rcnn_savedmodel.py +0 -134
  144. oriented_det-0.2.0/export/scripts/export_tf.py +0 -187
  145. oriented_det-0.2.0/export/scripts/onnx_to_savedmodel.py +0 -35
  146. oriented_det-0.2.0/export/scripts/predict_savedmodel.py +0 -99
  147. oriented_det-0.2.0/export/scripts/save_predictions_tf.py +0 -457
  148. oriented_det-0.2.0/export/scripts/to_tflite.py +0 -32
  149. oriented_det-0.2.0/export/tests/test_export_cli.py +0 -201
  150. oriented_det-0.2.0/export/tests/test_export_onnx_optional.py +0 -82
  151. oriented_det-0.2.0/export/tests/test_export_wrappers.py +0 -165
  152. oriented_det-0.2.0/export/tests/test_faster_rcnn_export_parity.py +0 -205
  153. oriented_det-0.2.0/export/tests/test_keras_detect_bundle.py +0 -130
  154. oriented_det-0.2.0/export/tests/test_oriented_rcnn_export_parity.py +0 -312
  155. oriented_det-0.2.0/export/tests/test_ort_runtime.py +0 -101
  156. oriented_det-0.2.0/export/tests/test_postprocess.py +0 -50
  157. oriented_det-0.2.0/export/tests/test_rotated_fcos_export_parity.py +0 -220
  158. oriented_det-0.2.0/export/tf_serving_model.py +0 -176
  159. oriented_det-0.2.0/export/val_dataset.py +0 -116
  160. oriented_det-0.2.0/oriented_det/configs/rotated_faster_rcnn/dota_le90_3x.json +0 -9
  161. oriented_det-0.2.0/oriented_det/configs/rotated_fcos/dota_le90_1x_riou.json +0 -11
  162. oriented_det-0.2.0/oriented_det/configs/rotated_fcos/dota_le90_3x.json +0 -27
  163. oriented_det-0.2.0/oriented_det/configs/rotated_fcos/dota_le90_3x_kfiou_aux.json +0 -15
  164. oriented_det-0.2.0/oriented_det/configs/rotated_fcos/dota_le90_3x_riou.json +0 -15
  165. oriented_det-0.2.0/oriented_det/configs/rotated_retinanet/dota_le90_3x.json +0 -30
  166. oriented_det-0.2.0/oriented_det/data/__init__.py +0 -99
  167. oriented_det-0.2.0/oriented_det/pretrained/manifest.json +0 -78
  168. oriented_det-0.2.0/tests/test_config_behavior.py +0 -178
  169. oriented_det-0.2.0/tests/test_sliding_window_margin.py +0 -47
  170. oriented_det-0.2.0/tests/test_transforms.py +0 -107
  171. {oriented_det-0.2.0 → oriented_det-0.3.1}/LICENSE +0 -0
  172. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/__init__.py +0 -0
  173. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/cli/train.py +0 -0
  174. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/_base_/augmentation.json +0 -0
  175. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/_base_/datasets/dota_le90.json +0 -0
  176. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/_base_/fp16.json +0 -0
  177. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/_base_/models/oriented_rcnn_r50.json +0 -0
  178. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/_base_/models/rotated_faster_rcnn_r50.json +0 -0
  179. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/_base_/models/rotated_fcos_r50.json +0 -0
  180. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/_base_/models/rotated_retinanet_r50.json +0 -0
  181. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/configs/_base_/preprocessing.json +0 -0
  182. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/data/dota_classes.py +0 -0
  183. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/data/evaluation.py +0 -0
  184. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/data/flips.py +0 -0
  185. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/data/tiling.py +0 -0
  186. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/geometry/__init__.py +0 -0
  187. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/geometry/poly.py +0 -0
  188. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/geometry/qbox.py +0 -0
  189. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/geometry/rbox.py +0 -0
  190. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/backbones/__init__.py +0 -0
  191. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/backbones/resnet_fpn.py +0 -0
  192. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/backbones/utils.py +0 -0
  193. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/bbox_coder.py +0 -0
  194. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/horizontal_roi_coder.py +0 -0
  195. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/models/oriented_rcnn_inference.py +0 -0
  196. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/ops/__init__.py +0 -0
  197. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/ops/gaussian_angle.py +0 -0
  198. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/ops/gpu_ops.py +0 -0
  199. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/ops/iou.py +0 -0
  200. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/ops/kfiou.py +0 -0
  201. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/ops/nms.py +0 -0
  202. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/ops/probiou.py +0 -0
  203. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/ops/rotated_ops.py +0 -0
  204. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/ops/utils.py +0 -0
  205. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/pretrained/__init__.py +0 -0
  206. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/pretrained/hub.py +0 -0
  207. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/runtime/__init__.py +0 -0
  208. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/train/grouped_ce.py +0 -0
  209. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/train/piecewise_schedule.py +0 -0
  210. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/train/profiler.py +0 -0
  211. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/utils/__init__.py +0 -0
  212. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/utils/config.py +0 -0
  213. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/utils/device.py +0 -0
  214. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/utils/logging.py +0 -0
  215. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det/utils/progress.py +0 -0
  216. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det.egg-info/dependency_links.txt +0 -0
  217. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det.egg-info/entry_points.txt +0 -0
  218. {oriented_det-0.2.0 → oriented_det-0.3.1}/oriented_det.egg-info/top_level.txt +0 -0
  219. {oriented_det-0.2.0 → oriented_det-0.3.1}/setup.cfg +0 -0
  220. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_annotation_csv.py +0 -0
  221. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_bbox_coder.py +0 -0
  222. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_dota_tile_roots.py +0 -0
  223. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_exact_rotated_iou.py +0 -0
  224. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_gaussian_angle.py +0 -0
  225. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_geometry.py +0 -0
  226. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_gpu_ops.py +0 -0
  227. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_grouped_ce.py +0 -0
  228. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_iou.py +0 -0
  229. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_kfiou.py +0 -0
  230. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_metrics_margin_filter.py +0 -0
  231. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_nms.py +0 -0
  232. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_ops_utils.py +0 -0
  233. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_optimizer_param_groups.py +0 -0
  234. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_probiou.py +0 -0
  235. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_rpn.py +0 -0
  236. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_score_thresholds.py +0 -0
  237. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_source_provenance.py +0 -0
  238. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_tiling.py +0 -0
  239. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_train.py +0 -0
  240. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_utils_config.py +0 -0
  241. {oriented_det-0.2.0 → oriented_det-0.3.1}/tests/test_vendored_configs_sync.py +0 -0
  242. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/__init__.py +0 -0
  243. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/annotation_csv.py +0 -0
  244. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/compare_hbb_obb_counts.py +0 -0
  245. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/dota_labels_to_comma.py +0 -0
  246. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/filter_predictions_by_gt.py +0 -0
  247. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/free_gpu.py +0 -0
  248. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/generate_oriented_annotations.py +0 -0
  249. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/hbb_to_obb.py +0 -0
  250. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/measure_sampled_riou_error.py +0 -0
  251. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/pretrained_download.py +0 -0
  252. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/publish_checkpoint.py +0 -0
  253. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/sync_vendored_configs.py +0 -0
  254. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/train_example.py +0 -0
  255. {oriented_det-0.2.0 → oriented_det-0.3.1}/tools/train_multi_gpu.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oriented-det
3
- Version: 0.2.0
3
+ Version: 0.3.1
4
4
  Summary: A lightweight, modern PyTorch library for rotated object detection in aerial and satellite imagery
5
5
  Author: Jeff Faudi, DL4EO
6
6
  Maintainer: Jeff Faudi, DL4EO
@@ -11,6 +11,7 @@ Project-URL: Repository, https://github.com/DL4EO/oriented-det
11
11
  Project-URL: Issues, https://github.com/DL4EO/oriented-det/issues
12
12
  Project-URL: Bug Tracker, https://github.com/DL4EO/oriented-det/issues
13
13
  Project-URL: DL4EO, https://dl4eo.com
14
+ Project-URL: Blog, https://deeplearning.earth
14
15
  Keywords: computer-vision,object-detection,rotated-detection,oriented-detection,pytorch,aerial-imagery,satellite-imagery,remote-sensing,dota,geospatial
15
16
  Classifier: Development Status :: 3 - Alpha
16
17
  Classifier: Intended Audience :: Developers
@@ -26,9 +27,9 @@ Requires-Python: >=3.10
26
27
  Description-Content-Type: text/markdown
27
28
  License-File: LICENSE
28
29
  Requires-Dist: setuptools<82,>=65.0
29
- Requires-Dist: torch>=2.3.0
30
- Requires-Dist: torchvision>=0.18.0
31
- Requires-Dist: numpy<2
30
+ Requires-Dist: torch>=2.4.0
31
+ Requires-Dist: torchvision>=0.19.0
32
+ Requires-Dist: numpy>=1.24
32
33
  Requires-Dist: Pillow>=9.0
33
34
  Requires-Dist: albumentations>=1.3.0
34
35
  Requires-Dist: tqdm>=4.65.0
@@ -39,10 +40,8 @@ Requires-Dist: shapely>=2.0.0
39
40
  Provides-Extra: viewer
40
41
  Requires-Dist: gradio==6.8.0; extra == "viewer"
41
42
  Provides-Extra: export
42
- Requires-Dist: onnx>=1.14.0; extra == "export"
43
- Requires-Dist: onnxruntime-gpu[cuda,cudnn]>=1.16.0; extra == "export"
44
- Requires-Dist: onnx2tf>=1.22.0; extra == "export"
45
- Requires-Dist: tensorflow>=2.14.0; extra == "export"
43
+ Requires-Dist: onnx<2,>=1.14.0; extra == "export"
44
+ Requires-Dist: onnxruntime>=1.16.0; extra == "export"
46
45
  Provides-Extra: dev
47
46
  Requires-Dist: pytest>=8.0; extra == "dev"
48
47
  Requires-Dist: pytest-cov>=4.0; extra == "dev"
@@ -63,17 +62,28 @@ Dynamic: license-file
63
62
 
64
63
  **OrientedDet** is a lightweight, modern PyTorch library for **rotated object detection** in aerial and satellite imagery. It focuses on clean geometry, reliable operators, simple datasets, and practical baseline models—without the complexity of large detection frameworks. OrientedDet is designed for researchers, practitioners, and geospatial developers who need accurate rotation-aware detectors with a minimal API.
65
64
 
65
+ <p align="center">
66
+ <img src="demo/out/demo_detections.png" alt="Oriented R-CNN detections on diagonally parked buses in an aerial parking lot" width="720">
67
+ </p>
68
+
69
+ <p align="center"><em>Oriented R-CNN on the bundled <code>demo/demo.jpg</code> tile — rotated boxes follow vehicle heading instead of swallowing neighbours in axis-aligned rectangles.</em></p>
70
+
71
+ **Docs:** [dl4eo.github.io/oriented-det](https://dl4eo.github.io/oriented-det/) · **Blog:** [deeplearning.earth](https://deeplearning.earth) · **Company:** [dl4eo.com](https://dl4eo.com) (consulting and custom development)
72
+
66
73
  ## Features
67
74
 
68
75
  - **Geometry**: Rotated bounding boxes (rbox: cx, cy, w, h, angle), quadrilateral boxes (qbox), polygon ↔ rbox ↔ hbox conversions, angle normalization (le90, 0–180°), flip/rotate/scale transforms, visualization helpers
69
76
  - **IoU & NMS**: Rotated IoU and oriented NMS (CPU with optional GPU kernels when available); AABB pre-filtering; `obb_to_xyxy` / HBB conversion
70
- - **Datasets**: DOTA polygon loader (pattern, split file, or separate folders), image tiling, label filtering, ignore masks, oriented mAP evaluation
77
+ - **Datasets**: DOTA polygon loader (pattern, split file, or separate folders), **HRSC2016** native XML loader, **FAIR1M** 37-class XML loader (+ convert/tile tutorial), **SSDD** and **HRSID** SAR ship loaders (finetune DOTA 1× Hub locally; no SAR zoo), image tiling, label filtering, ignore masks, oriented mAP evaluation
71
78
  - **Models**: **Oriented R-CNN** ([Xie et al., ICCV 2021](https://openaccess.thecvf.com/content/ICCV2021/html/Xie_Oriented_R-CNN_for_Object_Detection_ICCV_2021_paper.html); horizontal RPN + MidpointOffset → oriented RoIAlign + oriented ROI head), **Rotated Faster R-CNN** (Ren et al., NeurIPS 2015 two-stage baseline with horizontal RPN + horizontal RoIAlign + rotated ROI head; MMRotate reference), **Rotated RetinaNet** ([Lin et al., ICCV 2017](https://openaccess.thecvf.com/content_ICCV_2017/papers/Lin_Focal_Loss_for_ICCV_2017_paper.pdf); oriented anchors, sigmoid focal loss), **Rotated FCOS** (anchor-free single-stage; distance-angle coder, centerness, L1 / KFIoU / decoded rIoU); ResNet + FPN backbones; selective loading of external checkpoints where configs wire `checkpoint.load_from_checkpoint`
72
79
  - **Training**: JSON configs + **`odet train`**, mixed precision (AMP), gradient accumulation, checkpointing, best-metric tracking, TensorBoard, optional curriculum learning and profiling
80
+ - **ONNX export**: pre-NMS ONNX + Python NMS (`odet export` / `make export-onnx`); consumers run ONNX Runtime only
81
+
82
+ Hands-on write-ups (code, metrics, inference knobs) live on **[DeepLearning.Earth](https://deeplearning.earth)** — especially the [15 DOTA class tour](https://deeplearning.earth/posts/2026-06-23_oriented_rcnn_detections_for_the_15_dota_classes/), [sampled rIoU and ProbIoU](https://deeplearning.earth/posts/2026-07-10_rotated_faster_rcnn_probiou_dota/), [Rotated FCOS / v0.2.0](https://deeplearning.earth/posts/2026-08-28_oriented-det_v0_2_0_rotated_fcos_decoded_riou_and_the_updated_zoo/), and [macOS FCOS vs Oriented R-CNN](https://deeplearning.earth/posts/2026-09-02_rotated_fcos_vs_oriented_rcnn_on_macos/).
73
83
 
74
84
  ## Installation
75
85
 
76
- - **Python** >= 3.9. Use [uv](https://docs.astral.sh/uv/) to install Python versions and manage the virtual environment.
86
+ - **Python** >= 3.10. Use [uv](https://docs.astral.sh/uv/) to install Python versions and manage the virtual environment.
77
87
  - From the repo root (Linux with CUDA 12.1):
78
88
 
79
89
  ```bash
@@ -85,8 +95,8 @@ cd ~/oriented-det
85
95
  uv venv --python 3.12
86
96
  source .venv/bin/activate
87
97
 
88
- # Install PyTorch with CUDA 12.1 from PyTorch's index (2.3.0 or a higher version is fine)
89
- uv pip install "torch>=2.3.0" "torchvision>=0.18.0" --index-url https://download.pytorch.org/whl/cu121
98
+ # Install PyTorch with CUDA 12.1 from PyTorch's index (2.4.0 or a higher version is fine)
99
+ uv pip install "torch>=2.4.0" "torchvision>=0.19.0" --index-url https://download.pytorch.org/whl/cu121
90
100
 
91
101
  # Install dependencies and the project in editable mode
92
102
  uv pip install -r requirements.txt
@@ -97,7 +107,8 @@ uv pip install -e .
97
107
  - From PyPI: `pip install oriented-det`
98
108
  - For development and tests: `uv pip install -e ".[dev]"`
99
109
  - For the Gradio prediction viewer: `uv pip install -e ".[viewer]"` or `pip install "oriented-det[viewer]"`
100
- - For **macOS Apple Silicon** or **CPU-only**, see [Installation](docs/getting-started/installation.md).
110
+ - For **ONNX export**: `uv pip install -e ".[export]"` then `odet export --help` (see [ONNX export](docs/examples/export.md))
111
+ - For **macOS Apple Silicon** or **CPU-only**, see [Installation](docs/getting-started/installation.md) and the [macOS walkthrough](https://deeplearning.earth/posts/2026-06-25_oriented_object_detection_on_macos_in_pure_python/) (`odet image-demo` on MPS, no CUDA toolchain).
101
112
  - Verify: `pytest tests/test_geometry.py tests/test_iou.py tests/test_nms.py`
102
113
 
103
114
  ## Quick start
@@ -143,8 +154,7 @@ After that, copy-pasted commands and unmodified configs that reference `/path/to
143
154
  | **Configs** | [`configs/`](configs/) | Experiment JSON (`_base_` inheritance, schema in `configs/config.schema.json`) |
144
155
  | **Runs** | `runs/<model_type>/<timestamp>/` | Checkpoints, `config.json` snapshot, `train.log` (created at train time; not shipped in the repo) |
145
156
  | **Docs** | [`docs/`](docs/) | MkDocs user guide and API reference |
146
- | **Export** | [`export/`](export/) | Optional ONNX / TensorFlow export pipeline |
147
- | **Examples** | [`demo/`](demo/), [`pretrained/`](pretrained/) | Demo images; registered checkpoints (large `.pth` files are usually gitignored) |
157
+ | **Examples** | [`demo/`](demo/), [`pretrained/`](pretrained/), [`notebooks/`](notebooks/), [`export/`](export/) | Demo images; Hub checkpoints; Kaggle FAIR1M tutorial notebook; ONNX export producer (`odet export`) |
148
158
 
149
159
  **`odet` vs `tools/`:** Installing the package registers the `odet` command. It loads modules under `tools/` (for example `tools.train`, `tools.save_predictions`). Shared inference and collate code lives in [`oriented_det/runtime/`](oriented_det/runtime/). You do not need two workflows — use **`odet`** (or **`make`**, which calls `odet`).
150
160
 
@@ -155,19 +165,36 @@ After that, copy-pasted commands and unmodified configs that reference `/path/to
155
165
  Full documentation is in the **docs/** folder and can be built and served with MkDocs:
156
166
 
157
167
  - **Build/serve**: `make docs` or `make docs-serve` (see [docs/README.md](docs/README.md)); or `uv pip install -e ".[docs]"` then `mkdocs serve`.
158
- - **Guides**: [Getting Started](docs/getting-started/installation.md), [User Guide](docs/user-guide/geometry.md), [API Reference](docs/api/geometry.md), [Examples](docs/examples/inference.md).
168
+ - **Guides**: [Getting Started](docs/getting-started/installation.md), [User Guide](docs/user-guide/geometry.md), [API Reference](docs/api/geometry.md), [Examples](docs/examples/inference.md), [Docker deploy](docs/examples/deploy.md), [ONNX export](docs/examples/export.md).
169
+ - **Blog**: [DeepLearning.Earth](https://deeplearning.earth) — curated posts below (code, metrics, inference knobs).
170
+
171
+ | Topic | Post |
172
+ |-------|------|
173
+ | Why OrientedDet / Apache 2.0 stack | [https://deeplearning.earth/posts/2026-06-22_oriented-det_v0_1_0_sovereign_oriented_object_detection_for_eo/](https://deeplearning.earth/posts/2026-06-22_oriented-det_v0_1_0_sovereign_oriented_object_detection_for_eo/) |
174
+ | Visual detections (15 DOTA classes) | [https://deeplearning.earth/posts/2026-06-23_oriented_rcnn_detections_for_the_15_dota_classes/](https://deeplearning.earth/posts/2026-06-23_oriented_rcnn_detections_for_the_15_dota_classes/) |
175
+ | `odet image-demo` on Apple Silicon | [https://deeplearning.earth/posts/2026-06-25_oriented_object_detection_on_macos_in_pure_python/](https://deeplearning.earth/posts/2026-06-25_oriented_object_detection_on_macos_in_pure_python/) |
176
+ | Sliding-window inference (`demo/large.jpg`) | [https://deeplearning.earth/posts/2026-06-29_announcing_the_final_oriented_det_pretrained_model/](https://deeplearning.earth/posts/2026-06-29_announcing_the_final_oriented_det_pretrained_model/) |
177
+ | Sentinel-2 ships (`--zoom`, class filter) | [https://deeplearning.earth/posts/2026-06-25_zero-shot_ship_detection_on_a_copernicus_sentinel-2_tile_with_oriented_rcnn/](https://deeplearning.earth/posts/2026-06-25_zero-shot_ship_detection_on_a_copernicus_sentinel-2_tile_with_oriented_rcnn/) |
178
+ | Sampled rIoU, ProbIoU, Faster R-CNN Task 1 | [https://deeplearning.earth/posts/2026-07-10_rotated_faster_rcnn_probiou_dota/](https://deeplearning.earth/posts/2026-07-10_rotated_faster_rcnn_probiou_dota/) |
179
+ | Zoo / MMRotate parity | [https://deeplearning.earth/posts/2026-07-11_oriented-det_v0_1_1_prob_iou_mmrotate_parity_and_the_updated_zoo/](https://deeplearning.earth/posts/2026-07-11_oriented-det_v0_1_1_prob_iou_mmrotate_parity_and_the_updated_zoo/) |
180
+ | Rotated FCOS, decoded rIoU, four-family zoo | [https://deeplearning.earth/posts/2026-08-28_oriented-det_v0_2_0_rotated_fcos_decoded_riou_and_the_updated_zoo/](https://deeplearning.earth/posts/2026-08-28_oriented-det_v0_2_0_rotated_fcos_decoded_riou_and_the_updated_zoo/) |
181
+ | FCOS vs Oriented R-CNN (MPS latency, thresholds) | [https://deeplearning.earth/posts/2026-09-02_rotated_fcos_vs_oriented_rcnn_on_macos/](https://deeplearning.earth/posts/2026-09-02_rotated_fcos_vs_oriented_rcnn_on_macos/) |
182
+ | Side-by-side browser demo (three 1× checkpoints) | [https://deeplearning.earth/posts/2026-09-06_oriented_det_optical_satellite_demo/](https://deeplearning.earth/posts/2026-09-06_oriented_det_optical_satellite_demo/) |
183
+ | Apache 2.0 vs DOTA / HRSC dataset terms | [https://deeplearning.earth/posts/2026-09-10_oriented_det_apache_license_versus_dota/](https://deeplearning.earth/posts/2026-09-10_oriented_det_apache_license_versus_dota/) |
184
+ | Docker deploy (Tile Geo Process) | [https://deeplearning.earth/posts/2026-10-05_deploy_oriented_det_in_docker/](https://deeplearning.earth/posts/2026-10-05_deploy_oriented_det_in_docker/) |
185
+ | ONNX export (no PyTorch on infer) | [https://deeplearning.earth/posts/2026-10-08_onnx_export_without_pytorch/](https://deeplearning.earth/posts/2026-10-08_onnx_export_without_pytorch/) |
159
186
 
160
187
  ## Documentation by folder
161
188
 
162
189
  | Folder | README | Description |
163
190
  |--------|--------|-------------|
164
- | [export/](export/) | [export/README.md](export/README.md) | Phase 1: PyTorch → ONNX → Keras detect bundle; `cd export && make export-tf` |
165
- | [demo/](demo/) | [demo/README.md](demo/README.md) | Demo images; `odet image-demo` or `make demo` with the latest `runs/` checkpoint |
191
+ | [demo/](demo/) | [demo/README.md](demo/README.md) | Demo images; `odet image-demo` or `make demo` with the latest `runs/` checkpoint. Write-ups: [macOS image-demo](https://deeplearning.earth/posts/2026-06-25_oriented_object_detection_on_macos_in_pure_python/) · [sliding-window (`demo/large.jpg`)](https://deeplearning.earth/posts/2026-06-29_announcing_the_final_oriented_det_pretrained_model/) |
166
192
  | [pretrained/](pretrained/) | [pretrained/README.md](pretrained/README.md) | Registered checkpoints for fine-tunes; large `.pth` files are usually gitignored |
167
193
  | [oriented_det/cli/](oriented_det/cli/) | [oriented_det/cli/README.md](oriented_det/cli/README.md) | **`odet`** entry point and subcommand list |
168
194
  | [tools/](tools/) | [tools/README.md](tools/README.md) | CLI script implementations (invoked by `odet`; see [Repository layout](#repository-layout)) |
169
195
  | [configs/](configs/) | [configs/README.md](configs/README.md) | DOTA configs and **pretrain model zoo** (`_base_` inheritance) |
170
- | [deploy/example/](deploy/example/) | [deploy/example/README.md](deploy/example/README.md) | Minimal DOTA deploy smoke image |
196
+ | [deploy/example/](deploy/example/) | [deploy/example/README.md](deploy/example/README.md) | Sanic Tile Geo Process Docker image (DOTA smoke) |
197
+ | [export/](export/) | [export/README.md](export/README.md) | ONNX export producer (`odet export`); consumer bundle in gitignored `onnx_export/` |
171
198
  | [docs/](docs/) | [docs/README.md](docs/README.md) | MkDocs source; full user guide and API reference |
172
199
 
173
200
  ## Training and evaluation
@@ -178,15 +205,19 @@ Install once: `uv pip install -e .`. Then:
178
205
  |------|---------|
179
206
  | Train | `odet train --config configs/oriented_rcnn/dota_le90_1x.json` or `make train` |
180
207
  | Multi-GPU | `make train-multi-gpu` (`torchrun` + cuDNN on `LD_LIBRARY_PATH`) |
181
- | Tile DOTA | `odet tile-dota /path/to/dota/train` |
208
+ | Tile DOTA | `odet tile-dota /path/to/data/DOTA-v1.0/train` |
209
+ | HRSC2016 → DOTA (optional) | `odet hrsc-to-dota --data-root /path/to/data/HRSC2016 --output-dir /path/to/data/HRSC2016-dota` |
210
+ | SSDD → DOTA (optional) | `odet ssdd-to-dota --data-root /path/to/data/Official-SSDD-OPEN --output-dir /path/to/data/SSDD-dota` |
211
+ | COCO polygons → DOTA | `odet coco-to-dota --ann-file instances.json --image-dir images --output-dir out` |
182
212
  | Val predictions | `odet preds --experiment-dir runs/oriented_rcnn/<timestamp>` or `make preds` |
183
- | Offline mAP | `make eval-val` or `make preds` then `make metrics` |
213
+ | Offline mAP | `make eval-val` or `make preds` then `make metrics`. DOTA: leaky val tiles (real test is Task 1). HRSC/FAIR1M/SSDD/HRSID: held-out test/val. |
214
+ | ONNX export | `odet export onnx ...` or `make export-onnx` (see [export/README.md](export/README.md)) |
184
215
 
185
- DOTA configs: per-model `dota_le90_1x.json` / `dota_le90_3x.json` under [configs/](configs/). Run `odet --help` for all subcommands. Makefile shortcuts and script-level options: [tools/README.md](tools/README.md). Config reference: [docs/user-guide/configuration.md](docs/user-guide/configuration.md), [configs/config.schema.json](configs/config.schema.json), [configs/README.md](configs/README.md).
216
+ DOTA configs: per-model `dota_le90_1x.json` under [configs/](configs/) (3× where published; Faster R-CNN and FCOS DOTA are 1×). Run `odet --help` for all subcommands. Makefile shortcuts and script-level options: [tools/README.md](tools/README.md). Config reference: [docs/user-guide/configuration.md](docs/user-guide/configuration.md), [configs/config.schema.json](configs/config.schema.json), [configs/README.md](configs/README.md).
186
217
 
187
218
  ## Pretrained weights and evaluation
188
219
 
189
- - Place exported best checkpoints under **`pretrained/`** or use Hub slugs (`odet pretrained download oriented_rcnn_dota_le90_3x` or `oriented_rcnn_dota_le90_1x`). See [pretrained/README.md](pretrained/README.md) and [configs/README.md](configs/README.md#dota-pretrained-models-model-zoo).
220
+ - Place exported best checkpoints under **`pretrained/`** or use Hub slugs (`odet pretrained download oriented_rcnn_dota_le90_3x`, `rotated_faster_rcnn_dota_le90_1x`, `rotated_faster_rcnn_dota_le90_3x`, `rotated_fcos_dota_le90_1x`, or `oriented_rcnn_hrsc2016_le90_3x` / `rotated_faster_rcnn_hrsc2016_le90_3x` / `rotated_fcos_hrsc2016_le90_3x`). See [pretrained/README.md](pretrained/README.md) and [configs/README.md](configs/README.md#dota-pretrained-models-model-zoo). Zoo write-ups: [v0.1.1](https://deeplearning.earth/posts/2026-07-11_oriented-det_v0_1_1_prob_iou_mmrotate_parity_and_the_updated_zoo/) · [v0.2.0 FCOS](https://deeplearning.earth/posts/2026-08-28_oriented-det_v0_2_0_rotated_fcos_decoded_riou_and_the_updated_zoo/) · [optical satellite demo](https://deeplearning.earth/posts/2026-09-06_oriented_det_optical_satellite_demo/).
190
221
  - **Tiled validation:** after training, run `make preds` then `make metrics`. Published mAP reports: [`docs/eval-reports/`](docs/eval-reports/) (git). Raw detections for the viewer: gitignored [`predictions/`](predictions/).
191
222
 
192
223
  ## Important notes
@@ -201,8 +232,8 @@ See **[docs/roadmap.md](docs/roadmap.md)** for the full public plan. Summary:
201
232
 
202
233
  - **v0.1** (shipped): Geometry, IoU/NMS, DOTA, three ResNet-FPN detectors, config training, Hub pretrained weights
203
234
  - **v0.1.1** (shipped): ProbIoU Faster R-CNN 1×/3× on Hub
204
- - **v0.2** (shipped): Rotated FCOS (anchor-free single-stage); Hub `rotated_fcos_dota_le90_3x_riou` (81.58% eval-val mAP50)
205
- - **v0.3**: HRSC2016 and FAIR1M dataset support
235
+ - **v0.2** (shipped): Rotated FCOS (anchor-free single-stage); Hub `rotated_fcos_dota_le90_1x` (73.07% official Task 1)
236
+ - **v0.3** (shipped): HRSC2016 loader + Hub 3× zoo (Oriented R-CNN 90.41%, Faster R-CNN 88.77%, FCOS 88.34% eval-val); FAIR1M loader + 1× recipes; SSDD + HRSID SAR loaders + 1× recipes (SSDD Faster R-CNN held-out **90.34%**, HRSID **78.55%**; train locally, no SAR Hub)
206
237
  - **v0.4**: RTMDet-R and native YOLO-OBB (AGPL-free production tier)
207
238
  - **v0.5+**: Swin-FPN backbone; optional fused CUDA kernels; hosted docs
208
239
 
@@ -210,9 +241,13 @@ See **[docs/roadmap.md](docs/roadmap.md)** for the full public plan. Summary:
210
241
 
211
242
  Contributions are welcome. Run tests with `pytest`, format with `black` and `ruff`. See [docs/contributing.md](docs/contributing.md) for guidelines.
212
243
 
244
+ ## Consulting and custom development
245
+
246
+ OrientedDet is Apache-2.0 open source. For **consulting, training workshops, or custom development** (dataset design, on-prem training, production packaging), see **[DL4EO](https://dl4eo.com)**.
247
+
213
248
  ## Publishing to PyPI
214
249
 
215
- Version **0.2.0** — tag releases as **`v0.2.0`** (git) matching `version` in `pyproject.toml`.
250
+ Version **0.3.1** — tag releases as **`v0.3.1`** (git) matching `version` in `pyproject.toml`.
216
251
 
217
252
  Configs: edit **`configs/`** at the repo root, then **`make sync-configs`** so **`oriented_det/configs/`** stays in sync (see **`oriented_det/configs/vendored_manifest.txt`**). CI runs **`make check-configs`**.
218
253
 
@@ -243,7 +278,7 @@ make check-configs
243
278
  pytest tests/ -q
244
279
  ```
245
280
 
246
- Bump version in `pyproject.toml` and `docs/changelog.md` if needed (currently **0.1.0**).
281
+ Bump version in `pyproject.toml` and `docs/changelog.md` if needed (currently **0.3.1**).
247
282
 
248
283
  #### 3. Build locally
249
284
 
@@ -318,6 +353,8 @@ Notes:
318
353
 
319
354
  **Apache-2.0** — Copyright © Jeff Faudi and [DL4EO](https://dl4eo.com). See [LICENSE](LICENSE) for details.
320
355
 
356
+ The framework license does not grant rights to the **DOTA** or **HRSC** datasets. See [Apache 2.0 vs DOTA / HRSC dataset terms](https://deeplearning.earth/posts/2026-09-10_oriented_det_apache_license_versus_dota/).
357
+
321
358
  ## Acknowledgements
322
359
 
323
360
  Design and APIs are informed by MMRotate, MMDetection, Detectron2, and related work in oriented object detection; **pretrained checkpoints in `pretrained/` are OrientedDet exports from this codebase**, not MMRotate zoo bundles.
@@ -2,17 +2,28 @@
2
2
 
3
3
  **OrientedDet** is a lightweight, modern PyTorch library for **rotated object detection** in aerial and satellite imagery. It focuses on clean geometry, reliable operators, simple datasets, and practical baseline models—without the complexity of large detection frameworks. OrientedDet is designed for researchers, practitioners, and geospatial developers who need accurate rotation-aware detectors with a minimal API.
4
4
 
5
+ <p align="center">
6
+ <img src="demo/out/demo_detections.png" alt="Oriented R-CNN detections on diagonally parked buses in an aerial parking lot" width="720">
7
+ </p>
8
+
9
+ <p align="center"><em>Oriented R-CNN on the bundled <code>demo/demo.jpg</code> tile — rotated boxes follow vehicle heading instead of swallowing neighbours in axis-aligned rectangles.</em></p>
10
+
11
+ **Docs:** [dl4eo.github.io/oriented-det](https://dl4eo.github.io/oriented-det/) · **Blog:** [deeplearning.earth](https://deeplearning.earth) · **Company:** [dl4eo.com](https://dl4eo.com) (consulting and custom development)
12
+
5
13
  ## Features
6
14
 
7
15
  - **Geometry**: Rotated bounding boxes (rbox: cx, cy, w, h, angle), quadrilateral boxes (qbox), polygon ↔ rbox ↔ hbox conversions, angle normalization (le90, 0–180°), flip/rotate/scale transforms, visualization helpers
8
16
  - **IoU & NMS**: Rotated IoU and oriented NMS (CPU with optional GPU kernels when available); AABB pre-filtering; `obb_to_xyxy` / HBB conversion
9
- - **Datasets**: DOTA polygon loader (pattern, split file, or separate folders), image tiling, label filtering, ignore masks, oriented mAP evaluation
17
+ - **Datasets**: DOTA polygon loader (pattern, split file, or separate folders), **HRSC2016** native XML loader, **FAIR1M** 37-class XML loader (+ convert/tile tutorial), **SSDD** and **HRSID** SAR ship loaders (finetune DOTA 1× Hub locally; no SAR zoo), image tiling, label filtering, ignore masks, oriented mAP evaluation
10
18
  - **Models**: **Oriented R-CNN** ([Xie et al., ICCV 2021](https://openaccess.thecvf.com/content/ICCV2021/html/Xie_Oriented_R-CNN_for_Object_Detection_ICCV_2021_paper.html); horizontal RPN + MidpointOffset → oriented RoIAlign + oriented ROI head), **Rotated Faster R-CNN** (Ren et al., NeurIPS 2015 two-stage baseline with horizontal RPN + horizontal RoIAlign + rotated ROI head; MMRotate reference), **Rotated RetinaNet** ([Lin et al., ICCV 2017](https://openaccess.thecvf.com/content_ICCV_2017/papers/Lin_Focal_Loss_for_ICCV_2017_paper.pdf); oriented anchors, sigmoid focal loss), **Rotated FCOS** (anchor-free single-stage; distance-angle coder, centerness, L1 / KFIoU / decoded rIoU); ResNet + FPN backbones; selective loading of external checkpoints where configs wire `checkpoint.load_from_checkpoint`
11
19
  - **Training**: JSON configs + **`odet train`**, mixed precision (AMP), gradient accumulation, checkpointing, best-metric tracking, TensorBoard, optional curriculum learning and profiling
20
+ - **ONNX export**: pre-NMS ONNX + Python NMS (`odet export` / `make export-onnx`); consumers run ONNX Runtime only
21
+
22
+ Hands-on write-ups (code, metrics, inference knobs) live on **[DeepLearning.Earth](https://deeplearning.earth)** — especially the [15 DOTA class tour](https://deeplearning.earth/posts/2026-06-23_oriented_rcnn_detections_for_the_15_dota_classes/), [sampled rIoU and ProbIoU](https://deeplearning.earth/posts/2026-07-10_rotated_faster_rcnn_probiou_dota/), [Rotated FCOS / v0.2.0](https://deeplearning.earth/posts/2026-08-28_oriented-det_v0_2_0_rotated_fcos_decoded_riou_and_the_updated_zoo/), and [macOS FCOS vs Oriented R-CNN](https://deeplearning.earth/posts/2026-09-02_rotated_fcos_vs_oriented_rcnn_on_macos/).
12
23
 
13
24
  ## Installation
14
25
 
15
- - **Python** >= 3.9. Use [uv](https://docs.astral.sh/uv/) to install Python versions and manage the virtual environment.
26
+ - **Python** >= 3.10. Use [uv](https://docs.astral.sh/uv/) to install Python versions and manage the virtual environment.
16
27
  - From the repo root (Linux with CUDA 12.1):
17
28
 
18
29
  ```bash
@@ -24,8 +35,8 @@ cd ~/oriented-det
24
35
  uv venv --python 3.12
25
36
  source .venv/bin/activate
26
37
 
27
- # Install PyTorch with CUDA 12.1 from PyTorch's index (2.3.0 or a higher version is fine)
28
- uv pip install "torch>=2.3.0" "torchvision>=0.18.0" --index-url https://download.pytorch.org/whl/cu121
38
+ # Install PyTorch with CUDA 12.1 from PyTorch's index (2.4.0 or a higher version is fine)
39
+ uv pip install "torch>=2.4.0" "torchvision>=0.19.0" --index-url https://download.pytorch.org/whl/cu121
29
40
 
30
41
  # Install dependencies and the project in editable mode
31
42
  uv pip install -r requirements.txt
@@ -36,7 +47,8 @@ uv pip install -e .
36
47
  - From PyPI: `pip install oriented-det`
37
48
  - For development and tests: `uv pip install -e ".[dev]"`
38
49
  - For the Gradio prediction viewer: `uv pip install -e ".[viewer]"` or `pip install "oriented-det[viewer]"`
39
- - For **macOS Apple Silicon** or **CPU-only**, see [Installation](docs/getting-started/installation.md).
50
+ - For **ONNX export**: `uv pip install -e ".[export]"` then `odet export --help` (see [ONNX export](docs/examples/export.md))
51
+ - For **macOS Apple Silicon** or **CPU-only**, see [Installation](docs/getting-started/installation.md) and the [macOS walkthrough](https://deeplearning.earth/posts/2026-06-25_oriented_object_detection_on_macos_in_pure_python/) (`odet image-demo` on MPS, no CUDA toolchain).
40
52
  - Verify: `pytest tests/test_geometry.py tests/test_iou.py tests/test_nms.py`
41
53
 
42
54
  ## Quick start
@@ -82,8 +94,7 @@ After that, copy-pasted commands and unmodified configs that reference `/path/to
82
94
  | **Configs** | [`configs/`](configs/) | Experiment JSON (`_base_` inheritance, schema in `configs/config.schema.json`) |
83
95
  | **Runs** | `runs/<model_type>/<timestamp>/` | Checkpoints, `config.json` snapshot, `train.log` (created at train time; not shipped in the repo) |
84
96
  | **Docs** | [`docs/`](docs/) | MkDocs user guide and API reference |
85
- | **Export** | [`export/`](export/) | Optional ONNX / TensorFlow export pipeline |
86
- | **Examples** | [`demo/`](demo/), [`pretrained/`](pretrained/) | Demo images; registered checkpoints (large `.pth` files are usually gitignored) |
97
+ | **Examples** | [`demo/`](demo/), [`pretrained/`](pretrained/), [`notebooks/`](notebooks/), [`export/`](export/) | Demo images; Hub checkpoints; Kaggle FAIR1M tutorial notebook; ONNX export producer (`odet export`) |
87
98
 
88
99
  **`odet` vs `tools/`:** Installing the package registers the `odet` command. It loads modules under `tools/` (for example `tools.train`, `tools.save_predictions`). Shared inference and collate code lives in [`oriented_det/runtime/`](oriented_det/runtime/). You do not need two workflows — use **`odet`** (or **`make`**, which calls `odet`).
89
100
 
@@ -94,19 +105,36 @@ After that, copy-pasted commands and unmodified configs that reference `/path/to
94
105
  Full documentation is in the **docs/** folder and can be built and served with MkDocs:
95
106
 
96
107
  - **Build/serve**: `make docs` or `make docs-serve` (see [docs/README.md](docs/README.md)); or `uv pip install -e ".[docs]"` then `mkdocs serve`.
97
- - **Guides**: [Getting Started](docs/getting-started/installation.md), [User Guide](docs/user-guide/geometry.md), [API Reference](docs/api/geometry.md), [Examples](docs/examples/inference.md).
108
+ - **Guides**: [Getting Started](docs/getting-started/installation.md), [User Guide](docs/user-guide/geometry.md), [API Reference](docs/api/geometry.md), [Examples](docs/examples/inference.md), [Docker deploy](docs/examples/deploy.md), [ONNX export](docs/examples/export.md).
109
+ - **Blog**: [DeepLearning.Earth](https://deeplearning.earth) — curated posts below (code, metrics, inference knobs).
110
+
111
+ | Topic | Post |
112
+ |-------|------|
113
+ | Why OrientedDet / Apache 2.0 stack | [https://deeplearning.earth/posts/2026-06-22_oriented-det_v0_1_0_sovereign_oriented_object_detection_for_eo/](https://deeplearning.earth/posts/2026-06-22_oriented-det_v0_1_0_sovereign_oriented_object_detection_for_eo/) |
114
+ | Visual detections (15 DOTA classes) | [https://deeplearning.earth/posts/2026-06-23_oriented_rcnn_detections_for_the_15_dota_classes/](https://deeplearning.earth/posts/2026-06-23_oriented_rcnn_detections_for_the_15_dota_classes/) |
115
+ | `odet image-demo` on Apple Silicon | [https://deeplearning.earth/posts/2026-06-25_oriented_object_detection_on_macos_in_pure_python/](https://deeplearning.earth/posts/2026-06-25_oriented_object_detection_on_macos_in_pure_python/) |
116
+ | Sliding-window inference (`demo/large.jpg`) | [https://deeplearning.earth/posts/2026-06-29_announcing_the_final_oriented_det_pretrained_model/](https://deeplearning.earth/posts/2026-06-29_announcing_the_final_oriented_det_pretrained_model/) |
117
+ | Sentinel-2 ships (`--zoom`, class filter) | [https://deeplearning.earth/posts/2026-06-25_zero-shot_ship_detection_on_a_copernicus_sentinel-2_tile_with_oriented_rcnn/](https://deeplearning.earth/posts/2026-06-25_zero-shot_ship_detection_on_a_copernicus_sentinel-2_tile_with_oriented_rcnn/) |
118
+ | Sampled rIoU, ProbIoU, Faster R-CNN Task 1 | [https://deeplearning.earth/posts/2026-07-10_rotated_faster_rcnn_probiou_dota/](https://deeplearning.earth/posts/2026-07-10_rotated_faster_rcnn_probiou_dota/) |
119
+ | Zoo / MMRotate parity | [https://deeplearning.earth/posts/2026-07-11_oriented-det_v0_1_1_prob_iou_mmrotate_parity_and_the_updated_zoo/](https://deeplearning.earth/posts/2026-07-11_oriented-det_v0_1_1_prob_iou_mmrotate_parity_and_the_updated_zoo/) |
120
+ | Rotated FCOS, decoded rIoU, four-family zoo | [https://deeplearning.earth/posts/2026-08-28_oriented-det_v0_2_0_rotated_fcos_decoded_riou_and_the_updated_zoo/](https://deeplearning.earth/posts/2026-08-28_oriented-det_v0_2_0_rotated_fcos_decoded_riou_and_the_updated_zoo/) |
121
+ | FCOS vs Oriented R-CNN (MPS latency, thresholds) | [https://deeplearning.earth/posts/2026-09-02_rotated_fcos_vs_oriented_rcnn_on_macos/](https://deeplearning.earth/posts/2026-09-02_rotated_fcos_vs_oriented_rcnn_on_macos/) |
122
+ | Side-by-side browser demo (three 1× checkpoints) | [https://deeplearning.earth/posts/2026-09-06_oriented_det_optical_satellite_demo/](https://deeplearning.earth/posts/2026-09-06_oriented_det_optical_satellite_demo/) |
123
+ | Apache 2.0 vs DOTA / HRSC dataset terms | [https://deeplearning.earth/posts/2026-09-10_oriented_det_apache_license_versus_dota/](https://deeplearning.earth/posts/2026-09-10_oriented_det_apache_license_versus_dota/) |
124
+ | Docker deploy (Tile Geo Process) | [https://deeplearning.earth/posts/2026-10-05_deploy_oriented_det_in_docker/](https://deeplearning.earth/posts/2026-10-05_deploy_oriented_det_in_docker/) |
125
+ | ONNX export (no PyTorch on infer) | [https://deeplearning.earth/posts/2026-10-08_onnx_export_without_pytorch/](https://deeplearning.earth/posts/2026-10-08_onnx_export_without_pytorch/) |
98
126
 
99
127
  ## Documentation by folder
100
128
 
101
129
  | Folder | README | Description |
102
130
  |--------|--------|-------------|
103
- | [export/](export/) | [export/README.md](export/README.md) | Phase 1: PyTorch → ONNX → Keras detect bundle; `cd export && make export-tf` |
104
- | [demo/](demo/) | [demo/README.md](demo/README.md) | Demo images; `odet image-demo` or `make demo` with the latest `runs/` checkpoint |
131
+ | [demo/](demo/) | [demo/README.md](demo/README.md) | Demo images; `odet image-demo` or `make demo` with the latest `runs/` checkpoint. Write-ups: [macOS image-demo](https://deeplearning.earth/posts/2026-06-25_oriented_object_detection_on_macos_in_pure_python/) · [sliding-window (`demo/large.jpg`)](https://deeplearning.earth/posts/2026-06-29_announcing_the_final_oriented_det_pretrained_model/) |
105
132
  | [pretrained/](pretrained/) | [pretrained/README.md](pretrained/README.md) | Registered checkpoints for fine-tunes; large `.pth` files are usually gitignored |
106
133
  | [oriented_det/cli/](oriented_det/cli/) | [oriented_det/cli/README.md](oriented_det/cli/README.md) | **`odet`** entry point and subcommand list |
107
134
  | [tools/](tools/) | [tools/README.md](tools/README.md) | CLI script implementations (invoked by `odet`; see [Repository layout](#repository-layout)) |
108
135
  | [configs/](configs/) | [configs/README.md](configs/README.md) | DOTA configs and **pretrain model zoo** (`_base_` inheritance) |
109
- | [deploy/example/](deploy/example/) | [deploy/example/README.md](deploy/example/README.md) | Minimal DOTA deploy smoke image |
136
+ | [deploy/example/](deploy/example/) | [deploy/example/README.md](deploy/example/README.md) | Sanic Tile Geo Process Docker image (DOTA smoke) |
137
+ | [export/](export/) | [export/README.md](export/README.md) | ONNX export producer (`odet export`); consumer bundle in gitignored `onnx_export/` |
110
138
  | [docs/](docs/) | [docs/README.md](docs/README.md) | MkDocs source; full user guide and API reference |
111
139
 
112
140
  ## Training and evaluation
@@ -117,15 +145,19 @@ Install once: `uv pip install -e .`. Then:
117
145
  |------|---------|
118
146
  | Train | `odet train --config configs/oriented_rcnn/dota_le90_1x.json` or `make train` |
119
147
  | Multi-GPU | `make train-multi-gpu` (`torchrun` + cuDNN on `LD_LIBRARY_PATH`) |
120
- | Tile DOTA | `odet tile-dota /path/to/dota/train` |
148
+ | Tile DOTA | `odet tile-dota /path/to/data/DOTA-v1.0/train` |
149
+ | HRSC2016 → DOTA (optional) | `odet hrsc-to-dota --data-root /path/to/data/HRSC2016 --output-dir /path/to/data/HRSC2016-dota` |
150
+ | SSDD → DOTA (optional) | `odet ssdd-to-dota --data-root /path/to/data/Official-SSDD-OPEN --output-dir /path/to/data/SSDD-dota` |
151
+ | COCO polygons → DOTA | `odet coco-to-dota --ann-file instances.json --image-dir images --output-dir out` |
121
152
  | Val predictions | `odet preds --experiment-dir runs/oriented_rcnn/<timestamp>` or `make preds` |
122
- | Offline mAP | `make eval-val` or `make preds` then `make metrics` |
153
+ | Offline mAP | `make eval-val` or `make preds` then `make metrics`. DOTA: leaky val tiles (real test is Task 1). HRSC/FAIR1M/SSDD/HRSID: held-out test/val. |
154
+ | ONNX export | `odet export onnx ...` or `make export-onnx` (see [export/README.md](export/README.md)) |
123
155
 
124
- DOTA configs: per-model `dota_le90_1x.json` / `dota_le90_3x.json` under [configs/](configs/). Run `odet --help` for all subcommands. Makefile shortcuts and script-level options: [tools/README.md](tools/README.md). Config reference: [docs/user-guide/configuration.md](docs/user-guide/configuration.md), [configs/config.schema.json](configs/config.schema.json), [configs/README.md](configs/README.md).
156
+ DOTA configs: per-model `dota_le90_1x.json` under [configs/](configs/) (3× where published; Faster R-CNN and FCOS DOTA are 1×). Run `odet --help` for all subcommands. Makefile shortcuts and script-level options: [tools/README.md](tools/README.md). Config reference: [docs/user-guide/configuration.md](docs/user-guide/configuration.md), [configs/config.schema.json](configs/config.schema.json), [configs/README.md](configs/README.md).
125
157
 
126
158
  ## Pretrained weights and evaluation
127
159
 
128
- - Place exported best checkpoints under **`pretrained/`** or use Hub slugs (`odet pretrained download oriented_rcnn_dota_le90_3x` or `oriented_rcnn_dota_le90_1x`). See [pretrained/README.md](pretrained/README.md) and [configs/README.md](configs/README.md#dota-pretrained-models-model-zoo).
160
+ - Place exported best checkpoints under **`pretrained/`** or use Hub slugs (`odet pretrained download oriented_rcnn_dota_le90_3x`, `rotated_faster_rcnn_dota_le90_1x`, `rotated_faster_rcnn_dota_le90_3x`, `rotated_fcos_dota_le90_1x`, or `oriented_rcnn_hrsc2016_le90_3x` / `rotated_faster_rcnn_hrsc2016_le90_3x` / `rotated_fcos_hrsc2016_le90_3x`). See [pretrained/README.md](pretrained/README.md) and [configs/README.md](configs/README.md#dota-pretrained-models-model-zoo). Zoo write-ups: [v0.1.1](https://deeplearning.earth/posts/2026-07-11_oriented-det_v0_1_1_prob_iou_mmrotate_parity_and_the_updated_zoo/) · [v0.2.0 FCOS](https://deeplearning.earth/posts/2026-08-28_oriented-det_v0_2_0_rotated_fcos_decoded_riou_and_the_updated_zoo/) · [optical satellite demo](https://deeplearning.earth/posts/2026-09-06_oriented_det_optical_satellite_demo/).
129
161
  - **Tiled validation:** after training, run `make preds` then `make metrics`. Published mAP reports: [`docs/eval-reports/`](docs/eval-reports/) (git). Raw detections for the viewer: gitignored [`predictions/`](predictions/).
130
162
 
131
163
  ## Important notes
@@ -140,8 +172,8 @@ See **[docs/roadmap.md](docs/roadmap.md)** for the full public plan. Summary:
140
172
 
141
173
  - **v0.1** (shipped): Geometry, IoU/NMS, DOTA, three ResNet-FPN detectors, config training, Hub pretrained weights
142
174
  - **v0.1.1** (shipped): ProbIoU Faster R-CNN 1×/3× on Hub
143
- - **v0.2** (shipped): Rotated FCOS (anchor-free single-stage); Hub `rotated_fcos_dota_le90_3x_riou` (81.58% eval-val mAP50)
144
- - **v0.3**: HRSC2016 and FAIR1M dataset support
175
+ - **v0.2** (shipped): Rotated FCOS (anchor-free single-stage); Hub `rotated_fcos_dota_le90_1x` (73.07% official Task 1)
176
+ - **v0.3** (shipped): HRSC2016 loader + Hub 3× zoo (Oriented R-CNN 90.41%, Faster R-CNN 88.77%, FCOS 88.34% eval-val); FAIR1M loader + 1× recipes; SSDD + HRSID SAR loaders + 1× recipes (SSDD Faster R-CNN held-out **90.34%**, HRSID **78.55%**; train locally, no SAR Hub)
145
177
  - **v0.4**: RTMDet-R and native YOLO-OBB (AGPL-free production tier)
146
178
  - **v0.5+**: Swin-FPN backbone; optional fused CUDA kernels; hosted docs
147
179
 
@@ -149,9 +181,13 @@ See **[docs/roadmap.md](docs/roadmap.md)** for the full public plan. Summary:
149
181
 
150
182
  Contributions are welcome. Run tests with `pytest`, format with `black` and `ruff`. See [docs/contributing.md](docs/contributing.md) for guidelines.
151
183
 
184
+ ## Consulting and custom development
185
+
186
+ OrientedDet is Apache-2.0 open source. For **consulting, training workshops, or custom development** (dataset design, on-prem training, production packaging), see **[DL4EO](https://dl4eo.com)**.
187
+
152
188
  ## Publishing to PyPI
153
189
 
154
- Version **0.2.0** — tag releases as **`v0.2.0`** (git) matching `version` in `pyproject.toml`.
190
+ Version **0.3.1** — tag releases as **`v0.3.1`** (git) matching `version` in `pyproject.toml`.
155
191
 
156
192
  Configs: edit **`configs/`** at the repo root, then **`make sync-configs`** so **`oriented_det/configs/`** stays in sync (see **`oriented_det/configs/vendored_manifest.txt`**). CI runs **`make check-configs`**.
157
193
 
@@ -182,7 +218,7 @@ make check-configs
182
218
  pytest tests/ -q
183
219
  ```
184
220
 
185
- Bump version in `pyproject.toml` and `docs/changelog.md` if needed (currently **0.1.0**).
221
+ Bump version in `pyproject.toml` and `docs/changelog.md` if needed (currently **0.3.1**).
186
222
 
187
223
  #### 3. Build locally
188
224
 
@@ -257,6 +293,8 @@ Notes:
257
293
 
258
294
  **Apache-2.0** — Copyright © Jeff Faudi and [DL4EO](https://dl4eo.com). See [LICENSE](LICENSE) for details.
259
295
 
296
+ The framework license does not grant rights to the **DOTA** or **HRSC** datasets. See [Apache 2.0 vs DOTA / HRSC dataset terms](https://deeplearning.earth/posts/2026-09-10_oriented_det_apache_license_versus_dota/).
297
+
260
298
  ## Acknowledgements
261
299
 
262
300
  Design and APIs are informed by MMRotate, MMDetection, Detectron2, and related work in oriented object detection; **pretrained checkpoints in `pretrained/` are OrientedDet exports from this codebase**, not MMRotate zoo bundles.
@@ -0,0 +1,13 @@
1
+ """ONNX export package for OrientedDet. CLI: ``odet export`` / ``python -m export``.
2
+
3
+ Inference (``demo`` / ``infer``) needs only numpy, Pillow, and onnxruntime —
4
+ see ``requirements-runtime.txt``. The same consumer modules are copied into
5
+ ``onnx_export/`` at export. Exporting a checkpoint still needs oriented-det
6
+ plus ``requirements-export.txt``.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ from .cli import install_hint
12
+
13
+ __all__ = ["install_hint"]
@@ -0,0 +1,6 @@
1
+ """``python -m export`` entry point (same as ``odet export``)."""
2
+
3
+ from export.cli import main
4
+
5
+ if __name__ == "__main__":
6
+ main()
@@ -0,0 +1,95 @@
1
+ """ONNX export CLI (``odet export`` / ``python -m export``)."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import importlib
6
+ import sys
7
+ from pathlib import Path
8
+ from typing import Dict, List, Optional, Tuple
9
+
10
+ # Maps subcommand name -> (module path, argv[0] for the target script)
11
+ _COMMANDS: Dict[str, Tuple[str, str]] = {
12
+ "onnx": ("export.scripts.export_onnx", "export-onnx"),
13
+ "infer": ("export.scripts.infer_onnx", "export-infer"),
14
+ "demo": ("export.scripts.demo", "export-demo"),
15
+ "preds": ("export.scripts.save_predictions_onnx", "export-preds"),
16
+ }
17
+
18
+ # Legacy python -m export names. Top-level odet export-* (TF / SavedModel) stay removed.
19
+ _ALIASES = {
20
+ "export-onnx": "onnx",
21
+ "export-infer": "infer",
22
+ "export-demo": "demo",
23
+ "export-preds": "preds",
24
+ }
25
+
26
+
27
+ def install_hint() -> str:
28
+ root = Path(__file__).resolve().parent
29
+ runtime = root / "requirements-runtime.txt"
30
+ export = root / "requirements-export.txt"
31
+ return (
32
+ f"Infer/demo (no oriented-det): pip install -r {runtime}\n"
33
+ f"Producer (odet export): uv pip install -e \".[export]\" "
34
+ f"or pip install -r {export} (plus oriented-det)"
35
+ )
36
+
37
+
38
+ def _print_help() -> None:
39
+ print("Usage: odet export <command> [options]")
40
+ print(" python -m export <command> [options]")
41
+ print("ONNX only (no TensorFlow / SavedModel). demo / infer do not need PyTorch.")
42
+ print("")
43
+ print("Commands:")
44
+ for name in sorted(_COMMANDS):
45
+ print(f" {name}")
46
+ print("")
47
+ print("Examples:")
48
+ print(
49
+ " odet export onnx --config path/to/config.json "
50
+ "--checkpoint path/to/model.pth --output ./onnx_export/model.onnx"
51
+ )
52
+ print(
53
+ " odet export infer --onnx ./onnx_export/model.onnx "
54
+ "--images ./tiles --output ./onnx_export/predictions"
55
+ )
56
+ print(" odet export demo")
57
+ print("")
58
+ print(install_hint())
59
+
60
+
61
+ def _ensure_sys_path() -> None:
62
+ repo_root = Path(__file__).resolve().parents[1]
63
+ if str(repo_root) not in sys.path:
64
+ sys.path.insert(0, str(repo_root))
65
+
66
+
67
+ def _invoke(module_path: str, prog: str, args: List[str]) -> None:
68
+ _ensure_sys_path()
69
+ try:
70
+ mod = importlib.import_module(module_path)
71
+ except ImportError as e:
72
+ raise SystemExit(f"Failed to import {module_path}: {e}\n{install_hint()}") from e
73
+ if not hasattr(mod, "main"):
74
+ raise SystemExit(f"{module_path} has no main()")
75
+ sys.argv = [prog] + args
76
+ mod.main()
77
+
78
+
79
+ def main(argv: Optional[List[str]] = None) -> None:
80
+ argv = list(sys.argv[1:] if argv is None else argv)
81
+ if not argv or argv[0] in ("-h", "--help"):
82
+ _print_help()
83
+ return
84
+ cmd, rest = argv[0], argv[1:]
85
+ cmd = _ALIASES.get(cmd, cmd)
86
+ if cmd not in _COMMANDS:
87
+ print(f"Unknown command: {cmd}", file=sys.stderr)
88
+ _print_help()
89
+ raise SystemExit(2)
90
+ module_path, prog = _COMMANDS[cmd]
91
+ _invoke(module_path, prog, rest)
92
+
93
+
94
+ if __name__ == "__main__":
95
+ main()