Created using Colaboratory
This commit is contained in:
parent
5185981993
commit
d6ae1c835a
|
|
@ -368,7 +368,7 @@
|
|||
"colab_type": "text"
|
||||
},
|
||||
"source": [
|
||||
"<a href=\"https://colab.research.google.com/github/ultralytics/yolov5/blob/update%2Fnotebook/tutorial.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
|
||||
"<a href=\"https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -412,7 +412,7 @@
|
|||
"from yolov5 import utils\n",
|
||||
"display = utils.notebook_init() # checks"
|
||||
],
|
||||
"execution_count": 2,
|
||||
"execution_count": null,
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
|
|
@ -1081,6 +1081,27 @@
|
|||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"metadata": {
|
||||
"id": "VTRwsvA9u7ln"
|
||||
},
|
||||
"source": [
|
||||
"# TensorRT \n",
|
||||
"# https://developer.nvidia.com/nvidia-tensorrt-download\n",
|
||||
"!lsb_release -a # check system\n",
|
||||
"%ls /usr/local | grep cuda # check CUDA\n",
|
||||
"!wget https://ultralytics.com/assets/TensorRT-8.2.0.6.Linux.x86_64-gnu.cuda-11.4.cudnn8.2.tar.gz # download\n",
|
||||
"![ -d /content/TensorRT-8.2.0.6/ ] || tar -C /content/ -zxf ./TensorRT-8.2.0.6.Linux.x86_64-gnu.cuda-11.4.cudnn8.2.tar.gz # unzip\n",
|
||||
"%pip list | grep tensorrt || pip install /content/TensorRT-8.2.0.6/python/tensorrt-8.2.0.6-cp37-none-linux_x86_64.whl # install\n",
|
||||
"%env LD_LIBRARY_PATH=/usr/local/cuda-11.1/lib64:/content/cuda-11.1/lib64:/content/TensorRT-8.2.0.6/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64 # add to path\n",
|
||||
"\n",
|
||||
"!python export.py --weights yolov5s.pt --include engine --imgsz 640 640 --device 0\n",
|
||||
"!python detect.py --weights yolov5s.engine --imgsz 640 640 --device 0"
|
||||
],
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue