Skip to content

hiennguyen9874/yolov7-seg

Repository files navigation

Export Yolov7-seg to ONNX and TensorRT

This implimentation is based on yolov7.

Install

Usage

Download model

Export with roi-align

Export ONNX

  • python3 segment/export.py --data ./data/coco.yaml --weights ./weights/yolov7-seg.pt --batch-size 1 --device cpu --simplify --opset 14 --workspace 8 --iou-thres 0.65 --conf-thres 0.35 --include onnx --end2end --cleanup --dynamic-batch --roi-align

  • scripts

Export TensorRT

  • python3 segment/export.py --data ./data/coco.yaml --weights ./weights/yolov7-seg.pt --batch-size 1 --device cpu --simplify --opset 14 --workspace 8 --iou-thres 0.65 --conf-thres 0.35 --include onnx --end2end --trt --cleanup --dynamic-batch --roi-align

  • /usr/src/tensorrt/bin/trtexec --onnx=./weights/yolov7-seg.onnx --saveEngine=./weights/yolov7-seg-nms.trt --workspace=8192 --fp16 --minShapes=images:1x3x640x640 --optShapes=images:1x3x640x640 --maxShapes=images:8x3x640x640 --shapes=images:1x3x640x640

  • scripts

Export without roi-align

Export ONNX

  • python3 segment/export.py --data ./data/coco.yaml --weights ./weights/yolov7-seg.pt --batch-size 1 --device cpu --simplify --opset 14 --workspace 8 --iou-thres 0.65 --conf-thres 0.35 --include onnx --end2end --cleanup --dynamic-batch

  • scripts

Export TensorRT

  • python3 segment/export.py --data ./data/coco.yaml --weights ./weights/yolov7-seg.pt --batch-size 1 --device cpu --simplify --opset 14 --workspace 8 --iou-thres 0.65 --conf-thres 0.35 --include onnx --end2end --trt --cleanup --dynamic-batch

  • /usr/src/tensorrt/bin/trtexec --onnx=./weights/yolov7-seg.onnx --saveEngine=./weights/yolov7-seg-nms.trt --workspace=8192 --fp16 --minShapes=images:1x3x640x640 --optShapes=images:1x3x640x640 --maxShapes=images:8x3x640x640 --shapes=images:1x3x640x640

  • scripts

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published