Skip to main content

DeepView Converter

deepview-converter is the model compiler for the DeepViewRT inference engine. It takes a trained model from a common training framework and produces a .rtm model — the native format DeepViewRT loads to run inference on the edge.

The converter imports the source model, runs a graph optimization pass, and exports an RTM model with an embedded memory map so the runtime can execute it with a fixed, pre-planned allocation.

Supported inputs

Format Extension / layout Notes
TFLite .tflite Must already be quantized to convert quantized
ONNX .onnx
TensorFlow .pb, SavedModel, Keras .h5 Can be quantized at convert time (--quantize)

The output is always a DeepViewRT .rtm model.

Installation

pip install deepview-converter

This pulls in the matching deepview-rt runtime as a dependency.

Usage

The package installs the rtm-converter console script (equivalently python -m deepview_rtm):

# Basic conversion
rtm-converter model.onnx model.rtm

# Quantize a float TensorFlow/Keras model using calibration samples
rtm-converter model.h5 model.rtm --quantize --samples ./calibration_images

# Constrain the converted graph to a subgraph by I/O layer names
rtm-converter model.tflite model.rtm \
    --input-names input_0 --output-names logits

Run rtm-converter --help for the full set of options, including quantization mode (--quant-channel / --quant-tensor), input/output data types, custom user-op handlers, and optimizer controls (--skip-optimizations).

Set DEEPVIEW_CONVERTER_DEBUG=1 to print a full traceback when a conversion fails.

Testing

pip install pytest pytest-html
python -m pytest --html=tests/report.html -s --capture=tee-sys --self-contained-html

The HTML report is written to tests/report.html.

Changelog

[3.0.5] - 2026-06-23

Fixed

  • Quantized ONNX models with a Slice node fed by a direct graph input now convert successfully. The ONNX importer read output_shape from graph inputs before that attribute was populated (only info.shape was available during import), causing KeyError: 'output_shape' in import_Slice. This affected GRU-based models where a recurrent state input is sliced directly — for example Lytx fatigue models with input_gru_state. The importer now reads shape from AGLayer info, keeps legacy and info graph representations in sync through import and Q/DQ folding, and includes regression tests.

[3.0.4] - 2026-06-05

Changed

  • The changelog is now appended to the package long description, so it renders directly on the PyPI project page instead of linking out to the release history, and the Changelog project link anchors to it.

[3.0.3] - 2026-06-05

Fixed

  • GRU / recurrent models converted with --copy_layers now match the source model. Stateful models exported through the TFLite importer produced incorrect outputs: the update-gate constant in the GRU's 1 - z was emitted as a scalar, but the DeepViewRT runtime cannot broadcast a scalar against an [N, C] operand for non-commutative ops and effectively computed z - 1, negating the recurrent state (the error then compounded across timesteps via the copied-back state). The converter now materializes such constants to the operand shape, restoring parity with the 2.4.x converter line. Runtime-safe broadcasts (equal-shape, per-row, per-channel) are left untouched, so per-channel convolution biases are not expanded, and the behaviour can be disabled with --skip-optimizations broadcast_const.
  • ONNX models whose NCHW convolution chain starts at a non-external node now convert correctly. When a conv chain's input was a non-external node — for example a Concat produced by inline buffer rolling — no entry transpose was inserted, so the convolution read its input in the wrong memory layout and produced corrupted output. NCHW→NHWC entry transposes are now inserted for non-external 4D inputs, mirroring the existing exit-transpose handling.

[3.0.2] - 2025-11-18

Added

  • Broader ONNX operator coverage and handling for rank-3 models.

Fixed

  • GEMM biases could be overwritten during conversion.

[3.0.1] - 2025-10-03

Fixed

  • Declared runtime dependencies that were missing from the initial 3.0.0 packaging.

[3.0.0] - 2025-10-01

Removed

  • The plugin system for targeting non-RTM model formats. The converter now focuses exclusively on compiling models to the DeepViewRT .rtm format.

Changed

  • Merged the separate deepview-converter-rtm plugin directly into the deepview-converter repository, so the converter ships as a single self-contained package rather than a host plus plugin.

Added

  • Distribution on PyPI (pip install deepview-converter) with the rtm-converter console script.

Release files for deepview-converter 3.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for deepview-converter 3.0.5
File Interpreter ABI Platform
deepview_converter-3.0.5-py3-none-any.whl Python 3 none any Details

Release files / deepview_converter-3.0.5-py3-none-any.whl

Download URL deepview_converter-3.0.5-py3-none-any.whl
Size 205.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94bfb8861efb1f74d404b1cad5e1d2bfe8bbb32242f5db3d06241508aaef601a
BLAKE2b-256 checksum
How to use checksums
bceb3e15a3de9f589232ad524d87e8338e9ce836e7d05d441ae4ce93237a0b1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release history Release notifications | RSS feed

This release

3.0.5 This release

1 release file

3.0.4

1 release file

3.0.3

1 release file

3.0.2

1 release file

3.0.1

1 release file

3.0.0

1 release file

2.6.9

12 release files

2.6.8

11 release files

2.6.2

11 release files

2.6.0

11 release files

2.5.21

5 release files

2.5.20

5 release files

2.5.18

5 release files

2.5.17

5 release files

2.5.16

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page