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 pre-processing in PredictorTRT pipeline #309

Merged
merged 9 commits into from
Feb 11, 2022
Merged

Conversation

zhiqwang
Copy link
Owner

@zhiqwang zhiqwang commented Feb 11, 2022

We introduce a new PredictorTRT inference pipeline to call the exported TensorRT engine.

import torch
from yolort.runtime import PredictorTRT

# Load the exported TensorRT engine
engine_path = 'yolov5n6.engine'
device = torch.device('cuda')
y_runtime = PredictorTRT(engine_path, device=device)

# Perform inference on an image file
predictions = y_runtime.predict('bus.jpg')

@zhiqwang zhiqwang added enhancement New feature or request API Library use interface labels Feb 11, 2022
@codecov
Copy link

codecov bot commented Feb 11, 2022

Codecov Report

Merging #309 (dfdd861) into main (720cd32) will not change coverage.
The diff coverage is n/a.

❗ Current head dfdd861 differs from pull request most recent head 320ec86. Consider uploading reports for the commit 320ec86 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #309   +/-   ##
=======================================
  Coverage   94.93%   94.93%           
=======================================
  Files          11       11           
  Lines         731      731           
=======================================
  Hits          694      694           
  Misses         37       37           
Flag Coverage Δ
unittests 94.93% <ø> (ø)

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


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 720cd32...320ec86. Read the comment docs.

@CLAassistant
Copy link

CLAassistant commented Feb 11, 2022

CLA assistant check
All committers have signed the CLA.

@zhiqwang zhiqwang merged commit c4fbbe1 into main Feb 11, 2022
@zhiqwang zhiqwang deleted the trt-preprocessing branch February 11, 2022 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Library use interface enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants