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

Refactor ONNX export and tutorial #319

Merged
merged 7 commits into from
Feb 15, 2022
Merged

Refactor ONNX export and tutorial #319

merged 7 commits into from
Feb 15, 2022

Conversation

zhiqwang
Copy link
Owner

@zhiqwang zhiqwang commented Feb 15, 2022

We introduce a new tool to export ONNX models:

from yolort.models import yolov5n6
from yolort.runtime.ort_helper import export_onnx

onnx_path = "yolov5n6.onnx"
score_thresh = 0.35

model = yolov5n6(pretrained=True, score_thresh=score_thresh)
model = model.eval()

export_onnx(model=model, onnx_path=onnx_path)

@zhiqwang zhiqwang added API Library use interface documentation Improvements or additions to documentation labels Feb 15, 2022
@codecov
Copy link

codecov bot commented Feb 15, 2022

Codecov Report

Merging #319 (8d704bd) into main (7121d65) will increase coverage by 0.12%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #319      +/-   ##
==========================================
+ Coverage   94.98%   95.10%   +0.12%     
==========================================
  Files          11       11              
  Lines         738      736       -2     
==========================================
- Hits          701      700       -1     
+ Misses         37       36       -1     
Flag Coverage Δ
unittests 95.10% <100.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
test/test_runtime_ort.py 95.91% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7121d65...8d704bd. Read the comment docs.

@zhiqwang zhiqwang force-pushed the refactor-onnx-export branch from 2e0e968 to 274d428 Compare February 15, 2022 09:19
@zhiqwang zhiqwang force-pushed the refactor-onnx-export branch from 274d428 to 8d704bd Compare February 15, 2022 09:23
@zhiqwang zhiqwang merged commit 61a6e62 into main Feb 15, 2022
@zhiqwang zhiqwang deleted the refactor-onnx-export branch February 15, 2022 09:42
@zhiqwang zhiqwang added the deployment Inference acceleration for production label Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Library use interface deployment Inference acceleration for production documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant