Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 2.86 KB

README.md

File metadata and controls

63 lines (44 loc) · 2.86 KB

OpenVINO ONNX Frontend

The main responsibility of the ONNX Frontend is to import ONNX models and convert them into the ov::Model representation. Other capabilities of the ONNX Frontend:

  • modification of tensors properties (like data type and shapes)
  • changing the topology of models (like cutting subgraphs, inserting additional inputs and outputs)
  • searching the models in a user-friendly way via tensors and operators names

The component is written in C++. If you want to contribute to the ONNX Frontend, follow the common coding style rules.

Key contacts

In case of any questions, review and merge requests, contact the openvino-onnx-frontend-maintainers group.

Components

ONNX Frontend implements an interface common to all frontends defined in the Frontends API. For backward compatibility reasons, the ONNX importer API (more lower-level abstraction approach) is still maintained. You can find it in the ONNX Importer.

The API of ONNX Frontend can be called directly. It is also used internally by Model Optimizer during the conversion from ONNX to Intermediate Representation (IR). The capabilities of ONNX Frontend are used by the ONNX Runtime via OpenVINO Execution Provider.

Both C++ and Python tests are implemented for the ONNX Frontend. Read the ONNX Frontend tests page for more details.

Architecture

The diagram below shows an overview of the components responsible for the basic model importing flow:

flowchart LR
    onnx[("ONNX (*.onnx)")]
    ov_model[("OV Model")]

    subgraph InputModel["ov::frontend::onnx::InputModel"]
    end

    subgraph Frontend["ov::frontend::onnx::FrontEnd"]
        fe_load["load_impl()"]
        fe_convert["convert()"]
    end

    style onnx fill:#6c9f7f
    style ov_model fill:#6c9f7f

    onnx-->|protobuf|fe_load
    fe_load-->InputModel
    InputModel-->fe_convert
    fe_convert-->ov_model
Loading

Find more details in the ONNX Frontend architecture document.

Tutorials

See also