This repository hosts RetinaNet in ONNX FP32 format, targeting the Renesas R-Car X5H platform for object detection inference on the NPX6 NPU.
Model Architecture: RetinaNet with ResNet101 backbone and Feature Pyramid Network (FPN)
Source Model: ONNX Model Zoo RetinaNet
Task: Object Detection
Dataset: COCO
Accuracy: mAP = 0.376
Backbone: ResNet101
Deployment Flow
The repository provides the model in FP32 ONNX format. Both supported runtimes automatically cast the FP32 model to INT8 at load time for optimised NPU execution — no separate quantization step is required.
INT8 execution is handled automatically by the NPU runtime — no additional quantized model file is needed.
Performance
All HIL results were measured on Renesas R-Car X5H physical hardware.
The FP32 ONNX model is auto-cast to INT8 by the runtime before NPU execution.
PPA Estimator results are software estimates based on model characteristics and hardware configuration.
Benchmark configuration: Single NPU · Single AI Core · Input: 3 × 480 × 640 · Batch size: 1
Inference Latency & Throughput
Runtime
Precision
Device
Latency (ms)
Throughput (fps)
Type
ORT Custom NPU EP
INT8 (auto)
X5H · 1× NPU · 1 Core · 850 MHz
TBD
TBD
Measured
MWMX Runtime
INT8 (auto)
X5H · 1× NPU · 1 Core · 850 MHz
TBD
TBD
Measured
PPA Estimator
INT8
X5H · 1× NPU · 1 Core · 1066 MHz
TBD
—
Estimated
Accuracy (COCO Validation Set)
Runtime / Precision
mAP (IoU=0.50:0.95)
Notes
FP32 Reference
0.376
ONNX Model Zoo reference
ORT Custom NPU EP (INT8)
TBD
NPU execution
MWMX Runtime (INT8)
TBD
NPU execution
Runtime Details
ONNX Runtime – Custom NPU Execution Provider
Engine: ONNX Runtime with Renesas Custom NPU Execution Provider
Input format: FP32 ONNX (.onnx)
NPU execution precision: INT8 (auto-cast at load time)
1import onnxruntime as ort
2import numpy as np
34providers =[5("RenesasNPUExecutionProvider",{}),6"CPUExecutionProvider"7]89sess = ort.InferenceSession(10"fp32/retinanet-9.onnx",11 providers=providers
12)1314input_data = np.random.rand(151,3,480,64016).astype(np.float32)1718outputs = sess.run(19None,20{"images": input_data}21)2223# outputs[0:5] -> classification heads24# outputs[5:10] -> box regression heads
MWMX Runtime
Refer to the Renesas MWMX Runtime documentation for compilation and inference scripts targeting the NPX6 NPU on R-Car X5H. The MWMX toolchain ingests the FP32 ONNX model and automatically compiles it for INT8 NPU execution.
Benchmark Methodology
HIL runs: Hardware-in-the-loop — measured on physical R-Car X5H silicon; single NPU, single AI core, 850 MHz NPU clock
Estimation: PPA Estimator software estimate; single NPU, single AI core, 1066 MHz NPU clock
Precision: FP32 ONNX input; INT8 execution (auto-cast by runtime)
Latency: Median over 1000 consecutive inference runs with warm cache
Throughput: Computed as 1000 / latency_ms
Accuracy: Evaluated using the COCO validation dataset
Postprocessing: Includes anchor generation, bounding-box decoding, confidence filtering, and NMS