There is a newer version of the record available.

Published February 16, 2026 | Version 2.0.15
Software Open

Tools to convert ONNX files (NCHW) to TensorFlow format (NHWC)

Authors/Creators

Description

2.0.15

Summary

This PR significantly improves the flatbuffer_direct path, focusing on conversion stability, quantization-chain optimizations, shape/NHWC propagation, and redundant transpose reduction.

  • Changed files: 37
  • Diffstat: +7283 / -493
  • Base commit (main): 9281976
  • Head commit (fix-var): 2d9ca0a

Main Changes

  1. FlatBuffer direct lowering and shape propagation
  • Strengthened shape / shape_signature propagation, mainly in lower_from_onnx2tf.py.
  • Reduced shape-freezing issues in dynamic-shape cases. <img width="716" height="492" alt="image" src="https://github.com/user-attachments/assets/d6f22ad5-7564-485f-937e-67ca48173054" />
  • Expanded redundant Transpose-chain elimination around NCHW/NHWC bridges.
  • Improved shape consistency around Resize*, Conv, DepthwiseConv, ConvTranspose, Mean, Squeeze, and Concat.
  1. Quantized chain optimizations
  • Added/extended folds for:
    • Dequantize -> HardSigmoid -> Quantize
    • Dequantize -> TransposeConv -> Quantize
    • Dequantize -> Reshape -> Quantize
    • Dequantize -> MaxPool -> Quantize
    • Dequantize -> Softmax -> Quantize
  • Improved robustness for QLinear-family ops, including QLinearConv, QLinearConcat, QLinearAdd, QLinearMul, and QLinearSigmoid.
  1. Preprocess pipeline improvements
  • Added new rule: bn_fold_wave0 (preprocess/rules/bn_fold.py)
    • Conv/ConvTranspose + BatchNormalization fold
    • affine expansion for Dequantize + BatchNormalization
    • new fold for Conv -> Mul -> Add affine chains
  • Added new rule: cleanup_unused_initializers_z9 (preprocess/rules/cleanup_unused_initializers.py)
    • removes unused initializers/value_info
  • Improved preprocess report visibility so BN target/fold counts are easier to diagnose.
  1. Runtime/logging and developer experience
  • Filtered verbose Captures: lines during SavedModel export.
  • Suppressed TensorFlow startup STDERR noise with:
    • ONNX2TF_SUPPRESS_TF_STARTUP_STDERR (default: enabled)
  • Enhanced flatbuffer_direct OP error and tensor-correspondence reporting.
  1. Docs/metadata updates
  • Updated README OP summary.
  • Updated package metadata/version files (__init__.py, pyproject.toml).

Validation

Validated mainly with real conversion runs (examples):

  • text_detection_en_ppocrv3_2023may_int8.onnx
  • human_segmentation_pphumanseg_2023mar_int8.onnx
  • pose_estimation_mediapipe_2023mar_int8bq.onnx
  • face_recognition_sface_2021dec_int8.onnx

Also confirmed:

  • python -m compileall on key modified modules
  • preprocess-only checks for bn_fold_wave0 and cleanup_unused_initializers_z9 statistics

What's Changed

  • Enhance flatbuffer_direct stability: shape propagation, quantized fusion, BN/preprocess folding by @PINTO0309 in https://github.com/PINTO0309/onnx2tf/pull/877

Full Changelog: https://github.com/PINTO0309/onnx2tf/compare/2.0.14...2.0.15

Notes

If you use onnx2tf in your research, please cite it using these metadata.

Files

PINTO0309/onnx2tf-2.0.15.zip

Files (1.9 MB)

Name Size Download all
md5:41a19e6c3fe25a1a1efb1208098f845b
1.9 MB Preview Download

Additional details

Related works

Software