Add notes about the exported ONNX model #186
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
ONNX
model exported withyolort
differs from the official one in the following three ways.ONNX
graph now supports dynamic shapes, and we use(3, H, W)
as the input shape (for example(3, 640, 640)
).letterbox
) into the graph as well. We only require the input image to be in theRGB
channel, and to be rescaled tofloat32 [0-1]
from generaluint [0-255]
. The main logic we use to implement this mechanism is below. (And this plays the same role of the officialletterbox
, but there will be a little difference in accuracy now.)nms
) into the model graph, which performs the same task asnon_max_suppression
except for the format of the inputs. (And here theONNX
graph is required to be dynamic.)