D-FINE Nano COCO โ€” verified ONNX export for AnnotateIt

This repository contains a fixed-shape FP32 ONNX export of the official ustc-community/dfine-nano-coco checkpoint for local, in-browser object detection in AnnotateIt.

This is an AnnotateIt-maintained conversion, not an official D-FINE release. The ONNX graph was exported from the exact upstream revision 066438d3d8f0da137a37b38fdf3368fd4afceced, which contains the upstream weight fix published on 20 August 2025.

Artifact

File Value
ONNX graph model.onnx
Precision FP32
Opset 18
Input pixel_values: float32 [1, 3, 640, 640]
Outputs logits: float32 [1, 300, 80]; pred_boxes: float32 [1, 300, 4]
Size 15,434,935 bytes
SHA-256 b0ec2e5793f3a3cbd07440d098645a0e102cd450fb92f4f35e713f36e35d152e

The shape is intentionally fixed to batch 1 at 640ร—640. A dynamic-shape export was rejected during validation because it did not preserve the reference model's outputs.

Preprocessing and outputs

  1. Convert the image to RGB.
  2. Resize to 640ร—640 with bilinear interpolation (stretch, without letterboxing).
  3. Rescale each channel to [0, 1] by dividing by 255.
  4. Convert HWC to NCHW and add a batch dimension.
  5. Apply sigmoid to logits, then take the best class score per query.
  6. Interpret pred_boxes as normalized cx, cy, width, height and map them back to the original image dimensions.

The model uses the 80 COCO classes. No NMS is required by the reference postprocessor.

Validation

The graph passed all of the following checks:

  • ONNX graph validation and ONNX Runtime CPU inference;
  • numerical comparison with the pinned official PyTorch checkpoint;
  • inference with AnnotateIt's installed onnxruntime-web 1.24.3 WASM runtime;
  • a real COCO reference image, where PyTorch and ONNX returned the same five detections at a 0.3 score threshold, with matching classes, scores, and boxes.

See validation-report.json for measured tolerances and PROVENANCE.md for the reproducible source/export record. Runtime timings in the report are smoke-test observations, not benchmarks.

Why this is a fresh export

The pre-existing ONNX Community conversion was created before the official checkpoint's August 2025 weight fix. It accurately represents the older checkpoint but does not match the current official weights. This repository therefore exports the current pinned checkpoint locally instead of copying that older graph.

License

D-FINE and the source checkpoint are licensed under Apache License 2.0. The full license text is included in LICENSE. Please retain the license and attribution when redistributing this model.

Upstream project: Peterande/D-FINE

Downloads last month
29
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for AnnotateIt/dfine-nano-coco-onnx

Quantized
(2)
this model