Skip to content

Commit

Permalink
Remove tensorrt pip install check (ultralytics#7439)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored and Clay Januhowski committed Sep 8, 2022
1 parent 7dd0a79 commit 88d8448
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions export.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,7 @@ def export_coreml(model, im, file, num_boxes, num_classes, labels, conf_thres, i
def export_engine(model, im, file, train, half, simplify, workspace=4, verbose=False, prefix=colorstr('TensorRT:')):
# YOLOv5 TensorRT export https://developer.nvidia.com/tensorrt
try:
check_requirements(('tensorrt',))
import tensorrt as trt
import tensorrt as trt # pip install -U nvidia-tensorrt --index-url https://pypi.ngc.nvidia.com

if trt.__version__[0] == '7': # TensorRT 7 handling https://github.com/ultralytics/yolov5/issues/6012
grid = model.model[-1].anchor_grid
Expand Down

0 comments on commit 88d8448

Please sign in to comment.