You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0d2bb01
Browse filesBrowse the repository at this point in the historyBrowse files
Update dependencies and enhance documentation for improved functionality
- Added `opencv-python-headless` as a dependency for the viewer in `requirements.txt` and `pyproject.toml`.
- Revised the README to streamline the description and improve clarity.
- Updated installation instructions to include symbolic link guidance for path placeholders.
- Enhanced documentation on NMS behavior, clarifying class-aware vs class-agnostic settings.
- Improved test coverage for NMS configurations and added relevant tests for class-agnostic behavior.
Copy file name to clipboardExpand all lines: .github/workflows/README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,8 @@ Runs on every push/PR to `main` / `master`:
11
11
12
12
Builds `dist/*` and uploads to PyPI or TestPyPI.
13
13
14
+
Full maintainer checklist (version bump, `make build`, TestPyPI, tagging): [docs/contributing.md — Releasing / Publishing to PyPI](../../docs/contributing.md#releasing--publishing-to-pypi).
15
+
14
16
| Trigger | Destination |
15
17
|---------|-------------|
16
18
| Push tag `v*.*.*` (e.g. `v0.1.0`) |**PyPI** (`environment: pypi`) |
@@ -50,11 +52,11 @@ Create tokens at **Account settings → API tokens** on each index (scope: entir
50
52
### Production release from GitHub
51
53
52
54
```bash
53
-
git tag -a v0.1.0 -m "Release 0.1.0"
54
-
git push origin v0.1.0
55
+
git tag -a v0.4.2 -m "Release 0.4.2"
56
+
git push origin v0.4.2
55
57
```
56
58
57
-
The tag push starts `publish.yml` and uploads to PyPI.
59
+
The tag push starts `publish.yml` and uploads to PyPI. Use the current version from `pyproject.toml` (see [docs/contributing.md](../../docs/contributing.md#releasing--publishing-to-pypi)).
-**site/** — Generated HTML (created by `mkdocs build`)
51
51
52
52
API pages are generated from Python docstrings via `mkdocstrings`. See [documentation.md](documentation.md) for more on writing and building the docs.
53
+
54
+
## Further reading
55
+
56
+
Hands-on write-ups (code, metrics, inference knobs, and project rationale) live on **[DeepLearning.Earth](https://deeplearning.earth)**:
57
+
58
+
| Topic | Post |
59
+
|-------|------|
60
+
| Oriented detection in aerial and satellite images |[https://deeplearning.earth/oriented-detection-in-satellite-images/](https://deeplearning.earth/oriented-detection-in-satellite-images/)|
|`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/)|
| 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/)|
| Which oriented detector to train |[https://deeplearning.earth/posts/2026-10-29_which_oriented_detector_to_train/](https://deeplearning.earth/posts/2026-10-29_which_oriented_detector_to_train/)|
Copy file name to clipboardExpand all lines: docs/contributing.md
+104Lines changed: 104 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,110 @@ Aligned with the [Roadmap](roadmap.md):
111
111
-**Ops:** Fused CUDA rotated IoU/NMS kernels
112
112
- Bug fixes and tool scripts
113
113
114
+
## Releasing / Publishing to PyPI
115
+
116
+
Maintainers only. Workflow detail and Trusted Publishing setup: [`.github/workflows/README.md`](../.github/workflows/README.md).
117
+
118
+
Version **0.4.2** — tag releases as **`v0.4.2`** (git) matching `version` in `pyproject.toml`.
119
+
120
+
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`**.
121
+
122
+
Install publishing tools (included in `.[dev]`):
123
+
124
+
```bash
125
+
uv pip install -e ".[dev]"# or: make publish-deps
126
+
```
127
+
128
+
### Step-by-step release
129
+
130
+
#### 1. One-time PyPI setup
131
+
132
+
1. Create accounts on [test.pypi.org](https://test.pypi.org) and [pypi.org](https://pypi.org) (can use the same email).
133
+
2.**Register the project name**`oriented-det` on PyPI (first upload creates it; TestPyPI is separate).
134
+
3.**Trusted Publishing (recommended)** — on each index, add a publisher for `DL4EO/oriented-det`, workflow `publish.yml`, environments `testpypi` / `pypi`. See [.github/workflows/README.md](../.github/workflows/README.md).
135
+
4.**Or API tokens** — create `pypi-…` tokens and export locally (or add GitHub secrets `TESTPYPI_API_TOKEN`, `PYPI_API_TOKEN`):
136
+
137
+
```bash
138
+
export TWINE_USERNAME=__token__
139
+
export TWINE_PASSWORD=pypi-AgEI… # TestPyPI or PyPI token
140
+
```
141
+
142
+
#### 2. Pre-release checklist
143
+
144
+
```bash
145
+
make check-configs
146
+
pytest tests/ -q
147
+
```
148
+
149
+
Bump version in `pyproject.toml` and `docs/changelog.md` if needed (currently **0.4.2**).
150
+
151
+
#### 3. Build locally
152
+
153
+
```bash
154
+
make sync-configs # after changing configs/ or the manifest
155
+
make build # check-configs + sdist + wheel into dist/
Examples throughout this repo use placeholder paths such as **`/path/to/data`** and **`/path/to/oriented-det`**. You can point commands and JSON configs at your real locations (e.g. `dataset.data_root` in a training config), or keep those placeholders and map them with symbolic links:
117
+
118
+
```bash
119
+
# Create the parent directory (may need sudo for paths under /path/to)
120
+
sudo mkdir -p /path/to
121
+
122
+
# Point the placeholder at your DOTA dataset
123
+
ln -s /home/username/dota /path/to/data
124
+
125
+
# Point the placeholder at your clone of this repo
After that, copy-pasted commands and unmodified configs that reference `/path/to/data` or `/path/to/oriented-det` resolve to your machine. Use relative symlink targets when you want the link to stay valid if the parent directory moves.
5.**Check orientation** - Use `ensure_orientation()` when needed
168
168
169
+
## Important notes
170
+
171
+
-**Angles**: Radians; use a single convention (e.g. le90 for DOTA). Helper: `normalize_le90` from `oriented_det.geometry`. For angle-delta normalization in custom code, see `oriented_det.models.oriented_rpn.normalize_angle_delta`.
172
+
-**NMS**: `torchvision.ops.nms_rotated` does not exist; the project uses a Python-based oriented NMS with AABB pre-filtering. GPU kernels are used when available. Details: [Operations](operations.md), [oriented_det/ops/README.md](../../oriented_det/ops/README.md).
173
+
-**ROI/memory**: Training samples 512 proposals per image; use `roi_chunk_size` and `roi_use_checkpoint` for memory tuning on large GPUs. See [Models](models.md) and [Training](training.md).
174
+
169
175
## See Also
170
176
171
177
-[API Reference](../api/geometry.md) - Complete API documentation
Copy file name to clipboardExpand all lines: export/PARITY.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ The delivered graph is **ONNX pre-NMS** (`rotated_fcos_pre_nms` for FCOS). Prepr
10
10
| Backbone + FCOS head + DistanceAnglePointCoder decode | Same weights/logic as `RotatedFCOS` eval via `rotated_fcos_decode_pre_nms` (includes GroupNorm). |
11
11
| Per-level pre-NMS cap | Always `topk(min(nms_pre, H×W))` then score / size / finite filters. Invalid top-k rows are zeroed (`score=0`, `w=h=0`) and left in the padded tensor. |
| Final NMS / score floors |`export.postprocess.finalize_detections_numpy` calling `export.nms` (numpy clip, or Shapely if `nms_backend=shapely`). Production `score_threshold` applied **before** NMS. FCOS eval NMS is class-aware; production configs may set `nms_class_agnostic`. Small float drift vs Shapely is possible on the `python` backend. |
13
+
| Final NMS / score floors |`export.postprocess.finalize_detections_numpy` calling `export.nms` (numpy clip, or Shapely if `nms_backend=shapely`). Production `score_threshold` applied **before** NMS. Class-aware vs class-agnostic follows resolved `nms_class_agnostic` (`production` override, else `model`; export unset default is class-agnostic). Small float drift vs Shapely is possible on the `python` backend. |
14
14
| Sliding-window tiling |`detect_image` tiles `fixed` / `crop` images larger than `window_size` (else `target_size`). Same edge-flush grid and `target_size / window_size` box scale as `run_inference_sliding_window`. Overlap default 200 px. Per-window NMS, then a second NMS across windows. Interior overlap margin stays 0. `pad` / `keep_ratio` are a single resize. |
15
15
| GeoJSON | Out of scope — PyTorch deploy path. |
16
16
@@ -22,7 +22,7 @@ The delivered graph is **ONNX pre-NMS** (`rotated_fcos_pre_nms` for FCOS). Prepr
22
22
| Backbone + SepBN head + DistanceAnglePointCoder decode | Same weights/logic as `RotatedRTMDet` eval via `_rtmdet_level_topk_decode`. No centerness. |
23
23
| Per-level pre-NMS cap | Always `topk(min(nms_pre, H×W))` then score / size / finite filters. Invalid top-k rows are zeroed (`score=0`, `w=h=0`) and left in the padded tensor. |
@@ -86,6 +86,17 @@ from runtime import detect_image
86
86
dets = detect_image("tile.jpg", "model.onnx")
87
87
```
88
88
89
+
## Final NMS (class-aware vs class-agnostic)
90
+
91
+
Rotated NMS runs in Python after the ONNX graph (`export/nms.py`). Both modes are supported; the sidecar flag `nms_class_agnostic` (under `postprocess` / `production`) chooses which:
92
+
93
+
| Flag | Behavior |
94
+
|------|----------|
95
+
|`true` (export default when unset) |**Class-agnostic**: one NMS over all classes (overlapping car/truck etc.) |
96
+
|`false`|**Class-aware**: suppress only within the same label |
97
+
98
+
At export: `production.nms_class_agnostic` when set, else `model.nms_class_agnostic`, else **class-agnostic**. Re-export after changing the config so the sidecar picks it up. `odet export preds` also overlays the experiment config onto the loaded meta.
99
+
89
100
## Inference score overrides
90
101
91
102
The graph is pre-NMS only. It bakes `pre_nms_score_threshold` (0.05 on the current RTMDet export) and has no threshold input. Scores below that floor are already gone; a caller cannot recover them.
0 commit comments