Model engineering · Experimental study

RTMDet-Tiny: from training to ONNX validation.

A one-class detector study documenting training lineage, ONNX runtime profiles, and formal numerical validation.

0.7510mAP50
0.4090mAP50:95

Original Epoch-20 · 283-image Canonical-Val result.

Abstract technical concept illustration of visual signals becoming structured events.
Concept illustration.

01 / Dataset and scope

One class, fixed validation split.

Canonical train

1,287 images · 2,959 ground-truth boxes · 199 negative images.

Canonical validation

283 images · 618 ground-truth boxes · 40 negative images.

Both saved evaluation records cover the same 283 row identities. Cross-stage training-data byte identity: verification pending. Independent held-out test: pending.

02 / Model lineage

Two separate training stages.

Original scratch Pilot · Epoch 20

20 epochs · 6,440 optimizer updates · FP32 · 640×640 · batch 4.

Canonical-Val: 0.7510 mAP50 / 0.4090 mAP50:95.

Separate fine-tuning · Epoch 15 best

Initialized from the original EMA-aligned model state as a separate fine-tuning phase with a new optimizer and scheduler.

Canonical-Val: 0.748 / 0.417 at selected Epoch 15; final Epoch 20 was 0.740 / 0.417. Fine-tuning results are reported on Canonical-Val.

03 / ONNX and network timing

Structural export and network-only profiles.

The original Epoch-20 model was exported as a static FP32 graph with input [1,3,640,640] and six raw heads: cls_p3/p4/p5 and bbox_p3/p4/p5. ONNX structural checking passed. Preprocessing, decoding, filtering, rescaling, and NMS remain outside the graph; raw-head and final-detection parity results are reported below.

Original Epoch-20 ONNX graph · batch 1 · 640×640 FP32 · timings cover session.run() only
ProfileDevice and runtimeMeanP50P95
CPU B2 · 8 / 1 threadsRyzen 7 5800H · ORT 1.20.1 CPU EP71.190 ms68.289 ms110.230 ms
CUDA B3-R1 · 1 / 1 threadsRTX 3070 Laptop · ORT 1.20.2 CUDA EP6.212525 ms6.093550 ms6.881800 ms

Each profile used 10 warmups and 96 measured calls over the first 32 Canonical-Val indices. GPU timing includes host/device transfer and output return. CPU and CUDA profiles used different providers and ONNX Runtime versions; compare them as separate device profiles. These session.run() measurements cover model-network execution; full-video timing also depends on image I/O, preprocessing, postprocessing, OCR, video work, and application latency.

04 / Numerical validation

Formal parity validation.

Formal D2: FAILED after complete 283/283-image coverage. Frozen acceptance result: FAILED.

Open the stage-by-stage validation record
CheckRecorded resultBoundary
Original C1 input parityPASS · 3-image sampleInput parity passed on the 3-image sample.
Original C2 raw-head parityFAILED · 16/18 comparisons passedThree elements exceeded frozen 1e-4 tolerance; cause unknown.
Formal C3 decode / pre-NMSPASS · 283/283Stage-local C3 pre-NMS decode result.
Formal C4 final detectionsFAILED · 281/283Two threshold-sensitive native NMS decisions failed.
Formal D2 overallFAILED · 283/283 coveredFinal outcome: FAILED.
Fine-tuned candidate raw headsFAILED · 9/18 tensors96 elements exceeded rtol=atol=1e-4 on a fixed three-image check.

05 / Limitations

Validation scope and open checks.

  • Evaluation set: Canonical-Val. Independent held-out test: pending.
  • CPU/CUDA profiles cover the original Epoch-20 graph; fine-tuned candidate profile: pending.
  • Fine-tuned candidate Android runtime, quality, and performance A/B: pending. Candidate-selection records currently differ between the research and Android repositories.
  • Current-environment reproduction, end-to-end video latency, production acceptance, and training-data byte identity: pending verification.
  • Publication rights for source media, labels, checkpoints, and derived ONNX: pending review.