glenn-jocher
commited on
Commit
•
d6ae1c8
1
Parent(s):
5185981
Created using Colaboratory
Browse files- tutorial.ipynb +24 -3
tutorial.ipynb
CHANGED
@@ -368,7 +368,7 @@
|
|
368 |
"colab_type": "text"
|
369 |
},
|
370 |
"source": [
|
371 |
-
"<a href=\"https://colab.research.google.com/github/ultralytics/yolov5/blob/
|
372 |
]
|
373 |
},
|
374 |
{
|
@@ -412,7 +412,7 @@
|
|
412 |
"from yolov5 import utils\n",
|
413 |
"display = utils.notebook_init() # checks"
|
414 |
],
|
415 |
-
"execution_count":
|
416 |
"outputs": [
|
417 |
{
|
418 |
"output_type": "stream",
|
@@ -1081,6 +1081,27 @@
|
|
1081 |
],
|
1082 |
"execution_count": null,
|
1083 |
"outputs": []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1084 |
}
|
1085 |
]
|
1086 |
-
}
|
|
|
368 |
"colab_type": "text"
|
369 |
},
|
370 |
"source": [
|
371 |
+
"<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>"
|
372 |
]
|
373 |
},
|
374 |
{
|
|
|
412 |
"from yolov5 import utils\n",
|
413 |
"display = utils.notebook_init() # checks"
|
414 |
],
|
415 |
+
"execution_count": null,
|
416 |
"outputs": [
|
417 |
{
|
418 |
"output_type": "stream",
|
|
|
1081 |
],
|
1082 |
"execution_count": null,
|
1083 |
"outputs": []
|
1084 |
+
},
|
1085 |
+
{
|
1086 |
+
"cell_type": "code",
|
1087 |
+
"metadata": {
|
1088 |
+
"id": "VTRwsvA9u7ln"
|
1089 |
+
},
|
1090 |
+
"source": [
|
1091 |
+
"# TensorRT \n",
|
1092 |
+
"# https://developer.nvidia.com/nvidia-tensorrt-download\n",
|
1093 |
+
"!lsb_release -a # check system\n",
|
1094 |
+
"%ls /usr/local | grep cuda # check CUDA\n",
|
1095 |
+
"!wget https://ultralytics.com/assets/TensorRT-8.2.0.6.Linux.x86_64-gnu.cuda-11.4.cudnn8.2.tar.gz # download\n",
|
1096 |
+
"![ -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",
|
1097 |
+
"%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",
|
1098 |
+
"%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",
|
1099 |
+
"\n",
|
1100 |
+
"!python export.py --weights yolov5s.pt --include engine --imgsz 640 640 --device 0\n",
|
1101 |
+
"!python detect.py --weights yolov5s.engine --imgsz 640 640 --device 0"
|
1102 |
+
],
|
1103 |
+
"execution_count": null,
|
1104 |
+
"outputs": []
|
1105 |
}
|
1106 |
]
|
1107 |
+
}
|