Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notes about the exported ONNX model #186

Merged
merged 2 commits into from
Oct 3, 2021
Merged

Add notes about the exported ONNX model #186

merged 2 commits into from
Oct 3, 2021

Conversation

zhiqwang
Copy link
Owner

@zhiqwang zhiqwang commented Oct 3, 2021

The ONNX model exported with yolort differs from the official one in the following three ways.

  • The exported ONNX graph now supports dynamic shapes, and we use (3, H, W) as the input shape (for example (3, 640, 640)).
  • We embed the pre-processing (letterbox) into the graph as well. We only require the input image to be in the RGB channel, and to be rescaled to float32 [0-1] from general uint [0-255]. The main logic we use to implement this mechanism is below. (And this plays the same role of the official letterbox, but there will be a little difference in accuracy now.)
  • We embed the post-processing (nms) into the model graph, which performs the same task as non_max_suppression except for the format of the inputs. (And here the ONNX graph is required to be dynamic.)

@zhiqwang zhiqwang added the documentation Improvements or additions to documentation label Oct 3, 2021
@zhiqwang zhiqwang merged commit ad7862b into master Oct 3, 2021
@zhiqwang zhiqwang deleted the add-notes branch October 3, 2021 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant