Thank you for your interest in contributing to OrientedDet!
- Fork the repository
- Clone your fork:
git clone https://github.com/DL4EO/oriented-det.git cd oriented-det - Create a venv and install in development mode (uv):
uv venv --python 3.12 source .venv/bin/activate uv pip install -r requirements.txt uv pip install -e ".[dev]"
CI runs pytest tests/ on GitHub Actions (CPU PyTorch). Locally:
# Run all tests
pytest
# Library tests only
pytest tests/
# ONNX export tests (optional onnx/ort tests skip unless oriented-det[export] is installed)
pytest export/tests/
# Run specific test file
pytest tests/test_geometry.py
# With coverage
pytest --cov=oriented_det tests/We use black for formatting and ruff for linting:
# Format code
black oriented_det/ tests/ export/
# Lint
ruff check oriented_det/ tests/ export/- Follow PEP 8
- Use type hints where appropriate
- Write docstrings (Google style)
- Keep functions focused and small
- Add tests for new features
- Ensure all tests pass
- Aim for good test coverage
- Update docstrings for new functions/classes
- Add tool scripts or examples to user guide if applicable
- Update API reference
- Create a feature branch
- Make your changes
- Add tests
- Update documentation
- Ensure all tests pass
- Submit a pull request
oriented_det/
├── geometry/ # Core geometry primitives
├── ops/ # IoU and NMS operations
├── data/ # Dataset loading and utilities
├── models/ # Model architectures
├── train/ # Training utilities
└── utils/ # Configuration and visualization
Aligned with the Roadmap:
- v0.3: HRSC2016 Hub zoo; FAIR1M / SSDD / HRSID loaders + 1× recipes (finetune DOTA 1× Hub; no FAIR1M / SAR zoo)
- v0.4.0: Rotated RTMDet (shipped)
- v0.4.2: shipped — native YOLO-OBB Hub
yolo_obb_dota_le90_12x(77.80% Task 1; COCO trunkyolo_obb_coco_300e) - v0.4.3: shipped — RTMDet-S MS Hub
rotated_rtmdet_dota_le90_3x_ms(80.13% MS/MS Task 1); liveodet dota-submit --resize-rates - v0.5–v0.5.2: Swin-T + FPN (Oriented R-CNN 1× and 3× Hub in v0.5, Faster R-CNN in v0.5.1, FCOS in v0.5.2 if latency allows). Swin stays off RTMDet and YOLO-OBB
- v0.6–v0.6.1: RoI Transformer (R50, then Swin-T on the shared FPN)
- v0.7: ReDet (ReResNet + ReFPN); Hub only if Task 1 beats the leading accuracy-tier Hub line
- Optional: YOLO-OBB MS Hub (recipe
dota_le90_12x_s_coco_ms.jsonin-tree; same MS tiles / live resize-rates as RTMDet) - Optional: recipe improvements on the six current models, kept when AP75 or a weak class moves on a held-out split at the operating resolution
- v1.1: oriented DINO in this repo, after the v1.0 API (DOTA; Hub only if it beats the leading accuracy-tier Hub line)
- Docs: Tutorials, hosted MkDocs, eval reports
- Export: ONNX head wrappers + postprocess parity for new detectors
- Ops: Fused CUDA rotated IoU/NMS kernels
- Bug fixes and tool scripts
Maintainers only. Workflow detail and Trusted Publishing setup: .github/workflows/README.md.
Version 0.4.3 — tag releases as v0.4.3 (git) matching version in pyproject.toml.
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.
Install publishing tools (included in .[dev]):
uv pip install -e ".[dev]" # or: make publish-deps- Create accounts on test.pypi.org and pypi.org (can use the same email).
- Register the project name
oriented-deton PyPI (first upload creates it; TestPyPI is separate). - Trusted Publishing (recommended) — on each index, add a publisher for
DL4EO/oriented-det, workflowpublish.yml, environmentstestpypi/pypi. See .github/workflows/README.md. - Or API tokens — create
pypi-…tokens and export locally (or add GitHub secretsTESTPYPI_API_TOKEN,PYPI_API_TOKEN):
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-AgEI… # TestPyPI or PyPI tokenmake check-configs
pytest tests/ -qBump version in pyproject.toml and docs/changelog.md if needed (currently 0.4.3).
make sync-configs # after changing configs/ or the manifest
make build # check-configs + sdist + wheel into dist/
make twine-checkSmoke-test the wheel:
python -m venv /tmp/odet-smoke && source /tmp/odet-smoke/bin/activate
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
pip install dist/*.whl
odet --help
python -c "from oriented_det.geometry import RBox; print(RBox(0,0,1,1,0).area)"make publish-testpypiInstall from TestPyPI (PyPI index still needed for dependencies like torch):
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple oriented-det==0.4.3
odet --helpOr trigger Actions → Publish → Run workflow (target: testpypi) after configuring Trusted Publishing or secrets.
When TestPyPI looks good:
git tag -a v0.4.3 -m "Release 0.4.3"
git push origin v0.4.3 # triggers publish.yml → PyPI (if CI is configured)Local upload (fallback):
make publish-pypiCreate a GitHub Release from tag v0.4.3 with notes from docs/changelog.md.
- Verify
pip install oriented-detin a clean environment. - Users still install PyTorch separately for their CUDA/CPU platform.
| Target | Action |
|---|---|
make publish-deps |
Install build and twine |
make build |
check-configs + python -m build |
make twine-check |
Validate dist/* metadata |
make publish-testpypi |
Build, check, upload to TestPyPI |
make publish-pypi |
Build, check, upload to PyPI |
Trusted Publishing avoids long-lived tokens; keep make publish-* for manual releases. Details: .github/workflows/README.md.
Feel free to open an issue for questions or discussions!