Skip to content

Instantly share code, notes, and snippets.

import keras
import numpy as np
import tensorrt as trt
import common # it uses the same common as in standard tensorrt samples (it typically is in /usr/src/tensorrt/samples/python/common.py)
import sys, os
sys.path.insert(1, os.path.join(sys.path[0], ".."))
# This import causes pycuda to automatically manage CUDA context creation and cleanup.
import pycuda.autoinit
# You can set the logger severity higher to suppress messages (or lower to display more messages).
sudo python yolov3_to_onnx.py
Downloading from https://raw.githubusercontent.com/pjreddie/darknet/f86901f6177dfc6116360a13cc06ab680e0c86b0/cfg/yolov3.cfg, this may take a while...
100% [................................................................................] 8342 / 8342
Downloading from https://pjreddie.com/media/files/yolov3.weights, this may take a while...
100% [......................................................................] 248007048 / 248007048
Layer of type yolo not supported, skipping ONNX node generation.
Layer of type yolo not supported, skipping ONNX node generation.
Layer of type yolo not supported, skipping ONNX node generation.
graph YOLOv3-608 (
%000_net[FLOAT, 64x3x608x608]