Skip to content

how to export to onnx/openvino AFTER training? #856

Closed

Description

@betogulliver

I'd like to export models I've trained using anomalib (custom-dataset) to onnx/openvino.

I understand I could set the following in my config.yaml file and re-train to get the models exported :

optimization:
export_mode : openvino

Is there a way I can skip re-training and simply jump straight to the EXPORT part?

thanks for any/all help

Activity

  1. samet-akcay commented on Jan 23, 2023

    @samet-akcay
    Contributor

    Hi @betogulliver,

    If you set the export_mode in config.yaml` file:

    optimization:
        export_mode : openvino

    When enabled, anomalib runs ExportCallback at the end of the training, as shown below:
    https://github.com/openvinotoolkit/anomalib/blob/8a6c6ea115ad2c460a9beaee85736d1180eaa996/anomalib/utils/callbacks/export.py#L37-L50

    anomalib basically uses export function to export it to onnx or openvino. You could utilize this function for your specific need.
    https://github.com/openvinotoolkit/anomalib/blob/8a6c6ea115ad2c460a9beaee85736d1180eaa996/anomalib/deploy/export.py#L52-L81

  2. samet-akcay commented on Jan 23, 2023

    @samet-akcay
    Contributor

    I'm converting this to a Q&A in discussions, so let's continue there.

  3. locked and limited conversation to collaborators on Jan 23, 2023
  4. converted this issue into a discussion #862 on Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions