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 fb00f0d
Browse filesBrowse the repository at this point in the historyBrowse files
Enhance export functionality and documentation for TensorFlow integration
- Updated `pyproject.toml` to include new export package configurations.
- Modified GitHub Actions workflow to run tests on the new export directory.
- Expanded documentation on tools and usage for the `odet` CLI, including new export modes for Oriented R-CNN.
- Added support for exporting Keras detect bundles with ONNX models.
- Improved error handling and validation in export scripts.
- Introduced new export modes and updated Makefile for streamlined usage.
Copy file name to clipboardExpand all lines: export/PARITY.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,14 +21,25 @@ This document records what **matches** PyTorch full inference and what is **inte
21
21
| Aspect | Parity |
22
22
|--------|--------|
23
23
| Backbone, RPN, ROI align, decode (pre-NMS tensors) | Same weights and logic as `RotatedFasterRCNN` via `oriented_det.models.faster_rcnn_inference`; deterministic RPN top-k for export. |
24
-
| RPN proposals before ROI | Padded to `max_pre_nms_candidates`(= `rpn_post_nms_top_n` on the loaded model, including `production.*` overrides) so ONNX ROI align traces with fixed shapes. |
24
+
| RPN proposals before ROI | Padded to `max_pre_nms_candidates`with **zero-area** xyxy pads; ROI candidates keep only positive-area boxes (dynamic mask). |
25
25
| Pre-NMS output padding |`pad_pre_nms_detections` uses `torch.cat` zero-padding (not slice assignment), which avoids invalid ONNX `Expand` when the dynamic candidate count is not exactly 0, 1, or `max_candidates`. |
| Backbone, midpoint RPN, OrientedROIAlign, decode | Same weights/logic as `OrientedRCNN` eval via `oriented_det.models.oriented_rcnn_inference`; deterministic midpoint RPN top-k for export. |
38
+
| RPN proposals before ROI | Padded oriented proposals with **zero-size** OBBs; ROI candidates keep only `w>0` and `h>0` (pads are not min-clamped to 1). |
39
+
| OrientedROIAlign under ONNX | Masked all-N `grid_sample` per FPN level (no indexed ScatterND writes); eager path stays chunked. |
40
+
| Final NMS / score floors / Keras bundle |**Same** as Faster R-CNN detect bundle (`export/postprocess.py`). |
41
+
| onnx2tf full graph | Same ORT-inside-Keras mitigation; pure TF conversion remains experimental. |
42
+
32
43
## ONNX → TensorFlow
33
44
34
45
| Risk | Mitigation |
@@ -45,4 +56,4 @@ This document records what **matches** PyTorch full inference and what is **inte
45
56
46
57
## Regression tests
47
58
48
-
`export/tests/test_export_wrappers.py` checks **wrapper forward shapes** against PyTorch without requiring ONNX or TensorFlow. Golden numeric `.npz` dumps are optional and not required for CI.
59
+
`export/tests/test_export_wrappers.py` checks **wrapper forward shapes** against PyTorch without requiring ONNX or TensorFlow. Golden numeric `.npz` dumps are optional and not required for CI. Pre-NMS parity: `test_faster_rcnn_export_parity.py`, `test_oriented_rcnn_export_parity.py`.
0 commit comments