Upload 4 files
Browse filesAdded model files and notebook
- .gitattributes +1 -0
- .ipynb_checkpoints/notebookcf133ce21c-checkpoint.ipynb +814 -0
- notebookcf133ce21c.ipynb +804 -0
- superresolution.jpg +3 -0
- y8best.pt +3 -0
.gitattributes
CHANGED
|
@@ -32,3 +32,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
superresolution.jpg filter=lfs diff=lfs merge=lfs -text
|
.ipynb_checkpoints/notebookcf133ce21c-checkpoint.ipynb
ADDED
|
@@ -0,0 +1,814 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "code",
|
| 5 |
+
"execution_count": 2,
|
| 6 |
+
"metadata": {},
|
| 7 |
+
"outputs": [
|
| 8 |
+
{
|
| 9 |
+
"name": "stdout",
|
| 10 |
+
"output_type": "stream",
|
| 11 |
+
"text": [
|
| 12 |
+
"Sat Mar 4 21:14:41 2023 \n",
|
| 13 |
+
"+---------------------------------------------------------------------------------------+\n",
|
| 14 |
+
"| NVIDIA-SMI 531.18 Driver Version: 531.18 CUDA Version: 12.1 |\n",
|
| 15 |
+
"|-----------------------------------------+----------------------+----------------------+\n",
|
| 16 |
+
"| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |\n",
|
| 17 |
+
"| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n",
|
| 18 |
+
"| | | MIG M. |\n",
|
| 19 |
+
"|=========================================+======================+======================|\n",
|
| 20 |
+
"| 0 NVIDIA GeForce GTX 1080 Ti WDDM | 00000000:B3:00.0 On | N/A |\n",
|
| 21 |
+
"|100% 42C P0 68W / 127W| 1980MiB / 11264MiB | 3% Default |\n",
|
| 22 |
+
"| | | N/A |\n",
|
| 23 |
+
"+-----------------------------------------+----------------------+----------------------+\n",
|
| 24 |
+
" \n",
|
| 25 |
+
"+---------------------------------------------------------------------------------------+\n",
|
| 26 |
+
"| Processes: |\n",
|
| 27 |
+
"| GPU GI CI PID Type Process name GPU Memory |\n",
|
| 28 |
+
"| ID ID Usage |\n",
|
| 29 |
+
"|=======================================================================================|\n",
|
| 30 |
+
"| 0 N/A N/A 1148 C+G ... (x86)\\Audeze\\AudezeHQ\\AudezeHQ.exe N/A |\n",
|
| 31 |
+
"| 0 N/A N/A 2232 C+G ...GeForce Experience\\NVIDIA Share.exe N/A |\n",
|
| 32 |
+
"| 0 N/A N/A 6208 C+G ..._x64__rz1tebttyb220\\DolbyAccess.exe N/A |\n",
|
| 33 |
+
"| 0 N/A N/A 9096 C+G ...CBS_cw5n1h2txyewy\\TextInputHost.exe N/A |\n",
|
| 34 |
+
"| 0 N/A N/A 9832 C+G ...63.0_x86__zpdnekdrzrea0\\Spotify.exe N/A |\n",
|
| 35 |
+
"| 0 N/A N/A 10856 C+G ....0_x64__8wekyb3d8bbwe\\HxOutlook.exe N/A |\n",
|
| 36 |
+
"| 0 N/A N/A 11512 C+G ...2txyewy\\StartMenuExperienceHost.exe N/A |\n",
|
| 37 |
+
"| 0 N/A N/A 11596 C+G ...GeForce Experience\\NVIDIA Share.exe N/A |\n",
|
| 38 |
+
"| 0 N/A N/A 12780 C+G ...rPicker\\PowerToys.ColorPickerUI.exe N/A |\n",
|
| 39 |
+
"| 0 N/A N/A 14676 C+G ...on\\110.0.1587.57\\msedgewebview2.exe N/A |\n",
|
| 40 |
+
"| 0 N/A N/A 14900 C+G C:\\Windows\\explorer.exe N/A |\n",
|
| 41 |
+
"| 0 N/A N/A 16116 C+G ...FancyZones\\PowerToys.FancyZones.exe N/A |\n",
|
| 42 |
+
"| 0 N/A N/A 17548 C+G ...5n1h2txyewy\\ShellExperienceHost.exe N/A |\n",
|
| 43 |
+
"| 0 N/A N/A 17848 C ...al\\Discord\\app-1.0.9011\\Discord.exe N/A |\n",
|
| 44 |
+
"| 0 N/A N/A 18064 C+G ...\\cef\\cef.win7x64\\steamwebhelper.exe N/A |\n",
|
| 45 |
+
"| 0 N/A N/A 20132 C+G ...crosoft\\Edge\\Application\\msedge.exe N/A |\n",
|
| 46 |
+
"| 0 N/A N/A 20864 C+G ...t.LockApp_cw5n1h2txyewy\\LockApp.exe N/A |\n",
|
| 47 |
+
"| 0 N/A N/A 20928 C+G ...B\\system_tray\\lghub_system_tray.exe N/A |\n",
|
| 48 |
+
"| 0 N/A N/A 22896 C+G ...Cloudflare WARP\\Cloudflare WARP.exe N/A |\n",
|
| 49 |
+
"| 0 N/A N/A 23784 C+G ...__8wekyb3d8bbwe\\WindowsTerminal.exe N/A |\n",
|
| 50 |
+
"| 0 N/A N/A 24416 C+G ...cal\\Microsoft\\OneDrive\\OneDrive.exe N/A |\n",
|
| 51 |
+
"| 0 N/A N/A 27532 C+G ...auncher\\PowerToys.PowerLauncher.exe N/A |\n",
|
| 52 |
+
"| 0 N/A N/A 28696 C+G ...siveControlPanel\\SystemSettings.exe N/A |\n",
|
| 53 |
+
"| 0 N/A N/A 29184 C+G ...ekyb3d8bbwe\\PhoneExperienceHost.exe N/A |\n",
|
| 54 |
+
"| 0 N/A N/A 32684 C+G ...nt.CBS_cw5n1h2txyewy\\SearchHost.exe N/A |\n",
|
| 55 |
+
"| 0 N/A N/A 34624 C+G C:\\Program Files\\LGHUB\\lghub.exe N/A |\n",
|
| 56 |
+
"| 0 N/A N/A 34692 C+G ...pdnekdrzrea0\\XboxGameBarSpotify.exe N/A |\n",
|
| 57 |
+
"| 0 N/A N/A 37692 C+G ...4.0_x64__cv1g1gvanyjgm\\WhatsApp.exe N/A |\n",
|
| 58 |
+
"+---------------------------------------------------------------------------------------+\n"
|
| 59 |
+
]
|
| 60 |
+
}
|
| 61 |
+
],
|
| 62 |
+
"source": [
|
| 63 |
+
"!nvidia-smi"
|
| 64 |
+
]
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"cell_type": "code",
|
| 68 |
+
"execution_count": null,
|
| 69 |
+
"metadata": {},
|
| 70 |
+
"outputs": [],
|
| 71 |
+
"source": [
|
| 72 |
+
"import os\n",
|
| 73 |
+
"HOME = os.getcwd()\n",
|
| 74 |
+
"print(HOME)"
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
{
|
| 78 |
+
"cell_type": "code",
|
| 79 |
+
"execution_count": null,
|
| 80 |
+
"metadata": {},
|
| 81 |
+
"outputs": [
|
| 82 |
+
{
|
| 83 |
+
"name": "stderr",
|
| 84 |
+
"output_type": "stream",
|
| 85 |
+
"text": [
|
| 86 |
+
"C:\\Users\\Gyana\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\tqdm\\auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
|
| 87 |
+
" from .autonotebook import tqdm as notebook_tqdm\n"
|
| 88 |
+
]
|
| 89 |
+
}
|
| 90 |
+
],
|
| 91 |
+
"source": [
|
| 92 |
+
"\n",
|
| 93 |
+
"from IPython import display\n",
|
| 94 |
+
"display.clear_output()\n",
|
| 95 |
+
"\n",
|
| 96 |
+
"from ultralytics import YOLOV8\n",
|
| 97 |
+
"ultralytics.checks()"
|
| 98 |
+
]
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"cell_type": "code",
|
| 102 |
+
"execution_count": 1,
|
| 103 |
+
"metadata": {},
|
| 104 |
+
"outputs": [],
|
| 105 |
+
"source": [
|
| 106 |
+
"!pip install roboflow\n",
|
| 107 |
+
"\n"
|
| 108 |
+
]
|
| 109 |
+
},
|
| 110 |
+
{
|
| 111 |
+
"cell_type": "code",
|
| 112 |
+
"execution_count": 2,
|
| 113 |
+
"metadata": {},
|
| 114 |
+
"outputs": [
|
| 115 |
+
{
|
| 116 |
+
"ename": "ModuleNotFoundError",
|
| 117 |
+
"evalue": "No module named 'roboflow'",
|
| 118 |
+
"output_type": "error",
|
| 119 |
+
"traceback": [
|
| 120 |
+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
|
| 121 |
+
"\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
|
| 122 |
+
"Cell \u001b[1;32mIn[2], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mroboflow\u001b[39;00m \u001b[39mimport\u001b[39;00m Roboflow\n\u001b[0;32m 2\u001b[0m rf \u001b[39m=\u001b[39m Roboflow(api_key\u001b[39m=\u001b[39m\u001b[39m\"\u001b[39m\u001b[39m2NdQm1ivtFCAYiOLVTwn\u001b[39m\u001b[39m\"\u001b[39m)\n\u001b[0;32m 3\u001b[0m project \u001b[39m=\u001b[39m rf\u001b[39m.\u001b[39mworkspace(\u001b[39m\"\u001b[39m\u001b[39mhackthethong\u001b[39m\u001b[39m\"\u001b[39m)\u001b[39m.\u001b[39mproject(\u001b[39m\"\u001b[39m\u001b[39mpothole-detection-gmnid\u001b[39m\u001b[39m\"\u001b[39m)\n",
|
| 123 |
+
"\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'roboflow'"
|
| 124 |
+
]
|
| 125 |
+
}
|
| 126 |
+
],
|
| 127 |
+
"source": [
|
| 128 |
+
"from roboflow import Roboflow\n",
|
| 129 |
+
"rf = Roboflow(api_key=\"2NdQm1ivtFCAYiOLVTwn\")\n",
|
| 130 |
+
"project = rf.workspace(\"hackthethong\").project(\"pothole-detection-gmnid\")\n",
|
| 131 |
+
"dataset = project.version(3).download(\"yolov8\")"
|
| 132 |
+
]
|
| 133 |
+
},
|
| 134 |
+
{
|
| 135 |
+
"cell_type": "code",
|
| 136 |
+
"execution_count": 1,
|
| 137 |
+
"metadata": {
|
| 138 |
+
"_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19",
|
| 139 |
+
"_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5",
|
| 140 |
+
"execution": {
|
| 141 |
+
"iopub.execute_input": "2023-03-04T11:06:34.982368Z",
|
| 142 |
+
"iopub.status.busy": "2023-03-04T11:06:34.982065Z",
|
| 143 |
+
"iopub.status.idle": "2023-03-04T11:06:36.155978Z",
|
| 144 |
+
"shell.execute_reply": "2023-03-04T11:06:36.154454Z",
|
| 145 |
+
"shell.execute_reply.started": "2023-03-04T11:06:34.982341Z"
|
| 146 |
+
}
|
| 147 |
+
},
|
| 148 |
+
"outputs": [
|
| 149 |
+
{
|
| 150 |
+
"name": "stdout",
|
| 151 |
+
"output_type": "stream",
|
| 152 |
+
"text": [
|
| 153 |
+
"Sat Mar 4 11:06:35 2023 \n",
|
| 154 |
+
"+-----------------------------------------------------------------------------+\n",
|
| 155 |
+
"| NVIDIA-SMI 470.82.01 Driver Version: 470.82.01 CUDA Version: 11.4 |\n",
|
| 156 |
+
"|-------------------------------+----------------------+----------------------+\n",
|
| 157 |
+
"| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n",
|
| 158 |
+
"| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n",
|
| 159 |
+
"| | | MIG M. |\n",
|
| 160 |
+
"|===============================+======================+======================|\n",
|
| 161 |
+
"| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n",
|
| 162 |
+
"| N/A 36C P8 9W / 70W | 0MiB / 15109MiB | 0% Default |\n",
|
| 163 |
+
"| | | N/A |\n",
|
| 164 |
+
"+-------------------------------+----------------------+----------------------+\n",
|
| 165 |
+
"| 1 Tesla T4 Off | 00000000:00:05.0 Off | 0 |\n",
|
| 166 |
+
"| N/A 47C P8 10W / 70W | 0MiB / 15109MiB | 0% Default |\n",
|
| 167 |
+
"| | | N/A |\n",
|
| 168 |
+
"+-------------------------------+----------------------+----------------------+\n",
|
| 169 |
+
" \n",
|
| 170 |
+
"+-----------------------------------------------------------------------------+\n",
|
| 171 |
+
"| Processes: |\n",
|
| 172 |
+
"| GPU GI CI PID Type Process name GPU Memory |\n",
|
| 173 |
+
"| ID ID Usage |\n",
|
| 174 |
+
"|=============================================================================|\n",
|
| 175 |
+
"| No running processes found |\n",
|
| 176 |
+
"+-----------------------------------------------------------------------------+\n"
|
| 177 |
+
]
|
| 178 |
+
}
|
| 179 |
+
],
|
| 180 |
+
"source": [
|
| 181 |
+
"!nvidia-smi"
|
| 182 |
+
]
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"cell_type": "code",
|
| 186 |
+
"execution_count": 2,
|
| 187 |
+
"metadata": {
|
| 188 |
+
"execution": {
|
| 189 |
+
"iopub.execute_input": "2023-03-04T11:06:36.165528Z",
|
| 190 |
+
"iopub.status.busy": "2023-03-04T11:06:36.162799Z",
|
| 191 |
+
"iopub.status.idle": "2023-03-04T11:06:36.175759Z",
|
| 192 |
+
"shell.execute_reply": "2023-03-04T11:06:36.174308Z",
|
| 193 |
+
"shell.execute_reply.started": "2023-03-04T11:06:36.165476Z"
|
| 194 |
+
}
|
| 195 |
+
},
|
| 196 |
+
"outputs": [
|
| 197 |
+
{
|
| 198 |
+
"name": "stdout",
|
| 199 |
+
"output_type": "stream",
|
| 200 |
+
"text": [
|
| 201 |
+
"/kaggle/working\n"
|
| 202 |
+
]
|
| 203 |
+
}
|
| 204 |
+
],
|
| 205 |
+
"source": [
|
| 206 |
+
"import os\n",
|
| 207 |
+
"HOME = os.getcwd()\n",
|
| 208 |
+
"print(HOME)"
|
| 209 |
+
]
|
| 210 |
+
},
|
| 211 |
+
{
|
| 212 |
+
"cell_type": "code",
|
| 213 |
+
"execution_count": 3,
|
| 214 |
+
"metadata": {
|
| 215 |
+
"execution": {
|
| 216 |
+
"iopub.execute_input": "2023-03-04T11:06:36.180607Z",
|
| 217 |
+
"iopub.status.busy": "2023-03-04T11:06:36.179797Z",
|
| 218 |
+
"iopub.status.idle": "2023-03-04T11:06:55.605740Z",
|
| 219 |
+
"shell.execute_reply": "2023-03-04T11:06:55.604691Z",
|
| 220 |
+
"shell.execute_reply.started": "2023-03-04T11:06:36.180564Z"
|
| 221 |
+
}
|
| 222 |
+
},
|
| 223 |
+
"outputs": [
|
| 224 |
+
{
|
| 225 |
+
"name": "stderr",
|
| 226 |
+
"output_type": "stream",
|
| 227 |
+
"text": [
|
| 228 |
+
"Ultralytics YOLOv8.0.20 🚀 Python-3.7.12 torch-1.13.0 CUDA:0 (Tesla T4, 15110MiB)\n",
|
| 229 |
+
"Setup complete ✅ (2 CPUs, 15.6 GB RAM, 4437.1/8062.4 GB disk)\n"
|
| 230 |
+
]
|
| 231 |
+
}
|
| 232 |
+
],
|
| 233 |
+
"source": [
|
| 234 |
+
"# Pip install method (recommended)\n",
|
| 235 |
+
"\n",
|
| 236 |
+
"!pip install ultralytics==8.0.20\n",
|
| 237 |
+
"\n",
|
| 238 |
+
"from IPython import display\n",
|
| 239 |
+
"display.clear_output()\n",
|
| 240 |
+
"\n",
|
| 241 |
+
"import ultralytics\n",
|
| 242 |
+
"ultralytics.checks()"
|
| 243 |
+
]
|
| 244 |
+
},
|
| 245 |
+
{
|
| 246 |
+
"cell_type": "code",
|
| 247 |
+
"execution_count": 4,
|
| 248 |
+
"metadata": {
|
| 249 |
+
"execution": {
|
| 250 |
+
"iopub.execute_input": "2023-03-04T11:06:55.608863Z",
|
| 251 |
+
"iopub.status.busy": "2023-03-04T11:06:55.608358Z",
|
| 252 |
+
"iopub.status.idle": "2023-03-04T11:06:55.615639Z",
|
| 253 |
+
"shell.execute_reply": "2023-03-04T11:06:55.613293Z",
|
| 254 |
+
"shell.execute_reply.started": "2023-03-04T11:06:55.608820Z"
|
| 255 |
+
}
|
| 256 |
+
},
|
| 257 |
+
"outputs": [],
|
| 258 |
+
"source": [
|
| 259 |
+
"from ultralytics import YOLO\n",
|
| 260 |
+
"\n",
|
| 261 |
+
"from IPython.display import display, Image"
|
| 262 |
+
]
|
| 263 |
+
},
|
| 264 |
+
{
|
| 265 |
+
"cell_type": "code",
|
| 266 |
+
"execution_count": null,
|
| 267 |
+
"metadata": {
|
| 268 |
+
"execution": {
|
| 269 |
+
"iopub.execute_input": "2023-03-04T11:06:55.618151Z",
|
| 270 |
+
"iopub.status.busy": "2023-03-04T11:06:55.617309Z",
|
| 271 |
+
"iopub.status.idle": "2023-03-04T11:07:53.787811Z"
|
| 272 |
+
}
|
| 273 |
+
},
|
| 274 |
+
"outputs": [
|
| 275 |
+
{
|
| 276 |
+
"name": "stdout",
|
| 277 |
+
"output_type": "stream",
|
| 278 |
+
"text": [
|
| 279 |
+
"/kaggle/working/datasets\n",
|
| 280 |
+
"Collecting roboflow\n",
|
| 281 |
+
" Downloading roboflow-0.2.32-py3-none-any.whl (50 kB)\n",
|
| 282 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.2/50.2 kB\u001b[0m \u001b[31m2.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 283 |
+
"\u001b[?25hRequirement already satisfied: opencv-python>=4.1.2 in /opt/conda/lib/python3.7/site-packages (from roboflow) (4.7.0.72)\n",
|
| 284 |
+
"Collecting wget\n",
|
| 285 |
+
" Downloading wget-3.2.zip (10 kB)\n",
|
| 286 |
+
" Preparing metadata (setup.py) ... \u001b[?25ldone\n",
|
| 287 |
+
"\u001b[?25hRequirement already satisfied: urllib3>=1.26.6 in /opt/conda/lib/python3.7/site-packages (from roboflow) (1.26.14)\n",
|
| 288 |
+
"Requirement already satisfied: python-dotenv in /opt/conda/lib/python3.7/site-packages (from roboflow) (0.21.1)\n",
|
| 289 |
+
"Requirement already satisfied: Pillow>=7.1.2 in /opt/conda/lib/python3.7/site-packages (from roboflow) (9.4.0)\n",
|
| 290 |
+
"Collecting chardet==4.0.0\n",
|
| 291 |
+
" Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)\n",
|
| 292 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m178.7/178.7 kB\u001b[0m \u001b[31m8.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 293 |
+
"\u001b[?25hRequirement already satisfied: tqdm>=4.41.0 in /opt/conda/lib/python3.7/site-packages (from roboflow) (4.64.1)\n",
|
| 294 |
+
"Collecting idna==2.10\n",
|
| 295 |
+
" Downloading idna-2.10-py2.py3-none-any.whl (58 kB)\n",
|
| 296 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.8/58.8 kB\u001b[0m \u001b[31m6.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 297 |
+
"\u001b[?25hRequirement already satisfied: matplotlib in /opt/conda/lib/python3.7/site-packages (from roboflow) (3.5.3)\n",
|
| 298 |
+
"Collecting cycler==0.10.0\n",
|
| 299 |
+
" Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)\n",
|
| 300 |
+
"Collecting requests-toolbelt\n",
|
| 301 |
+
" Downloading requests_toolbelt-0.10.1-py2.py3-none-any.whl (54 kB)\n",
|
| 302 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.5/54.5 kB\u001b[0m \u001b[31m6.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 303 |
+
"\u001b[?25hRequirement already satisfied: python-dateutil in /opt/conda/lib/python3.7/site-packages (from roboflow) (2.8.2)\n",
|
| 304 |
+
"Requirement already satisfied: certifi==2022.12.7 in /opt/conda/lib/python3.7/site-packages (from roboflow) (2022.12.7)\n",
|
| 305 |
+
"Requirement already satisfied: numpy>=1.18.5 in /opt/conda/lib/python3.7/site-packages (from roboflow) (1.21.6)\n",
|
| 306 |
+
"Requirement already satisfied: PyYAML>=5.3.1 in /opt/conda/lib/python3.7/site-packages (from roboflow) (6.0)\n",
|
| 307 |
+
"Requirement already satisfied: requests in /opt/conda/lib/python3.7/site-packages (from roboflow) (2.28.2)\n",
|
| 308 |
+
"Requirement already satisfied: six in /opt/conda/lib/python3.7/site-packages (from roboflow) (1.16.0)\n",
|
| 309 |
+
"Collecting pyparsing==2.4.7\n",
|
| 310 |
+
" Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)\n",
|
| 311 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.8/67.8 kB\u001b[0m \u001b[31m8.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 312 |
+
"\u001b[?25hRequirement already satisfied: kiwisolver>=1.3.1 in /opt/conda/lib/python3.7/site-packages (from roboflow) (1.4.4)\n",
|
| 313 |
+
"Requirement already satisfied: typing-extensions in /opt/conda/lib/python3.7/site-packages (from kiwisolver>=1.3.1->roboflow) (4.4.0)\n",
|
| 314 |
+
"Requirement already satisfied: fonttools>=4.22.0 in /opt/conda/lib/python3.7/site-packages (from matplotlib->roboflow) (4.38.0)\n",
|
| 315 |
+
"Requirement already satisfied: packaging>=20.0 in /opt/conda/lib/python3.7/site-packages (from matplotlib->roboflow) (23.0)\n",
|
| 316 |
+
"Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.7/site-packages (from requests->roboflow) (2.1.1)\n",
|
| 317 |
+
"Building wheels for collected packages: wget\n",
|
| 318 |
+
" Building wheel for wget (setup.py) ... \u001b[?25ldone\n",
|
| 319 |
+
"\u001b[?25h Created wheel for wget: filename=wget-3.2-py3-none-any.whl size=9674 sha256=c21353920025ab2a7acd6c41f94a830e3de43131a8eb128b751e9613559978c7\n",
|
| 320 |
+
" Stored in directory: /root/.cache/pip/wheels/e1/e8/db/ebe4dcd7d7d11208c1e4e4ef246cea4fcc8d463c93405a6555\n",
|
| 321 |
+
"Successfully built wget\n",
|
| 322 |
+
"Installing collected packages: wget, pyparsing, idna, cycler, chardet, requests-toolbelt, roboflow\n",
|
| 323 |
+
" Attempting uninstall: pyparsing\n",
|
| 324 |
+
" Found existing installation: pyparsing 3.0.9\n",
|
| 325 |
+
" Uninstalling pyparsing-3.0.9:\n",
|
| 326 |
+
" Successfully uninstalled pyparsing-3.0.9\n",
|
| 327 |
+
" Attempting uninstall: idna\n",
|
| 328 |
+
" Found existing installation: idna 3.4\n",
|
| 329 |
+
" Uninstalling idna-3.4:\n",
|
| 330 |
+
" Successfully uninstalled idna-3.4\n",
|
| 331 |
+
" Attempting uninstall: cycler\n",
|
| 332 |
+
" Found existing installation: cycler 0.11.0\n",
|
| 333 |
+
" Uninstalling cycler-0.11.0:\n",
|
| 334 |
+
" Successfully uninstalled cycler-0.11.0\n",
|
| 335 |
+
"\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
|
| 336 |
+
"librosa 0.10.0 requires soundfile>=0.12.1, but you have soundfile 0.11.0 which is incompatible.\n",
|
| 337 |
+
"cloud-tpu-client 0.10 requires google-api-python-client==1.8.0, but you have google-api-python-client 2.79.0 which is incompatible.\n",
|
| 338 |
+
"apache-beam 2.44.0 requires dill<0.3.2,>=0.3.1.1, but you have dill 0.3.6 which is incompatible.\u001b[0m\u001b[31m\n",
|
| 339 |
+
"\u001b[0mSuccessfully installed chardet-4.0.0 cycler-0.10.0 idna-2.10 pyparsing-2.4.7 requests-toolbelt-0.10.1 roboflow-0.2.32 wget-3.2\n",
|
| 340 |
+
"\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
|
| 341 |
+
"loading Roboflow workspace...\n",
|
| 342 |
+
"loading Roboflow project...\n",
|
| 343 |
+
"Downloading Dataset Version Zip in Pothole-detection-1 to yolov8: 97% [254164992 / 260273386] bytes"
|
| 344 |
+
]
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"name": "stderr",
|
| 348 |
+
"output_type": "stream",
|
| 349 |
+
"text": [
|
| 350 |
+
"IOPub message rate exceeded.\n",
|
| 351 |
+
"The notebook server will temporarily stop sending output\n",
|
| 352 |
+
"to the client in order to avoid crashing it.\n",
|
| 353 |
+
"To change this limit, set the config variable\n",
|
| 354 |
+
"`--NotebookApp.iopub_msg_rate_limit`.\n",
|
| 355 |
+
"\n",
|
| 356 |
+
"Current values:\n",
|
| 357 |
+
"NotebookApp.iopub_msg_rate_limit=1000.0 (msgs/sec)\n",
|
| 358 |
+
"NotebookApp.rate_limit_window=3.0 (secs)\n",
|
| 359 |
+
"\n"
|
| 360 |
+
]
|
| 361 |
+
}
|
| 362 |
+
],
|
| 363 |
+
"source": [
|
| 364 |
+
"!mkdir {HOME}/datasets\n",
|
| 365 |
+
"%cd {HOME}/datasets\n",
|
| 366 |
+
"\n",
|
| 367 |
+
"!pip install roboflow\n",
|
| 368 |
+
"\n",
|
| 369 |
+
"from roboflow import Roboflow\n",
|
| 370 |
+
"rf = Roboflow(api_key=\"2NdQm1ivtFCAYiOLVTwn\")\n",
|
| 371 |
+
"project = rf.workspace(\"hackthethong\").project(\"pothole-detection-gmnid\")\n",
|
| 372 |
+
"dataset = project.version(1).download(\"yolov8\")"
|
| 373 |
+
]
|
| 374 |
+
},
|
| 375 |
+
{
|
| 376 |
+
"cell_type": "code",
|
| 377 |
+
"execution_count": 11,
|
| 378 |
+
"metadata": {
|
| 379 |
+
"execution": {
|
| 380 |
+
"iopub.execute_input": "2023-03-04T11:16:50.287812Z",
|
| 381 |
+
"iopub.status.busy": "2023-03-04T11:16:50.287079Z",
|
| 382 |
+
"iopub.status.idle": "2023-03-04T12:12:27.477858Z",
|
| 383 |
+
"shell.execute_reply": "2023-03-04T12:12:27.476221Z",
|
| 384 |
+
"shell.execute_reply.started": "2023-03-04T11:16:50.287774Z"
|
| 385 |
+
}
|
| 386 |
+
},
|
| 387 |
+
"outputs": [
|
| 388 |
+
{
|
| 389 |
+
"name": "stdout",
|
| 390 |
+
"output_type": "stream",
|
| 391 |
+
"text": [
|
| 392 |
+
"/kaggle/working\n",
|
| 393 |
+
"Ultralytics YOLOv8.0.20 🚀 Python-3.7.12 torch-1.13.0 CUDA:0 (Tesla T4, 15110MiB)\n",
|
| 394 |
+
" CUDA:1 (Tesla T4, 15110MiB)\n",
|
| 395 |
+
"\u001b[34m\u001b[1myolo/engine/trainer: \u001b[0mtask=detect, mode=train, model=yolov8s.yaml, data=/kaggle/working/datasets/Pothole-detection-1/data.yaml, epochs=215, patience=50, batch=24, imgsz=800, save=True, cache=False, device=(0, 1), workers=8, project=None, name=None, exist_ok=False, pretrained=False, optimizer=SGD, verbose=True, seed=0, deterministic=True, single_cls=False, image_weights=False, rect=False, cos_lr=False, close_mosaic=10, resume=False, overlap_mask=True, mask_ratio=4, dropout=False, val=True, save_json=False, save_hybrid=False, conf=0.001, iou=0.7, max_det=300, half=False, dnn=False, plots=True, source=ultralytics/assets/, show=False, save_txt=False, save_conf=False, save_crop=False, hide_labels=False, hide_conf=False, vid_stride=1, line_thickness=3, visualize=False, augment=False, agnostic_nms=False, classes=None, retina_masks=False, boxes=True, format=torchscript, keras=False, optimize=False, int8=False, dynamic=False, simplify=False, opset=17, workspace=4, nms=False, lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.001, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=7.5, cls=0.5, dfl=1.5, fl_gamma=0.0, label_smoothing=0.0, nbs=64, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0, cfg=None, v5loader=False, save_dir=runs/detect/train3\n",
|
| 396 |
+
"Overriding model.yaml nc=80 with nc=1\n",
|
| 397 |
+
"\n",
|
| 398 |
+
" from n params module arguments \n",
|
| 399 |
+
" 0 -1 1 928 ultralytics.nn.modules.Conv [3, 32, 3, 2] \n",
|
| 400 |
+
" 1 -1 1 18560 ultralytics.nn.modules.Conv [32, 64, 3, 2] \n",
|
| 401 |
+
" 2 -1 1 29056 ultralytics.nn.modules.C2f [64, 64, 1, True] \n",
|
| 402 |
+
" 3 -1 1 73984 ultralytics.nn.modules.Conv [64, 128, 3, 2] \n",
|
| 403 |
+
" 4 -1 2 197632 ultralytics.nn.modules.C2f [128, 128, 2, True] \n",
|
| 404 |
+
" 5 -1 1 295424 ultralytics.nn.modules.Conv [128, 256, 3, 2] \n",
|
| 405 |
+
" 6 -1 2 788480 ultralytics.nn.modules.C2f [256, 256, 2, True] \n",
|
| 406 |
+
" 7 -1 1 1180672 ultralytics.nn.modules.Conv [256, 512, 3, 2] \n",
|
| 407 |
+
" 8 -1 1 1838080 ultralytics.nn.modules.C2f [512, 512, 1, True] \n",
|
| 408 |
+
" 9 -1 1 656896 ultralytics.nn.modules.SPPF [512, 512, 5] \n",
|
| 409 |
+
" 10 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
| 410 |
+
" 11 [-1, 6] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 411 |
+
" 12 -1 1 591360 ultralytics.nn.modules.C2f [768, 256, 1] \n",
|
| 412 |
+
" 13 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
| 413 |
+
" 14 [-1, 4] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 414 |
+
" 15 -1 1 148224 ultralytics.nn.modules.C2f [384, 128, 1] \n",
|
| 415 |
+
" 16 -1 1 147712 ultralytics.nn.modules.Conv [128, 128, 3, 2] \n",
|
| 416 |
+
" 17 [-1, 12] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 417 |
+
" 18 -1 1 493056 ultralytics.nn.modules.C2f [384, 256, 1] \n",
|
| 418 |
+
" 19 -1 1 590336 ultralytics.nn.modules.Conv [256, 256, 3, 2] \n",
|
| 419 |
+
" 20 [-1, 9] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 420 |
+
" 21 -1 1 1969152 ultralytics.nn.modules.C2f [768, 512, 1] \n",
|
| 421 |
+
" 22 [15, 18, 21] 1 2116435 ultralytics.nn.modules.Detect [1, [128, 256, 512]] \n",
|
| 422 |
+
"Model summary: 225 layers, 11135987 parameters, 11135971 gradients, 28.6 GFLOPs\n",
|
| 423 |
+
"\n",
|
| 424 |
+
"Transferred 349/355 items from pretrained weights\n",
|
| 425 |
+
"DDP settings: RANK 0, WORLD_SIZE 2, DEVICE cuda:0\n",
|
| 426 |
+
"Overriding model.yaml nc=80 with nc=1\n",
|
| 427 |
+
"\n",
|
| 428 |
+
" from n params module arguments \n",
|
| 429 |
+
" 0 -1 1 928 ultralytics.nn.modules.Conv [3, 32, 3, 2] \n",
|
| 430 |
+
" 1 -1 1 18560 ultralytics.nn.modules.Conv [32, 64, 3, 2] \n",
|
| 431 |
+
" 2 -1 1 29056 ultralytics.nn.modules.C2f [64, 64, 1, True] \n",
|
| 432 |
+
" 3 -1 1 73984 ultralytics.nn.modules.Conv [64, 128, 3, 2] \n",
|
| 433 |
+
" 4 -1 2 197632 ultralytics.nn.modules.C2f [128, 128, 2, True] \n",
|
| 434 |
+
" 5 -1 1 295424 ultralytics.nn.modules.Conv [128, 256, 3, 2] \n",
|
| 435 |
+
" 6 -1 2 788480 ultralytics.nn.modules.C2f [256, 256, 2, True] \n",
|
| 436 |
+
" 7 -1 1 1180672 ultralytics.nn.modules.Conv [256, 512, 3, 2] \n",
|
| 437 |
+
" 8 -1 1 1838080 ultralytics.nn.modules.C2f [512, 512, 1, True] \n",
|
| 438 |
+
" 9 -1 1 656896 ultralytics.nn.modules.SPPF [512, 512, 5] \n",
|
| 439 |
+
" 10 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
| 440 |
+
" 11 [-1, 6] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 441 |
+
" 12 -1 1 591360 ultralytics.nn.modules.C2f [768, 256, 1] \n",
|
| 442 |
+
" 13 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
| 443 |
+
" 14 [-1, 4] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 444 |
+
" 15 -1 1 148224 ultralytics.nn.modules.C2f [384, 128, 1] \n",
|
| 445 |
+
" 16 -1 1 147712 ultralytics.nn.modules.Conv [128, 128, 3, 2] \n",
|
| 446 |
+
" 17 [-1, 12] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 447 |
+
" 18 -1 1 493056 ultralytics.nn.modules.C2f [384, 256, 1] \n",
|
| 448 |
+
" 19 -1 1 590336 ultralytics.nn.modules.Conv [256, 256, 3, 2] \n",
|
| 449 |
+
" 20 [-1, 9] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 450 |
+
" 21 -1 1 1969152 ultralytics.nn.modules.C2f [768, 512, 1] \n",
|
| 451 |
+
" 22 [15, 18, 21] 1 2116435 ultralytics.nn.modules.Detect [1, [128, 256, 512]] \n",
|
| 452 |
+
"YOLOv8s summary: 225 layers, 11135987 parameters, 11135971 gradients, 28.6 GFLOPs\n",
|
| 453 |
+
"\n",
|
| 454 |
+
"\u001b[34m\u001b[1moptimizer:\u001b[0m SGD(lr=0.01) with parameter groups 57 weight(decay=0.0), 64 weight(decay=0.0011250000000000001), 63 bias\n",
|
| 455 |
+
"\u001b[34m\u001b[1mtrain: \u001b[0mScanning /kaggle/working/datasets/Pothole-detection-1/train/labels.cache.\u001b[0m\n",
|
| 456 |
+
"\u001b[34m\u001b[1malbumentations: \u001b[0mBlur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01), CLAHE(p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))\n",
|
| 457 |
+
"\u001b[34m\u001b[1mval: \u001b[0mScanning /kaggle/working/datasets/Pothole-detection-1/valid/labels.cache...\u001b[0m\n",
|
| 458 |
+
"Image sizes 800 train, 800 val\n",
|
| 459 |
+
"Using 2 dataloader workers\n",
|
| 460 |
+
"Logging results to \u001b[1mruns/detect/train3\u001b[0m\n",
|
| 461 |
+
"Starting training for 215 epochs...\n",
|
| 462 |
+
"\n",
|
| 463 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 464 |
+
" 1/215 5.86G 3.481 4.528 4.09 7 800: 1\n",
|
| 465 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 466 |
+
" all 357 941 0.000902 0.0967 0.000495 0.000148\n",
|
| 467 |
+
"\n",
|
| 468 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 469 |
+
" 2/215 6.96G 3.266 3.481 3.476 2 800: 1\n",
|
| 470 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 471 |
+
" all 357 941 0.000937 0.0786 0.000536 0.000168\n",
|
| 472 |
+
"\n",
|
| 473 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 474 |
+
" 3/215 6.96G 2.43 2.349 2.433 7 800: 1\n",
|
| 475 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 476 |
+
" all 357 941 0.00105 0.00213 0.00035 0.000101\n",
|
| 477 |
+
"\n",
|
| 478 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 479 |
+
" 4/215 6.96G 1.867 1.71 1.77 8 800: 1\n",
|
| 480 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 481 |
+
" all 357 941 0.00488 0.0117 0.0025 0.00104\n",
|
| 482 |
+
"\n",
|
| 483 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 484 |
+
" 5/215 6.96G 1.549 1.331 1.48 3 800: 1\n",
|
| 485 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 486 |
+
" all 357 941 0.023 0.0266 0.00589 0.0015\n",
|
| 487 |
+
"\n",
|
| 488 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 489 |
+
" 6/215 6.96G 1.341 1.113 1.34 17 800: 1\n",
|
| 490 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 491 |
+
" all 357 941 0.00154 0.00531 0.000551 0.000166\n",
|
| 492 |
+
"\n",
|
| 493 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 494 |
+
" 7/215 6.96G 1.187 0.9461 1.234 14 800: 1\n",
|
| 495 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 496 |
+
" all 357 941 0.00854 0.0298 0.00488 0.00147\n",
|
| 497 |
+
"\n",
|
| 498 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 499 |
+
" 8/215 6.96G 1.08 0.8943 1.175 8 800: 1\n",
|
| 500 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 501 |
+
" all 357 941 0.0174 0.0765 0.0116 0.00329\n",
|
| 502 |
+
"\n",
|
| 503 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 504 |
+
" 9/215 6.96G 1.012 0.8116 1.133 5 800: 1\n",
|
| 505 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 506 |
+
" all 357 941 0.0058 0.0085 0.00295 0.00103\n",
|
| 507 |
+
"\n",
|
| 508 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 509 |
+
" 10/215 6.96G 0.9529 0.756 1.114 6 800: 1\n",
|
| 510 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 511 |
+
" all 357 941 0.0551 0.0351 0.0156 0.00493\n",
|
| 512 |
+
"\n",
|
| 513 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 514 |
+
" 11/215 6.96G 0.8946 0.7085 1.069 3 800: 1\n",
|
| 515 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 516 |
+
" all 357 941 0.00808 0.051 0.00986 0.00449\n",
|
| 517 |
+
"\n",
|
| 518 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 519 |
+
" 12/215 6.96G 0.8897 0.7045 1.057 4 800: 1\n",
|
| 520 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 521 |
+
" all 357 941 0.0929 0.0244 0.0159 0.00461\n",
|
| 522 |
+
"\n",
|
| 523 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 524 |
+
" 13/215 6.96G 0.8399 0.6641 1.048 5 800: 1\n",
|
| 525 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 526 |
+
" all 357 941 0.0321 0.0893 0.0204 0.00543\n",
|
| 527 |
+
"\n",
|
| 528 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 529 |
+
" 14/215 6.96G 0.8033 0.6374 1.02 10 800: 1\n",
|
| 530 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 531 |
+
" all 357 941 0.0161 0.0298 0.00856 0.003\n",
|
| 532 |
+
"\n",
|
| 533 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 534 |
+
" 15/215 6.96G 0.7915 0.6248 1.019 19 800: 1\n",
|
| 535 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 536 |
+
" all 357 941 0.0149 0.117 0.01 0.00296\n",
|
| 537 |
+
"\n",
|
| 538 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 539 |
+
" 16/215 6.96G 0.7849 0.6106 1.012 2 800: 1\n",
|
| 540 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 541 |
+
" all 357 941 0.0118 0.0298 0.0039 0.00128\n",
|
| 542 |
+
"\n",
|
| 543 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 544 |
+
" 17/215 6.96G 0.7422 0.5916 0.9887 44 800: ^C\n",
|
| 545 |
+
" 17/215 6.96G 0.7432 0.5909 0.9886 49 800: Traceback (most recent call last):\n",
|
| 546 |
+
" File \"/root/.config/Ultralytics/DDP/_temp_f6tt1q5n139889764186704.py\", line 6, in <module>\n",
|
| 547 |
+
" trainer.train()\n",
|
| 548 |
+
" File \"/opt/conda/lib/python3.7/site-packages/ultralytics/yolo/engine/trainer.py\", line 183, in train\n",
|
| 549 |
+
" self._do_train(int(os.getenv(\"RANK\", -1)), world_size)\n",
|
| 550 |
+
" File \"/opt/conda/lib/python3.7/site-packages/ultralytics/yolo/engine/trainer.py\", line 284, in _do_train\n",
|
| 551 |
+
" for i, batch in pbar:\n",
|
| 552 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 628, in __next__\n",
|
| 553 |
+
" data = self._next_data()\n",
|
| 554 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 1316, in _next_data\n",
|
| 555 |
+
" idx, data = self._get_data()\n",
|
| 556 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 1272, in _get_data\n",
|
| 557 |
+
" success, data = self._try_get_data()\n",
|
| 558 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 1120, in _try_get_data\n",
|
| 559 |
+
"Traceback (most recent call last):\n",
|
| 560 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/std.py\", line 1195, in __iter__\n",
|
| 561 |
+
" data = self._data_queue.get(timeout=timeout)\n",
|
| 562 |
+
" File \"/opt/conda/lib/python3.7/queue.py\", line 179, in get\n",
|
| 563 |
+
" self.not_empty.wait(remaining)\n",
|
| 564 |
+
" File \"/opt/conda/lib/python3.7/threading.py\", line 300, in wait\n",
|
| 565 |
+
" gotit = waiter.acquire(True, timeout)\n",
|
| 566 |
+
"KeyboardInterrupt\n",
|
| 567 |
+
" for obj in iterable:\n",
|
| 568 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 628, in __next__\n",
|
| 569 |
+
" data = self._next_data()\n",
|
| 570 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 1316, in _next_data\n",
|
| 571 |
+
" idx, data = self._get_data()\n",
|
| 572 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 1272, in _get_data\n",
|
| 573 |
+
" success, data = self._try_get_data()\n",
|
| 574 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 1120, in _try_get_data\n",
|
| 575 |
+
" data = self._data_queue.get(timeout=timeout)\n",
|
| 576 |
+
" File \"/opt/conda/lib/python3.7/queue.py\", line 179, in get\n",
|
| 577 |
+
" self.not_empty.wait(remaining)\n",
|
| 578 |
+
" File \"/opt/conda/lib/python3.7/threading.py\", line 300, in wait\n",
|
| 579 |
+
" gotit = waiter.acquire(True, timeout)\n",
|
| 580 |
+
"KeyboardInterrupt\n",
|
| 581 |
+
"\n",
|
| 582 |
+
"During handling of the above exception, another exception occurred:\n",
|
| 583 |
+
"\n",
|
| 584 |
+
"Traceback (most recent call last):\n",
|
| 585 |
+
" File \"/root/.config/Ultralytics/DDP/_temp_f6tt1q5n139889764186704.py\", line 6, in <module>\n",
|
| 586 |
+
" trainer.train()\n",
|
| 587 |
+
" File \"/opt/conda/lib/python3.7/site-packages/ultralytics/yolo/engine/trainer.py\", line 183, in train\n",
|
| 588 |
+
" self._do_train(int(os.getenv(\"RANK\", -1)), world_size)\n",
|
| 589 |
+
" File \"/opt/conda/lib/python3.7/site-packages/ultralytics/yolo/engine/trainer.py\", line 284, in _do_train\n",
|
| 590 |
+
" for i, batch in pbar:\n",
|
| 591 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/std.py\", line 1210, in __iter__\n",
|
| 592 |
+
" self.close()\n",
|
| 593 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/std.py\", line 1316, in close\n",
|
| 594 |
+
" self.display(pos=0)\n",
|
| 595 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/std.py\", line 1509, in display\n",
|
| 596 |
+
" self.sp(self.__str__() if msg is None else msg)\n",
|
| 597 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/std.py\", line 350, in print_status\n",
|
| 598 |
+
" fp_write('\\r' + s + (' ' * max(last_len[0] - len_s, 0)))\n",
|
| 599 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/std.py\", line 343, in fp_write\n",
|
| 600 |
+
" fp.write(_unicode(s))\n",
|
| 601 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/utils.py\", line 145, in inner\n",
|
| 602 |
+
" return func(*args, **kwargs)\n",
|
| 603 |
+
"KeyboardInterrupt\n"
|
| 604 |
+
]
|
| 605 |
+
}
|
| 606 |
+
],
|
| 607 |
+
"source": [
|
| 608 |
+
"%cd {HOME}\n",
|
| 609 |
+
"\n",
|
| 610 |
+
"!yolo task=detect mode=train model=yolov8s.pt data={dataset.location}/data.yaml device = '0,1' epochs=215 imgsz=800 plots=True device=0,1 batch = 24\n"
|
| 611 |
+
]
|
| 612 |
+
},
|
| 613 |
+
{
|
| 614 |
+
"cell_type": "code",
|
| 615 |
+
"execution_count": null,
|
| 616 |
+
"metadata": {
|
| 617 |
+
"execution": {
|
| 618 |
+
"iopub.status.busy": "2023-03-04T12:12:29.081618Z",
|
| 619 |
+
"iopub.status.idle": "2023-03-04T12:12:29.082487Z",
|
| 620 |
+
"shell.execute_reply": "2023-03-04T12:12:29.082244Z",
|
| 621 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.082201Z"
|
| 622 |
+
}
|
| 623 |
+
},
|
| 624 |
+
"outputs": [],
|
| 625 |
+
"source": [
|
| 626 |
+
"!ls {HOME}/runs/detect/train/ "
|
| 627 |
+
]
|
| 628 |
+
},
|
| 629 |
+
{
|
| 630 |
+
"cell_type": "code",
|
| 631 |
+
"execution_count": null,
|
| 632 |
+
"metadata": {
|
| 633 |
+
"execution": {
|
| 634 |
+
"iopub.status.busy": "2023-03-04T12:12:29.083867Z",
|
| 635 |
+
"iopub.status.idle": "2023-03-04T12:12:29.084678Z",
|
| 636 |
+
"shell.execute_reply": "2023-03-04T12:12:29.084440Z",
|
| 637 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.084414Z"
|
| 638 |
+
}
|
| 639 |
+
},
|
| 640 |
+
"outputs": [],
|
| 641 |
+
"source": [
|
| 642 |
+
"%cd {HOME}\n",
|
| 643 |
+
"Image(filename=f'{HOME}/runs/detect/train/confusion_matrix.png', width=600)"
|
| 644 |
+
]
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"cell_type": "code",
|
| 648 |
+
"execution_count": null,
|
| 649 |
+
"metadata": {
|
| 650 |
+
"execution": {
|
| 651 |
+
"iopub.status.busy": "2023-03-04T12:12:29.086107Z",
|
| 652 |
+
"iopub.status.idle": "2023-03-04T12:12:29.086926Z",
|
| 653 |
+
"shell.execute_reply": "2023-03-04T12:12:29.086690Z",
|
| 654 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.086663Z"
|
| 655 |
+
}
|
| 656 |
+
},
|
| 657 |
+
"outputs": [],
|
| 658 |
+
"source": [
|
| 659 |
+
"%cd {HOME}\n",
|
| 660 |
+
"Image(filename=f'{HOME}/runs/detect/train/results.png', width=600)"
|
| 661 |
+
]
|
| 662 |
+
},
|
| 663 |
+
{
|
| 664 |
+
"cell_type": "code",
|
| 665 |
+
"execution_count": null,
|
| 666 |
+
"metadata": {
|
| 667 |
+
"execution": {
|
| 668 |
+
"iopub.status.busy": "2023-03-04T12:12:29.088406Z",
|
| 669 |
+
"iopub.status.idle": "2023-03-04T12:12:29.089394Z",
|
| 670 |
+
"shell.execute_reply": "2023-03-04T12:12:29.089118Z",
|
| 671 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.089088Z"
|
| 672 |
+
}
|
| 673 |
+
},
|
| 674 |
+
"outputs": [],
|
| 675 |
+
"source": [
|
| 676 |
+
"%cd {HOME}\n",
|
| 677 |
+
"Image(filename=f'{HOME}/runs/detect/train/val_batch0_pred.jpg', width=600)"
|
| 678 |
+
]
|
| 679 |
+
},
|
| 680 |
+
{
|
| 681 |
+
"cell_type": "code",
|
| 682 |
+
"execution_count": null,
|
| 683 |
+
"metadata": {
|
| 684 |
+
"execution": {
|
| 685 |
+
"iopub.status.busy": "2023-03-04T12:12:29.090791Z",
|
| 686 |
+
"iopub.status.idle": "2023-03-04T12:12:29.091614Z",
|
| 687 |
+
"shell.execute_reply": "2023-03-04T12:12:29.091379Z",
|
| 688 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.091353Z"
|
| 689 |
+
}
|
| 690 |
+
},
|
| 691 |
+
"outputs": [],
|
| 692 |
+
"source": [
|
| 693 |
+
"%cd {HOME}\n",
|
| 694 |
+
"\n",
|
| 695 |
+
"!yolo task=detect mode=val model={HOME}/runs/detect/train/weights/best.pt data={dataset.location}/data.yaml"
|
| 696 |
+
]
|
| 697 |
+
},
|
| 698 |
+
{
|
| 699 |
+
"cell_type": "code",
|
| 700 |
+
"execution_count": null,
|
| 701 |
+
"metadata": {
|
| 702 |
+
"execution": {
|
| 703 |
+
"iopub.status.busy": "2023-03-04T12:12:29.093044Z",
|
| 704 |
+
"iopub.status.idle": "2023-03-04T12:12:29.093872Z",
|
| 705 |
+
"shell.execute_reply": "2023-03-04T12:12:29.093627Z",
|
| 706 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.093602Z"
|
| 707 |
+
}
|
| 708 |
+
},
|
| 709 |
+
"outputs": [],
|
| 710 |
+
"source": [
|
| 711 |
+
"%cd {HOME}\n",
|
| 712 |
+
"!yolo task=detect mode=predict model={HOME}/runs/detect/train/weights/best.pt conf=0.25 source={dataset.location}/test/images save=True"
|
| 713 |
+
]
|
| 714 |
+
},
|
| 715 |
+
{
|
| 716 |
+
"cell_type": "code",
|
| 717 |
+
"execution_count": null,
|
| 718 |
+
"metadata": {
|
| 719 |
+
"execution": {
|
| 720 |
+
"iopub.status.busy": "2023-03-04T12:12:29.095308Z",
|
| 721 |
+
"iopub.status.idle": "2023-03-04T12:12:29.096145Z",
|
| 722 |
+
"shell.execute_reply": "2023-03-04T12:12:29.095908Z",
|
| 723 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.095881Z"
|
| 724 |
+
}
|
| 725 |
+
},
|
| 726 |
+
"outputs": [],
|
| 727 |
+
"source": [
|
| 728 |
+
"import glob\n",
|
| 729 |
+
"from IPython.display import Image, display\n",
|
| 730 |
+
"\n",
|
| 731 |
+
"for image_path in glob.glob(f'{HOME}/runs/detect/predict3/*.jpg')[:3]:\n",
|
| 732 |
+
" display(Image(filename=image_path, width=600))\n",
|
| 733 |
+
" print(\"\\n\")"
|
| 734 |
+
]
|
| 735 |
+
},
|
| 736 |
+
{
|
| 737 |
+
"cell_type": "code",
|
| 738 |
+
"execution_count": null,
|
| 739 |
+
"metadata": {
|
| 740 |
+
"execution": {
|
| 741 |
+
"iopub.status.busy": "2023-03-04T12:12:29.097602Z",
|
| 742 |
+
"iopub.status.idle": "2023-03-04T12:12:29.098464Z",
|
| 743 |
+
"shell.execute_reply": "2023-03-04T12:12:29.098204Z",
|
| 744 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.098177Z"
|
| 745 |
+
}
|
| 746 |
+
},
|
| 747 |
+
"outputs": [],
|
| 748 |
+
"source": [
|
| 749 |
+
"project.version(dataset.version).deploy(model_type=\"yolov8\", model_path=f\"{HOME}/runs/detect/train/\")"
|
| 750 |
+
]
|
| 751 |
+
},
|
| 752 |
+
{
|
| 753 |
+
"cell_type": "code",
|
| 754 |
+
"execution_count": null,
|
| 755 |
+
"metadata": {
|
| 756 |
+
"execution": {
|
| 757 |
+
"iopub.status.busy": "2023-03-04T12:12:29.099771Z",
|
| 758 |
+
"iopub.status.idle": "2023-03-04T12:12:29.100632Z",
|
| 759 |
+
"shell.execute_reply": "2023-03-04T12:12:29.100401Z",
|
| 760 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.100374Z"
|
| 761 |
+
}
|
| 762 |
+
},
|
| 763 |
+
"outputs": [],
|
| 764 |
+
"source": [
|
| 765 |
+
"#Run inference on your model on a persistant, auto-scaling, cloud API\n",
|
| 766 |
+
"\n",
|
| 767 |
+
"#load model\n",
|
| 768 |
+
"model = project.version(dataset.version).model\n",
|
| 769 |
+
"\n",
|
| 770 |
+
"#choose random test set image\n",
|
| 771 |
+
"import os, random\n",
|
| 772 |
+
"test_set_loc = dataset.location + \"/test/images/\"\n",
|
| 773 |
+
"random_test_image = random.choice(os.listdir(test_set_loc))\n",
|
| 774 |
+
"print(\"running inference on \" + random_test_image)\n",
|
| 775 |
+
"\n",
|
| 776 |
+
"pred = model.predict(test_set_loc + random_test_image, confidence=40, overlap=30).json()\n",
|
| 777 |
+
"pred"
|
| 778 |
+
]
|
| 779 |
+
},
|
| 780 |
+
{
|
| 781 |
+
"cell_type": "code",
|
| 782 |
+
"execution_count": null,
|
| 783 |
+
"metadata": {},
|
| 784 |
+
"outputs": [],
|
| 785 |
+
"source": []
|
| 786 |
+
}
|
| 787 |
+
],
|
| 788 |
+
"metadata": {
|
| 789 |
+
"kernelspec": {
|
| 790 |
+
"display_name": "Python 3 (ipykernel)",
|
| 791 |
+
"language": "python",
|
| 792 |
+
"name": "python3"
|
| 793 |
+
},
|
| 794 |
+
"language_info": {
|
| 795 |
+
"codemirror_mode": {
|
| 796 |
+
"name": "ipython",
|
| 797 |
+
"version": 3
|
| 798 |
+
},
|
| 799 |
+
"file_extension": ".py",
|
| 800 |
+
"mimetype": "text/x-python",
|
| 801 |
+
"name": "python",
|
| 802 |
+
"nbconvert_exporter": "python",
|
| 803 |
+
"pygments_lexer": "ipython3",
|
| 804 |
+
"version": "3.10.6"
|
| 805 |
+
},
|
| 806 |
+
"vscode": {
|
| 807 |
+
"interpreter": {
|
| 808 |
+
"hash": "909e94fa6c232d7c724ea0272d1d960c187d26acecb731545632ac2dfd18735f"
|
| 809 |
+
}
|
| 810 |
+
}
|
| 811 |
+
},
|
| 812 |
+
"nbformat": 4,
|
| 813 |
+
"nbformat_minor": 4
|
| 814 |
+
}
|
notebookcf133ce21c.ipynb
ADDED
|
@@ -0,0 +1,804 @@
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "code",
|
| 5 |
+
"execution_count": 2,
|
| 6 |
+
"metadata": {},
|
| 7 |
+
"outputs": [
|
| 8 |
+
{
|
| 9 |
+
"name": "stdout",
|
| 10 |
+
"output_type": "stream",
|
| 11 |
+
"text": [
|
| 12 |
+
"Sat Mar 4 21:14:41 2023 \n",
|
| 13 |
+
"+---------------------------------------------------------------------------------------+\n",
|
| 14 |
+
"| NVIDIA-SMI 531.18 Driver Version: 531.18 CUDA Version: 12.1 |\n",
|
| 15 |
+
"|-----------------------------------------+----------------------+----------------------+\n",
|
| 16 |
+
"| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |\n",
|
| 17 |
+
"| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n",
|
| 18 |
+
"| | | MIG M. |\n",
|
| 19 |
+
"|=========================================+======================+======================|\n",
|
| 20 |
+
"| 0 NVIDIA GeForce GTX 1080 Ti WDDM | 00000000:B3:00.0 On | N/A |\n",
|
| 21 |
+
"|100% 42C P0 68W / 127W| 1980MiB / 11264MiB | 3% Default |\n",
|
| 22 |
+
"| | | N/A |\n",
|
| 23 |
+
"+-----------------------------------------+----------------------+----------------------+\n",
|
| 24 |
+
" \n",
|
| 25 |
+
"+---------------------------------------------------------------------------------------+\n",
|
| 26 |
+
"| Processes: |\n",
|
| 27 |
+
"| GPU GI CI PID Type Process name GPU Memory |\n",
|
| 28 |
+
"| ID ID Usage |\n",
|
| 29 |
+
"|=======================================================================================|\n",
|
| 30 |
+
"| 0 N/A N/A 1148 C+G ... (x86)\\Audeze\\AudezeHQ\\AudezeHQ.exe N/A |\n",
|
| 31 |
+
"| 0 N/A N/A 2232 C+G ...GeForce Experience\\NVIDIA Share.exe N/A |\n",
|
| 32 |
+
"| 0 N/A N/A 6208 C+G ..._x64__rz1tebttyb220\\DolbyAccess.exe N/A |\n",
|
| 33 |
+
"| 0 N/A N/A 9096 C+G ...CBS_cw5n1h2txyewy\\TextInputHost.exe N/A |\n",
|
| 34 |
+
"| 0 N/A N/A 9832 C+G ...63.0_x86__zpdnekdrzrea0\\Spotify.exe N/A |\n",
|
| 35 |
+
"| 0 N/A N/A 10856 C+G ....0_x64__8wekyb3d8bbwe\\HxOutlook.exe N/A |\n",
|
| 36 |
+
"| 0 N/A N/A 11512 C+G ...2txyewy\\StartMenuExperienceHost.exe N/A |\n",
|
| 37 |
+
"| 0 N/A N/A 11596 C+G ...GeForce Experience\\NVIDIA Share.exe N/A |\n",
|
| 38 |
+
"| 0 N/A N/A 12780 C+G ...rPicker\\PowerToys.ColorPickerUI.exe N/A |\n",
|
| 39 |
+
"| 0 N/A N/A 14676 C+G ...on\\110.0.1587.57\\msedgewebview2.exe N/A |\n",
|
| 40 |
+
"| 0 N/A N/A 14900 C+G C:\\Windows\\explorer.exe N/A |\n",
|
| 41 |
+
"| 0 N/A N/A 16116 C+G ...FancyZones\\PowerToys.FancyZones.exe N/A |\n",
|
| 42 |
+
"| 0 N/A N/A 17548 C+G ...5n1h2txyewy\\ShellExperienceHost.exe N/A |\n",
|
| 43 |
+
"| 0 N/A N/A 17848 C ...al\\Discord\\app-1.0.9011\\Discord.exe N/A |\n",
|
| 44 |
+
"| 0 N/A N/A 18064 C+G ...\\cef\\cef.win7x64\\steamwebhelper.exe N/A |\n",
|
| 45 |
+
"| 0 N/A N/A 20132 C+G ...crosoft\\Edge\\Application\\msedge.exe N/A |\n",
|
| 46 |
+
"| 0 N/A N/A 20864 C+G ...t.LockApp_cw5n1h2txyewy\\LockApp.exe N/A |\n",
|
| 47 |
+
"| 0 N/A N/A 20928 C+G ...B\\system_tray\\lghub_system_tray.exe N/A |\n",
|
| 48 |
+
"| 0 N/A N/A 22896 C+G ...Cloudflare WARP\\Cloudflare WARP.exe N/A |\n",
|
| 49 |
+
"| 0 N/A N/A 23784 C+G ...__8wekyb3d8bbwe\\WindowsTerminal.exe N/A |\n",
|
| 50 |
+
"| 0 N/A N/A 24416 C+G ...cal\\Microsoft\\OneDrive\\OneDrive.exe N/A |\n",
|
| 51 |
+
"| 0 N/A N/A 27532 C+G ...auncher\\PowerToys.PowerLauncher.exe N/A |\n",
|
| 52 |
+
"| 0 N/A N/A 28696 C+G ...siveControlPanel\\SystemSettings.exe N/A |\n",
|
| 53 |
+
"| 0 N/A N/A 29184 C+G ...ekyb3d8bbwe\\PhoneExperienceHost.exe N/A |\n",
|
| 54 |
+
"| 0 N/A N/A 32684 C+G ...nt.CBS_cw5n1h2txyewy\\SearchHost.exe N/A |\n",
|
| 55 |
+
"| 0 N/A N/A 34624 C+G C:\\Program Files\\LGHUB\\lghub.exe N/A |\n",
|
| 56 |
+
"| 0 N/A N/A 34692 C+G ...pdnekdrzrea0\\XboxGameBarSpotify.exe N/A |\n",
|
| 57 |
+
"| 0 N/A N/A 37692 C+G ...4.0_x64__cv1g1gvanyjgm\\WhatsApp.exe N/A |\n",
|
| 58 |
+
"+---------------------------------------------------------------------------------------+\n"
|
| 59 |
+
]
|
| 60 |
+
}
|
| 61 |
+
],
|
| 62 |
+
"source": [
|
| 63 |
+
"!nvidia-smi"
|
| 64 |
+
]
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"cell_type": "code",
|
| 68 |
+
"execution_count": null,
|
| 69 |
+
"metadata": {},
|
| 70 |
+
"outputs": [],
|
| 71 |
+
"source": [
|
| 72 |
+
"import os\n",
|
| 73 |
+
"HOME = os.getcwd()\n",
|
| 74 |
+
"print(HOME)"
|
| 75 |
+
]
|
| 76 |
+
},
|
| 77 |
+
{
|
| 78 |
+
"cell_type": "code",
|
| 79 |
+
"execution_count": null,
|
| 80 |
+
"metadata": {},
|
| 81 |
+
"outputs": [],
|
| 82 |
+
"source": [
|
| 83 |
+
"\n",
|
| 84 |
+
"from IPython import display\n",
|
| 85 |
+
"display.clear_output()\n",
|
| 86 |
+
"from ultralytics import YOLO\n",
|
| 87 |
+
"ultralytics.checks()"
|
| 88 |
+
]
|
| 89 |
+
},
|
| 90 |
+
{
|
| 91 |
+
"cell_type": "code",
|
| 92 |
+
"execution_count": 1,
|
| 93 |
+
"metadata": {},
|
| 94 |
+
"outputs": [],
|
| 95 |
+
"source": [
|
| 96 |
+
"!pip install roboflow\n",
|
| 97 |
+
"\n"
|
| 98 |
+
]
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"cell_type": "code",
|
| 102 |
+
"execution_count": 2,
|
| 103 |
+
"metadata": {},
|
| 104 |
+
"outputs": [
|
| 105 |
+
{
|
| 106 |
+
"ename": "ModuleNotFoundError",
|
| 107 |
+
"evalue": "No module named 'roboflow'",
|
| 108 |
+
"output_type": "error",
|
| 109 |
+
"traceback": [
|
| 110 |
+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
|
| 111 |
+
"\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
|
| 112 |
+
"Cell \u001b[1;32mIn[2], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mroboflow\u001b[39;00m \u001b[39mimport\u001b[39;00m Roboflow\n\u001b[0;32m 2\u001b[0m rf \u001b[39m=\u001b[39m Roboflow(api_key\u001b[39m=\u001b[39m\u001b[39m\"\u001b[39m\u001b[39m2NdQm1ivtFCAYiOLVTwn\u001b[39m\u001b[39m\"\u001b[39m)\n\u001b[0;32m 3\u001b[0m project \u001b[39m=\u001b[39m rf\u001b[39m.\u001b[39mworkspace(\u001b[39m\"\u001b[39m\u001b[39mhackthethong\u001b[39m\u001b[39m\"\u001b[39m)\u001b[39m.\u001b[39mproject(\u001b[39m\"\u001b[39m\u001b[39mpothole-detection-gmnid\u001b[39m\u001b[39m\"\u001b[39m)\n",
|
| 113 |
+
"\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'roboflow'"
|
| 114 |
+
]
|
| 115 |
+
}
|
| 116 |
+
],
|
| 117 |
+
"source": [
|
| 118 |
+
"from roboflow import Roboflow\n",
|
| 119 |
+
"rf = Roboflow(api_key=\"2NdQm1ivtFCAYiOLVTwn\")\n",
|
| 120 |
+
"project = rf.workspace(\"hackthethong\").project(\"pothole-detection-gmnid\")\n",
|
| 121 |
+
"dataset = project.version(3).download(\"yolov8\")"
|
| 122 |
+
]
|
| 123 |
+
},
|
| 124 |
+
{
|
| 125 |
+
"cell_type": "code",
|
| 126 |
+
"execution_count": 1,
|
| 127 |
+
"metadata": {
|
| 128 |
+
"_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19",
|
| 129 |
+
"_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5",
|
| 130 |
+
"execution": {
|
| 131 |
+
"iopub.execute_input": "2023-03-04T11:06:34.982368Z",
|
| 132 |
+
"iopub.status.busy": "2023-03-04T11:06:34.982065Z",
|
| 133 |
+
"iopub.status.idle": "2023-03-04T11:06:36.155978Z",
|
| 134 |
+
"shell.execute_reply": "2023-03-04T11:06:36.154454Z",
|
| 135 |
+
"shell.execute_reply.started": "2023-03-04T11:06:34.982341Z"
|
| 136 |
+
}
|
| 137 |
+
},
|
| 138 |
+
"outputs": [
|
| 139 |
+
{
|
| 140 |
+
"name": "stdout",
|
| 141 |
+
"output_type": "stream",
|
| 142 |
+
"text": [
|
| 143 |
+
"Sat Mar 4 11:06:35 2023 \n",
|
| 144 |
+
"+-----------------------------------------------------------------------------+\n",
|
| 145 |
+
"| NVIDIA-SMI 470.82.01 Driver Version: 470.82.01 CUDA Version: 11.4 |\n",
|
| 146 |
+
"|-------------------------------+----------------------+----------------------+\n",
|
| 147 |
+
"| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n",
|
| 148 |
+
"| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n",
|
| 149 |
+
"| | | MIG M. |\n",
|
| 150 |
+
"|===============================+======================+======================|\n",
|
| 151 |
+
"| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n",
|
| 152 |
+
"| N/A 36C P8 9W / 70W | 0MiB / 15109MiB | 0% Default |\n",
|
| 153 |
+
"| | | N/A |\n",
|
| 154 |
+
"+-------------------------------+----------------------+----------------------+\n",
|
| 155 |
+
"| 1 Tesla T4 Off | 00000000:00:05.0 Off | 0 |\n",
|
| 156 |
+
"| N/A 47C P8 10W / 70W | 0MiB / 15109MiB | 0% Default |\n",
|
| 157 |
+
"| | | N/A |\n",
|
| 158 |
+
"+-------------------------------+----------------------+----------------------+\n",
|
| 159 |
+
" \n",
|
| 160 |
+
"+-----------------------------------------------------------------------------+\n",
|
| 161 |
+
"| Processes: |\n",
|
| 162 |
+
"| GPU GI CI PID Type Process name GPU Memory |\n",
|
| 163 |
+
"| ID ID Usage |\n",
|
| 164 |
+
"|=============================================================================|\n",
|
| 165 |
+
"| No running processes found |\n",
|
| 166 |
+
"+-----------------------------------------------------------------------------+\n"
|
| 167 |
+
]
|
| 168 |
+
}
|
| 169 |
+
],
|
| 170 |
+
"source": [
|
| 171 |
+
"!nvidia-smi"
|
| 172 |
+
]
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"cell_type": "code",
|
| 176 |
+
"execution_count": 2,
|
| 177 |
+
"metadata": {
|
| 178 |
+
"execution": {
|
| 179 |
+
"iopub.execute_input": "2023-03-04T11:06:36.165528Z",
|
| 180 |
+
"iopub.status.busy": "2023-03-04T11:06:36.162799Z",
|
| 181 |
+
"iopub.status.idle": "2023-03-04T11:06:36.175759Z",
|
| 182 |
+
"shell.execute_reply": "2023-03-04T11:06:36.174308Z",
|
| 183 |
+
"shell.execute_reply.started": "2023-03-04T11:06:36.165476Z"
|
| 184 |
+
}
|
| 185 |
+
},
|
| 186 |
+
"outputs": [
|
| 187 |
+
{
|
| 188 |
+
"name": "stdout",
|
| 189 |
+
"output_type": "stream",
|
| 190 |
+
"text": [
|
| 191 |
+
"/kaggle/working\n"
|
| 192 |
+
]
|
| 193 |
+
}
|
| 194 |
+
],
|
| 195 |
+
"source": [
|
| 196 |
+
"import os\n",
|
| 197 |
+
"HOME = os.getcwd()\n",
|
| 198 |
+
"print(HOME)"
|
| 199 |
+
]
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"cell_type": "code",
|
| 203 |
+
"execution_count": 3,
|
| 204 |
+
"metadata": {
|
| 205 |
+
"execution": {
|
| 206 |
+
"iopub.execute_input": "2023-03-04T11:06:36.180607Z",
|
| 207 |
+
"iopub.status.busy": "2023-03-04T11:06:36.179797Z",
|
| 208 |
+
"iopub.status.idle": "2023-03-04T11:06:55.605740Z",
|
| 209 |
+
"shell.execute_reply": "2023-03-04T11:06:55.604691Z",
|
| 210 |
+
"shell.execute_reply.started": "2023-03-04T11:06:36.180564Z"
|
| 211 |
+
}
|
| 212 |
+
},
|
| 213 |
+
"outputs": [
|
| 214 |
+
{
|
| 215 |
+
"name": "stderr",
|
| 216 |
+
"output_type": "stream",
|
| 217 |
+
"text": [
|
| 218 |
+
"Ultralytics YOLOv8.0.20 🚀 Python-3.7.12 torch-1.13.0 CUDA:0 (Tesla T4, 15110MiB)\n",
|
| 219 |
+
"Setup complete ✅ (2 CPUs, 15.6 GB RAM, 4437.1/8062.4 GB disk)\n"
|
| 220 |
+
]
|
| 221 |
+
}
|
| 222 |
+
],
|
| 223 |
+
"source": [
|
| 224 |
+
"# Pip install method (recommended)\n",
|
| 225 |
+
"\n",
|
| 226 |
+
"!pip install ultralytics==8.0.20\n",
|
| 227 |
+
"\n",
|
| 228 |
+
"from IPython import display\n",
|
| 229 |
+
"display.clear_output()\n",
|
| 230 |
+
"\n",
|
| 231 |
+
"import ultralytics\n",
|
| 232 |
+
"ultralytics.checks()"
|
| 233 |
+
]
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"cell_type": "code",
|
| 237 |
+
"execution_count": 4,
|
| 238 |
+
"metadata": {
|
| 239 |
+
"execution": {
|
| 240 |
+
"iopub.execute_input": "2023-03-04T11:06:55.608863Z",
|
| 241 |
+
"iopub.status.busy": "2023-03-04T11:06:55.608358Z",
|
| 242 |
+
"iopub.status.idle": "2023-03-04T11:06:55.615639Z",
|
| 243 |
+
"shell.execute_reply": "2023-03-04T11:06:55.613293Z",
|
| 244 |
+
"shell.execute_reply.started": "2023-03-04T11:06:55.608820Z"
|
| 245 |
+
}
|
| 246 |
+
},
|
| 247 |
+
"outputs": [],
|
| 248 |
+
"source": [
|
| 249 |
+
"from ultralytics import YOLO\n",
|
| 250 |
+
"\n",
|
| 251 |
+
"from IPython.display import display, Image"
|
| 252 |
+
]
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"cell_type": "code",
|
| 256 |
+
"execution_count": null,
|
| 257 |
+
"metadata": {
|
| 258 |
+
"execution": {
|
| 259 |
+
"iopub.execute_input": "2023-03-04T11:06:55.618151Z",
|
| 260 |
+
"iopub.status.busy": "2023-03-04T11:06:55.617309Z",
|
| 261 |
+
"iopub.status.idle": "2023-03-04T11:07:53.787811Z"
|
| 262 |
+
}
|
| 263 |
+
},
|
| 264 |
+
"outputs": [
|
| 265 |
+
{
|
| 266 |
+
"name": "stdout",
|
| 267 |
+
"output_type": "stream",
|
| 268 |
+
"text": [
|
| 269 |
+
"/kaggle/working/datasets\n",
|
| 270 |
+
"Collecting roboflow\n",
|
| 271 |
+
" Downloading roboflow-0.2.32-py3-none-any.whl (50 kB)\n",
|
| 272 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.2/50.2 kB\u001b[0m \u001b[31m2.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 273 |
+
"\u001b[?25hRequirement already satisfied: opencv-python>=4.1.2 in /opt/conda/lib/python3.7/site-packages (from roboflow) (4.7.0.72)\n",
|
| 274 |
+
"Collecting wget\n",
|
| 275 |
+
" Downloading wget-3.2.zip (10 kB)\n",
|
| 276 |
+
" Preparing metadata (setup.py) ... \u001b[?25ldone\n",
|
| 277 |
+
"\u001b[?25hRequirement already satisfied: urllib3>=1.26.6 in /opt/conda/lib/python3.7/site-packages (from roboflow) (1.26.14)\n",
|
| 278 |
+
"Requirement already satisfied: python-dotenv in /opt/conda/lib/python3.7/site-packages (from roboflow) (0.21.1)\n",
|
| 279 |
+
"Requirement already satisfied: Pillow>=7.1.2 in /opt/conda/lib/python3.7/site-packages (from roboflow) (9.4.0)\n",
|
| 280 |
+
"Collecting chardet==4.0.0\n",
|
| 281 |
+
" Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)\n",
|
| 282 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m178.7/178.7 kB\u001b[0m \u001b[31m8.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 283 |
+
"\u001b[?25hRequirement already satisfied: tqdm>=4.41.0 in /opt/conda/lib/python3.7/site-packages (from roboflow) (4.64.1)\n",
|
| 284 |
+
"Collecting idna==2.10\n",
|
| 285 |
+
" Downloading idna-2.10-py2.py3-none-any.whl (58 kB)\n",
|
| 286 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.8/58.8 kB\u001b[0m \u001b[31m6.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 287 |
+
"\u001b[?25hRequirement already satisfied: matplotlib in /opt/conda/lib/python3.7/site-packages (from roboflow) (3.5.3)\n",
|
| 288 |
+
"Collecting cycler==0.10.0\n",
|
| 289 |
+
" Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)\n",
|
| 290 |
+
"Collecting requests-toolbelt\n",
|
| 291 |
+
" Downloading requests_toolbelt-0.10.1-py2.py3-none-any.whl (54 kB)\n",
|
| 292 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.5/54.5 kB\u001b[0m \u001b[31m6.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 293 |
+
"\u001b[?25hRequirement already satisfied: python-dateutil in /opt/conda/lib/python3.7/site-packages (from roboflow) (2.8.2)\n",
|
| 294 |
+
"Requirement already satisfied: certifi==2022.12.7 in /opt/conda/lib/python3.7/site-packages (from roboflow) (2022.12.7)\n",
|
| 295 |
+
"Requirement already satisfied: numpy>=1.18.5 in /opt/conda/lib/python3.7/site-packages (from roboflow) (1.21.6)\n",
|
| 296 |
+
"Requirement already satisfied: PyYAML>=5.3.1 in /opt/conda/lib/python3.7/site-packages (from roboflow) (6.0)\n",
|
| 297 |
+
"Requirement already satisfied: requests in /opt/conda/lib/python3.7/site-packages (from roboflow) (2.28.2)\n",
|
| 298 |
+
"Requirement already satisfied: six in /opt/conda/lib/python3.7/site-packages (from roboflow) (1.16.0)\n",
|
| 299 |
+
"Collecting pyparsing==2.4.7\n",
|
| 300 |
+
" Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)\n",
|
| 301 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.8/67.8 kB\u001b[0m \u001b[31m8.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
| 302 |
+
"\u001b[?25hRequirement already satisfied: kiwisolver>=1.3.1 in /opt/conda/lib/python3.7/site-packages (from roboflow) (1.4.4)\n",
|
| 303 |
+
"Requirement already satisfied: typing-extensions in /opt/conda/lib/python3.7/site-packages (from kiwisolver>=1.3.1->roboflow) (4.4.0)\n",
|
| 304 |
+
"Requirement already satisfied: fonttools>=4.22.0 in /opt/conda/lib/python3.7/site-packages (from matplotlib->roboflow) (4.38.0)\n",
|
| 305 |
+
"Requirement already satisfied: packaging>=20.0 in /opt/conda/lib/python3.7/site-packages (from matplotlib->roboflow) (23.0)\n",
|
| 306 |
+
"Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.7/site-packages (from requests->roboflow) (2.1.1)\n",
|
| 307 |
+
"Building wheels for collected packages: wget\n",
|
| 308 |
+
" Building wheel for wget (setup.py) ... \u001b[?25ldone\n",
|
| 309 |
+
"\u001b[?25h Created wheel for wget: filename=wget-3.2-py3-none-any.whl size=9674 sha256=c21353920025ab2a7acd6c41f94a830e3de43131a8eb128b751e9613559978c7\n",
|
| 310 |
+
" Stored in directory: /root/.cache/pip/wheels/e1/e8/db/ebe4dcd7d7d11208c1e4e4ef246cea4fcc8d463c93405a6555\n",
|
| 311 |
+
"Successfully built wget\n",
|
| 312 |
+
"Installing collected packages: wget, pyparsing, idna, cycler, chardet, requests-toolbelt, roboflow\n",
|
| 313 |
+
" Attempting uninstall: pyparsing\n",
|
| 314 |
+
" Found existing installation: pyparsing 3.0.9\n",
|
| 315 |
+
" Uninstalling pyparsing-3.0.9:\n",
|
| 316 |
+
" Successfully uninstalled pyparsing-3.0.9\n",
|
| 317 |
+
" Attempting uninstall: idna\n",
|
| 318 |
+
" Found existing installation: idna 3.4\n",
|
| 319 |
+
" Uninstalling idna-3.4:\n",
|
| 320 |
+
" Successfully uninstalled idna-3.4\n",
|
| 321 |
+
" Attempting uninstall: cycler\n",
|
| 322 |
+
" Found existing installation: cycler 0.11.0\n",
|
| 323 |
+
" Uninstalling cycler-0.11.0:\n",
|
| 324 |
+
" Successfully uninstalled cycler-0.11.0\n",
|
| 325 |
+
"\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
|
| 326 |
+
"librosa 0.10.0 requires soundfile>=0.12.1, but you have soundfile 0.11.0 which is incompatible.\n",
|
| 327 |
+
"cloud-tpu-client 0.10 requires google-api-python-client==1.8.0, but you have google-api-python-client 2.79.0 which is incompatible.\n",
|
| 328 |
+
"apache-beam 2.44.0 requires dill<0.3.2,>=0.3.1.1, but you have dill 0.3.6 which is incompatible.\u001b[0m\u001b[31m\n",
|
| 329 |
+
"\u001b[0mSuccessfully installed chardet-4.0.0 cycler-0.10.0 idna-2.10 pyparsing-2.4.7 requests-toolbelt-0.10.1 roboflow-0.2.32 wget-3.2\n",
|
| 330 |
+
"\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n",
|
| 331 |
+
"loading Roboflow workspace...\n",
|
| 332 |
+
"loading Roboflow project...\n",
|
| 333 |
+
"Downloading Dataset Version Zip in Pothole-detection-1 to yolov8: 97% [254164992 / 260273386] bytes"
|
| 334 |
+
]
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"name": "stderr",
|
| 338 |
+
"output_type": "stream",
|
| 339 |
+
"text": [
|
| 340 |
+
"IOPub message rate exceeded.\n",
|
| 341 |
+
"The notebook server will temporarily stop sending output\n",
|
| 342 |
+
"to the client in order to avoid crashing it.\n",
|
| 343 |
+
"To change this limit, set the config variable\n",
|
| 344 |
+
"`--NotebookApp.iopub_msg_rate_limit`.\n",
|
| 345 |
+
"\n",
|
| 346 |
+
"Current values:\n",
|
| 347 |
+
"NotebookApp.iopub_msg_rate_limit=1000.0 (msgs/sec)\n",
|
| 348 |
+
"NotebookApp.rate_limit_window=3.0 (secs)\n",
|
| 349 |
+
"\n"
|
| 350 |
+
]
|
| 351 |
+
}
|
| 352 |
+
],
|
| 353 |
+
"source": [
|
| 354 |
+
"!mkdir {HOME}/datasets\n",
|
| 355 |
+
"%cd {HOME}/datasets\n",
|
| 356 |
+
"\n",
|
| 357 |
+
"!pip install roboflow\n",
|
| 358 |
+
"\n",
|
| 359 |
+
"from roboflow import Roboflow\n",
|
| 360 |
+
"rf = Roboflow(api_key=\"2NdQm1ivtFCAYiOLVTwn\")\n",
|
| 361 |
+
"project = rf.workspace(\"hackthethong\").project(\"pothole-detection-gmnid\")\n",
|
| 362 |
+
"dataset = project.version(1).download(\"yolov8\")"
|
| 363 |
+
]
|
| 364 |
+
},
|
| 365 |
+
{
|
| 366 |
+
"cell_type": "code",
|
| 367 |
+
"execution_count": 11,
|
| 368 |
+
"metadata": {
|
| 369 |
+
"execution": {
|
| 370 |
+
"iopub.execute_input": "2023-03-04T11:16:50.287812Z",
|
| 371 |
+
"iopub.status.busy": "2023-03-04T11:16:50.287079Z",
|
| 372 |
+
"iopub.status.idle": "2023-03-04T12:12:27.477858Z",
|
| 373 |
+
"shell.execute_reply": "2023-03-04T12:12:27.476221Z",
|
| 374 |
+
"shell.execute_reply.started": "2023-03-04T11:16:50.287774Z"
|
| 375 |
+
}
|
| 376 |
+
},
|
| 377 |
+
"outputs": [
|
| 378 |
+
{
|
| 379 |
+
"name": "stdout",
|
| 380 |
+
"output_type": "stream",
|
| 381 |
+
"text": [
|
| 382 |
+
"/kaggle/working\n",
|
| 383 |
+
"Ultralytics YOLOv8.0.20 🚀 Python-3.7.12 torch-1.13.0 CUDA:0 (Tesla T4, 15110MiB)\n",
|
| 384 |
+
" CUDA:1 (Tesla T4, 15110MiB)\n",
|
| 385 |
+
"\u001b[34m\u001b[1myolo/engine/trainer: \u001b[0mtask=detect, mode=train, model=yolov8s.yaml, data=/kaggle/working/datasets/Pothole-detection-1/data.yaml, epochs=215, patience=50, batch=24, imgsz=800, save=True, cache=False, device=(0, 1), workers=8, project=None, name=None, exist_ok=False, pretrained=False, optimizer=SGD, verbose=True, seed=0, deterministic=True, single_cls=False, image_weights=False, rect=False, cos_lr=False, close_mosaic=10, resume=False, overlap_mask=True, mask_ratio=4, dropout=False, val=True, save_json=False, save_hybrid=False, conf=0.001, iou=0.7, max_det=300, half=False, dnn=False, plots=True, source=ultralytics/assets/, show=False, save_txt=False, save_conf=False, save_crop=False, hide_labels=False, hide_conf=False, vid_stride=1, line_thickness=3, visualize=False, augment=False, agnostic_nms=False, classes=None, retina_masks=False, boxes=True, format=torchscript, keras=False, optimize=False, int8=False, dynamic=False, simplify=False, opset=17, workspace=4, nms=False, lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.001, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=7.5, cls=0.5, dfl=1.5, fl_gamma=0.0, label_smoothing=0.0, nbs=64, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0, cfg=None, v5loader=False, save_dir=runs/detect/train3\n",
|
| 386 |
+
"Overriding model.yaml nc=80 with nc=1\n",
|
| 387 |
+
"\n",
|
| 388 |
+
" from n params module arguments \n",
|
| 389 |
+
" 0 -1 1 928 ultralytics.nn.modules.Conv [3, 32, 3, 2] \n",
|
| 390 |
+
" 1 -1 1 18560 ultralytics.nn.modules.Conv [32, 64, 3, 2] \n",
|
| 391 |
+
" 2 -1 1 29056 ultralytics.nn.modules.C2f [64, 64, 1, True] \n",
|
| 392 |
+
" 3 -1 1 73984 ultralytics.nn.modules.Conv [64, 128, 3, 2] \n",
|
| 393 |
+
" 4 -1 2 197632 ultralytics.nn.modules.C2f [128, 128, 2, True] \n",
|
| 394 |
+
" 5 -1 1 295424 ultralytics.nn.modules.Conv [128, 256, 3, 2] \n",
|
| 395 |
+
" 6 -1 2 788480 ultralytics.nn.modules.C2f [256, 256, 2, True] \n",
|
| 396 |
+
" 7 -1 1 1180672 ultralytics.nn.modules.Conv [256, 512, 3, 2] \n",
|
| 397 |
+
" 8 -1 1 1838080 ultralytics.nn.modules.C2f [512, 512, 1, True] \n",
|
| 398 |
+
" 9 -1 1 656896 ultralytics.nn.modules.SPPF [512, 512, 5] \n",
|
| 399 |
+
" 10 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
| 400 |
+
" 11 [-1, 6] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 401 |
+
" 12 -1 1 591360 ultralytics.nn.modules.C2f [768, 256, 1] \n",
|
| 402 |
+
" 13 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
| 403 |
+
" 14 [-1, 4] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 404 |
+
" 15 -1 1 148224 ultralytics.nn.modules.C2f [384, 128, 1] \n",
|
| 405 |
+
" 16 -1 1 147712 ultralytics.nn.modules.Conv [128, 128, 3, 2] \n",
|
| 406 |
+
" 17 [-1, 12] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 407 |
+
" 18 -1 1 493056 ultralytics.nn.modules.C2f [384, 256, 1] \n",
|
| 408 |
+
" 19 -1 1 590336 ultralytics.nn.modules.Conv [256, 256, 3, 2] \n",
|
| 409 |
+
" 20 [-1, 9] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 410 |
+
" 21 -1 1 1969152 ultralytics.nn.modules.C2f [768, 512, 1] \n",
|
| 411 |
+
" 22 [15, 18, 21] 1 2116435 ultralytics.nn.modules.Detect [1, [128, 256, 512]] \n",
|
| 412 |
+
"Model summary: 225 layers, 11135987 parameters, 11135971 gradients, 28.6 GFLOPs\n",
|
| 413 |
+
"\n",
|
| 414 |
+
"Transferred 349/355 items from pretrained weights\n",
|
| 415 |
+
"DDP settings: RANK 0, WORLD_SIZE 2, DEVICE cuda:0\n",
|
| 416 |
+
"Overriding model.yaml nc=80 with nc=1\n",
|
| 417 |
+
"\n",
|
| 418 |
+
" from n params module arguments \n",
|
| 419 |
+
" 0 -1 1 928 ultralytics.nn.modules.Conv [3, 32, 3, 2] \n",
|
| 420 |
+
" 1 -1 1 18560 ultralytics.nn.modules.Conv [32, 64, 3, 2] \n",
|
| 421 |
+
" 2 -1 1 29056 ultralytics.nn.modules.C2f [64, 64, 1, True] \n",
|
| 422 |
+
" 3 -1 1 73984 ultralytics.nn.modules.Conv [64, 128, 3, 2] \n",
|
| 423 |
+
" 4 -1 2 197632 ultralytics.nn.modules.C2f [128, 128, 2, True] \n",
|
| 424 |
+
" 5 -1 1 295424 ultralytics.nn.modules.Conv [128, 256, 3, 2] \n",
|
| 425 |
+
" 6 -1 2 788480 ultralytics.nn.modules.C2f [256, 256, 2, True] \n",
|
| 426 |
+
" 7 -1 1 1180672 ultralytics.nn.modules.Conv [256, 512, 3, 2] \n",
|
| 427 |
+
" 8 -1 1 1838080 ultralytics.nn.modules.C2f [512, 512, 1, True] \n",
|
| 428 |
+
" 9 -1 1 656896 ultralytics.nn.modules.SPPF [512, 512, 5] \n",
|
| 429 |
+
" 10 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
| 430 |
+
" 11 [-1, 6] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 431 |
+
" 12 -1 1 591360 ultralytics.nn.modules.C2f [768, 256, 1] \n",
|
| 432 |
+
" 13 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
|
| 433 |
+
" 14 [-1, 4] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 434 |
+
" 15 -1 1 148224 ultralytics.nn.modules.C2f [384, 128, 1] \n",
|
| 435 |
+
" 16 -1 1 147712 ultralytics.nn.modules.Conv [128, 128, 3, 2] \n",
|
| 436 |
+
" 17 [-1, 12] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 437 |
+
" 18 -1 1 493056 ultralytics.nn.modules.C2f [384, 256, 1] \n",
|
| 438 |
+
" 19 -1 1 590336 ultralytics.nn.modules.Conv [256, 256, 3, 2] \n",
|
| 439 |
+
" 20 [-1, 9] 1 0 ultralytics.nn.modules.Concat [1] \n",
|
| 440 |
+
" 21 -1 1 1969152 ultralytics.nn.modules.C2f [768, 512, 1] \n",
|
| 441 |
+
" 22 [15, 18, 21] 1 2116435 ultralytics.nn.modules.Detect [1, [128, 256, 512]] \n",
|
| 442 |
+
"YOLOv8s summary: 225 layers, 11135987 parameters, 11135971 gradients, 28.6 GFLOPs\n",
|
| 443 |
+
"\n",
|
| 444 |
+
"\u001b[34m\u001b[1moptimizer:\u001b[0m SGD(lr=0.01) with parameter groups 57 weight(decay=0.0), 64 weight(decay=0.0011250000000000001), 63 bias\n",
|
| 445 |
+
"\u001b[34m\u001b[1mtrain: \u001b[0mScanning /kaggle/working/datasets/Pothole-detection-1/train/labels.cache.\u001b[0m\n",
|
| 446 |
+
"\u001b[34m\u001b[1malbumentations: \u001b[0mBlur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01), CLAHE(p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))\n",
|
| 447 |
+
"\u001b[34m\u001b[1mval: \u001b[0mScanning /kaggle/working/datasets/Pothole-detection-1/valid/labels.cache...\u001b[0m\n",
|
| 448 |
+
"Image sizes 800 train, 800 val\n",
|
| 449 |
+
"Using 2 dataloader workers\n",
|
| 450 |
+
"Logging results to \u001b[1mruns/detect/train3\u001b[0m\n",
|
| 451 |
+
"Starting training for 215 epochs...\n",
|
| 452 |
+
"\n",
|
| 453 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 454 |
+
" 1/215 5.86G 3.481 4.528 4.09 7 800: 1\n",
|
| 455 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 456 |
+
" all 357 941 0.000902 0.0967 0.000495 0.000148\n",
|
| 457 |
+
"\n",
|
| 458 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 459 |
+
" 2/215 6.96G 3.266 3.481 3.476 2 800: 1\n",
|
| 460 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 461 |
+
" all 357 941 0.000937 0.0786 0.000536 0.000168\n",
|
| 462 |
+
"\n",
|
| 463 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 464 |
+
" 3/215 6.96G 2.43 2.349 2.433 7 800: 1\n",
|
| 465 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 466 |
+
" all 357 941 0.00105 0.00213 0.00035 0.000101\n",
|
| 467 |
+
"\n",
|
| 468 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 469 |
+
" 4/215 6.96G 1.867 1.71 1.77 8 800: 1\n",
|
| 470 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 471 |
+
" all 357 941 0.00488 0.0117 0.0025 0.00104\n",
|
| 472 |
+
"\n",
|
| 473 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 474 |
+
" 5/215 6.96G 1.549 1.331 1.48 3 800: 1\n",
|
| 475 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 476 |
+
" all 357 941 0.023 0.0266 0.00589 0.0015\n",
|
| 477 |
+
"\n",
|
| 478 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 479 |
+
" 6/215 6.96G 1.341 1.113 1.34 17 800: 1\n",
|
| 480 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 481 |
+
" all 357 941 0.00154 0.00531 0.000551 0.000166\n",
|
| 482 |
+
"\n",
|
| 483 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 484 |
+
" 7/215 6.96G 1.187 0.9461 1.234 14 800: 1\n",
|
| 485 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 486 |
+
" all 357 941 0.00854 0.0298 0.00488 0.00147\n",
|
| 487 |
+
"\n",
|
| 488 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 489 |
+
" 8/215 6.96G 1.08 0.8943 1.175 8 800: 1\n",
|
| 490 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 491 |
+
" all 357 941 0.0174 0.0765 0.0116 0.00329\n",
|
| 492 |
+
"\n",
|
| 493 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 494 |
+
" 9/215 6.96G 1.012 0.8116 1.133 5 800: 1\n",
|
| 495 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 496 |
+
" all 357 941 0.0058 0.0085 0.00295 0.00103\n",
|
| 497 |
+
"\n",
|
| 498 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 499 |
+
" 10/215 6.96G 0.9529 0.756 1.114 6 800: 1\n",
|
| 500 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 501 |
+
" all 357 941 0.0551 0.0351 0.0156 0.00493\n",
|
| 502 |
+
"\n",
|
| 503 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 504 |
+
" 11/215 6.96G 0.8946 0.7085 1.069 3 800: 1\n",
|
| 505 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 506 |
+
" all 357 941 0.00808 0.051 0.00986 0.00449\n",
|
| 507 |
+
"\n",
|
| 508 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 509 |
+
" 12/215 6.96G 0.8897 0.7045 1.057 4 800: 1\n",
|
| 510 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 511 |
+
" all 357 941 0.0929 0.0244 0.0159 0.00461\n",
|
| 512 |
+
"\n",
|
| 513 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 514 |
+
" 13/215 6.96G 0.8399 0.6641 1.048 5 800: 1\n",
|
| 515 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 516 |
+
" all 357 941 0.0321 0.0893 0.0204 0.00543\n",
|
| 517 |
+
"\n",
|
| 518 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 519 |
+
" 14/215 6.96G 0.8033 0.6374 1.02 10 800: 1\n",
|
| 520 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 521 |
+
" all 357 941 0.0161 0.0298 0.00856 0.003\n",
|
| 522 |
+
"\n",
|
| 523 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 524 |
+
" 15/215 6.96G 0.7915 0.6248 1.019 19 800: 1\n",
|
| 525 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 526 |
+
" all 357 941 0.0149 0.117 0.01 0.00296\n",
|
| 527 |
+
"\n",
|
| 528 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 529 |
+
" 16/215 6.96G 0.7849 0.6106 1.012 2 800: 1\n",
|
| 530 |
+
" Class Images Instances Box(P R mAP50 m\n",
|
| 531 |
+
" all 357 941 0.0118 0.0298 0.0039 0.00128\n",
|
| 532 |
+
"\n",
|
| 533 |
+
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
| 534 |
+
" 17/215 6.96G 0.7422 0.5916 0.9887 44 800: ^C\n",
|
| 535 |
+
" 17/215 6.96G 0.7432 0.5909 0.9886 49 800: Traceback (most recent call last):\n",
|
| 536 |
+
" File \"/root/.config/Ultralytics/DDP/_temp_f6tt1q5n139889764186704.py\", line 6, in <module>\n",
|
| 537 |
+
" trainer.train()\n",
|
| 538 |
+
" File \"/opt/conda/lib/python3.7/site-packages/ultralytics/yolo/engine/trainer.py\", line 183, in train\n",
|
| 539 |
+
" self._do_train(int(os.getenv(\"RANK\", -1)), world_size)\n",
|
| 540 |
+
" File \"/opt/conda/lib/python3.7/site-packages/ultralytics/yolo/engine/trainer.py\", line 284, in _do_train\n",
|
| 541 |
+
" for i, batch in pbar:\n",
|
| 542 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 628, in __next__\n",
|
| 543 |
+
" data = self._next_data()\n",
|
| 544 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 1316, in _next_data\n",
|
| 545 |
+
" idx, data = self._get_data()\n",
|
| 546 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 1272, in _get_data\n",
|
| 547 |
+
" success, data = self._try_get_data()\n",
|
| 548 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 1120, in _try_get_data\n",
|
| 549 |
+
"Traceback (most recent call last):\n",
|
| 550 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/std.py\", line 1195, in __iter__\n",
|
| 551 |
+
" data = self._data_queue.get(timeout=timeout)\n",
|
| 552 |
+
" File \"/opt/conda/lib/python3.7/queue.py\", line 179, in get\n",
|
| 553 |
+
" self.not_empty.wait(remaining)\n",
|
| 554 |
+
" File \"/opt/conda/lib/python3.7/threading.py\", line 300, in wait\n",
|
| 555 |
+
" gotit = waiter.acquire(True, timeout)\n",
|
| 556 |
+
"KeyboardInterrupt\n",
|
| 557 |
+
" for obj in iterable:\n",
|
| 558 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 628, in __next__\n",
|
| 559 |
+
" data = self._next_data()\n",
|
| 560 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 1316, in _next_data\n",
|
| 561 |
+
" idx, data = self._get_data()\n",
|
| 562 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 1272, in _get_data\n",
|
| 563 |
+
" success, data = self._try_get_data()\n",
|
| 564 |
+
" File \"/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py\", line 1120, in _try_get_data\n",
|
| 565 |
+
" data = self._data_queue.get(timeout=timeout)\n",
|
| 566 |
+
" File \"/opt/conda/lib/python3.7/queue.py\", line 179, in get\n",
|
| 567 |
+
" self.not_empty.wait(remaining)\n",
|
| 568 |
+
" File \"/opt/conda/lib/python3.7/threading.py\", line 300, in wait\n",
|
| 569 |
+
" gotit = waiter.acquire(True, timeout)\n",
|
| 570 |
+
"KeyboardInterrupt\n",
|
| 571 |
+
"\n",
|
| 572 |
+
"During handling of the above exception, another exception occurred:\n",
|
| 573 |
+
"\n",
|
| 574 |
+
"Traceback (most recent call last):\n",
|
| 575 |
+
" File \"/root/.config/Ultralytics/DDP/_temp_f6tt1q5n139889764186704.py\", line 6, in <module>\n",
|
| 576 |
+
" trainer.train()\n",
|
| 577 |
+
" File \"/opt/conda/lib/python3.7/site-packages/ultralytics/yolo/engine/trainer.py\", line 183, in train\n",
|
| 578 |
+
" self._do_train(int(os.getenv(\"RANK\", -1)), world_size)\n",
|
| 579 |
+
" File \"/opt/conda/lib/python3.7/site-packages/ultralytics/yolo/engine/trainer.py\", line 284, in _do_train\n",
|
| 580 |
+
" for i, batch in pbar:\n",
|
| 581 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/std.py\", line 1210, in __iter__\n",
|
| 582 |
+
" self.close()\n",
|
| 583 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/std.py\", line 1316, in close\n",
|
| 584 |
+
" self.display(pos=0)\n",
|
| 585 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/std.py\", line 1509, in display\n",
|
| 586 |
+
" self.sp(self.__str__() if msg is None else msg)\n",
|
| 587 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/std.py\", line 350, in print_status\n",
|
| 588 |
+
" fp_write('\\r' + s + (' ' * max(last_len[0] - len_s, 0)))\n",
|
| 589 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/std.py\", line 343, in fp_write\n",
|
| 590 |
+
" fp.write(_unicode(s))\n",
|
| 591 |
+
" File \"/opt/conda/lib/python3.7/site-packages/tqdm/utils.py\", line 145, in inner\n",
|
| 592 |
+
" return func(*args, **kwargs)\n",
|
| 593 |
+
"KeyboardInterrupt\n"
|
| 594 |
+
]
|
| 595 |
+
}
|
| 596 |
+
],
|
| 597 |
+
"source": [
|
| 598 |
+
"%cd {HOME}\n",
|
| 599 |
+
"\n",
|
| 600 |
+
"!yolo task=detect mode=train model=yolov8s.pt data={dataset.location}/data.yaml device = '0,1' epochs=215 imgsz=800 plots=True device=0,1 batch = 24\n"
|
| 601 |
+
]
|
| 602 |
+
},
|
| 603 |
+
{
|
| 604 |
+
"cell_type": "code",
|
| 605 |
+
"execution_count": null,
|
| 606 |
+
"metadata": {
|
| 607 |
+
"execution": {
|
| 608 |
+
"iopub.status.busy": "2023-03-04T12:12:29.081618Z",
|
| 609 |
+
"iopub.status.idle": "2023-03-04T12:12:29.082487Z",
|
| 610 |
+
"shell.execute_reply": "2023-03-04T12:12:29.082244Z",
|
| 611 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.082201Z"
|
| 612 |
+
}
|
| 613 |
+
},
|
| 614 |
+
"outputs": [],
|
| 615 |
+
"source": [
|
| 616 |
+
"!ls {HOME}/runs/detect/train/ "
|
| 617 |
+
]
|
| 618 |
+
},
|
| 619 |
+
{
|
| 620 |
+
"cell_type": "code",
|
| 621 |
+
"execution_count": null,
|
| 622 |
+
"metadata": {
|
| 623 |
+
"execution": {
|
| 624 |
+
"iopub.status.busy": "2023-03-04T12:12:29.083867Z",
|
| 625 |
+
"iopub.status.idle": "2023-03-04T12:12:29.084678Z",
|
| 626 |
+
"shell.execute_reply": "2023-03-04T12:12:29.084440Z",
|
| 627 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.084414Z"
|
| 628 |
+
}
|
| 629 |
+
},
|
| 630 |
+
"outputs": [],
|
| 631 |
+
"source": [
|
| 632 |
+
"%cd {HOME}\n",
|
| 633 |
+
"Image(filename=f'{HOME}/runs/detect/train/confusion_matrix.png', width=600)"
|
| 634 |
+
]
|
| 635 |
+
},
|
| 636 |
+
{
|
| 637 |
+
"cell_type": "code",
|
| 638 |
+
"execution_count": null,
|
| 639 |
+
"metadata": {
|
| 640 |
+
"execution": {
|
| 641 |
+
"iopub.status.busy": "2023-03-04T12:12:29.086107Z",
|
| 642 |
+
"iopub.status.idle": "2023-03-04T12:12:29.086926Z",
|
| 643 |
+
"shell.execute_reply": "2023-03-04T12:12:29.086690Z",
|
| 644 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.086663Z"
|
| 645 |
+
}
|
| 646 |
+
},
|
| 647 |
+
"outputs": [],
|
| 648 |
+
"source": [
|
| 649 |
+
"%cd {HOME}\n",
|
| 650 |
+
"Image(filename=f'{HOME}/runs/detect/train/results.png', width=600)"
|
| 651 |
+
]
|
| 652 |
+
},
|
| 653 |
+
{
|
| 654 |
+
"cell_type": "code",
|
| 655 |
+
"execution_count": null,
|
| 656 |
+
"metadata": {
|
| 657 |
+
"execution": {
|
| 658 |
+
"iopub.status.busy": "2023-03-04T12:12:29.088406Z",
|
| 659 |
+
"iopub.status.idle": "2023-03-04T12:12:29.089394Z",
|
| 660 |
+
"shell.execute_reply": "2023-03-04T12:12:29.089118Z",
|
| 661 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.089088Z"
|
| 662 |
+
}
|
| 663 |
+
},
|
| 664 |
+
"outputs": [],
|
| 665 |
+
"source": [
|
| 666 |
+
"%cd {HOME}\n",
|
| 667 |
+
"Image(filename=f'{HOME}/runs/detect/train/val_batch0_pred.jpg', width=600)"
|
| 668 |
+
]
|
| 669 |
+
},
|
| 670 |
+
{
|
| 671 |
+
"cell_type": "code",
|
| 672 |
+
"execution_count": null,
|
| 673 |
+
"metadata": {
|
| 674 |
+
"execution": {
|
| 675 |
+
"iopub.status.busy": "2023-03-04T12:12:29.090791Z",
|
| 676 |
+
"iopub.status.idle": "2023-03-04T12:12:29.091614Z",
|
| 677 |
+
"shell.execute_reply": "2023-03-04T12:12:29.091379Z",
|
| 678 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.091353Z"
|
| 679 |
+
}
|
| 680 |
+
},
|
| 681 |
+
"outputs": [],
|
| 682 |
+
"source": [
|
| 683 |
+
"%cd {HOME}\n",
|
| 684 |
+
"\n",
|
| 685 |
+
"!yolo task=detect mode=val model={HOME}/runs/detect/train/weights/best.pt data={dataset.location}/data.yaml"
|
| 686 |
+
]
|
| 687 |
+
},
|
| 688 |
+
{
|
| 689 |
+
"cell_type": "code",
|
| 690 |
+
"execution_count": null,
|
| 691 |
+
"metadata": {
|
| 692 |
+
"execution": {
|
| 693 |
+
"iopub.status.busy": "2023-03-04T12:12:29.093044Z",
|
| 694 |
+
"iopub.status.idle": "2023-03-04T12:12:29.093872Z",
|
| 695 |
+
"shell.execute_reply": "2023-03-04T12:12:29.093627Z",
|
| 696 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.093602Z"
|
| 697 |
+
}
|
| 698 |
+
},
|
| 699 |
+
"outputs": [],
|
| 700 |
+
"source": [
|
| 701 |
+
"%cd {HOME}\n",
|
| 702 |
+
"!yolo task=detect mode=predict model={HOME}/runs/detect/train/weights/best.pt conf=0.25 source={dataset.location}/test/images save=True"
|
| 703 |
+
]
|
| 704 |
+
},
|
| 705 |
+
{
|
| 706 |
+
"cell_type": "code",
|
| 707 |
+
"execution_count": null,
|
| 708 |
+
"metadata": {
|
| 709 |
+
"execution": {
|
| 710 |
+
"iopub.status.busy": "2023-03-04T12:12:29.095308Z",
|
| 711 |
+
"iopub.status.idle": "2023-03-04T12:12:29.096145Z",
|
| 712 |
+
"shell.execute_reply": "2023-03-04T12:12:29.095908Z",
|
| 713 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.095881Z"
|
| 714 |
+
}
|
| 715 |
+
},
|
| 716 |
+
"outputs": [],
|
| 717 |
+
"source": [
|
| 718 |
+
"import glob\n",
|
| 719 |
+
"from IPython.display import Image, display\n",
|
| 720 |
+
"\n",
|
| 721 |
+
"for image_path in glob.glob(f'{HOME}/runs/detect/predict3/*.jpg')[:3]:\n",
|
| 722 |
+
" display(Image(filename=image_path, width=600))\n",
|
| 723 |
+
" print(\"\\n\")"
|
| 724 |
+
]
|
| 725 |
+
},
|
| 726 |
+
{
|
| 727 |
+
"cell_type": "code",
|
| 728 |
+
"execution_count": null,
|
| 729 |
+
"metadata": {
|
| 730 |
+
"execution": {
|
| 731 |
+
"iopub.status.busy": "2023-03-04T12:12:29.097602Z",
|
| 732 |
+
"iopub.status.idle": "2023-03-04T12:12:29.098464Z",
|
| 733 |
+
"shell.execute_reply": "2023-03-04T12:12:29.098204Z",
|
| 734 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.098177Z"
|
| 735 |
+
}
|
| 736 |
+
},
|
| 737 |
+
"outputs": [],
|
| 738 |
+
"source": [
|
| 739 |
+
"project.version(dataset.version).deploy(model_type=\"yolov8\", model_path=f\"{HOME}/runs/detect/train/\")"
|
| 740 |
+
]
|
| 741 |
+
},
|
| 742 |
+
{
|
| 743 |
+
"cell_type": "code",
|
| 744 |
+
"execution_count": null,
|
| 745 |
+
"metadata": {
|
| 746 |
+
"execution": {
|
| 747 |
+
"iopub.status.busy": "2023-03-04T12:12:29.099771Z",
|
| 748 |
+
"iopub.status.idle": "2023-03-04T12:12:29.100632Z",
|
| 749 |
+
"shell.execute_reply": "2023-03-04T12:12:29.100401Z",
|
| 750 |
+
"shell.execute_reply.started": "2023-03-04T12:12:29.100374Z"
|
| 751 |
+
}
|
| 752 |
+
},
|
| 753 |
+
"outputs": [],
|
| 754 |
+
"source": [
|
| 755 |
+
"#Run inference on your model on a persistant, auto-scaling, cloud API\n",
|
| 756 |
+
"\n",
|
| 757 |
+
"#load model\n",
|
| 758 |
+
"model = project.version(dataset.version).model\n",
|
| 759 |
+
"\n",
|
| 760 |
+
"#choose random test set image\n",
|
| 761 |
+
"import os, random\n",
|
| 762 |
+
"test_set_loc = dataset.location + \"/test/images/\"\n",
|
| 763 |
+
"random_test_image = random.choice(os.listdir(test_set_loc))\n",
|
| 764 |
+
"print(\"running inference on \" + random_test_image)\n",
|
| 765 |
+
"\n",
|
| 766 |
+
"pred = model.predict(test_set_loc + random_test_image, confidence=40, overlap=30).json()\n",
|
| 767 |
+
"pred"
|
| 768 |
+
]
|
| 769 |
+
},
|
| 770 |
+
{
|
| 771 |
+
"cell_type": "code",
|
| 772 |
+
"execution_count": null,
|
| 773 |
+
"metadata": {},
|
| 774 |
+
"outputs": [],
|
| 775 |
+
"source": []
|
| 776 |
+
}
|
| 777 |
+
],
|
| 778 |
+
"metadata": {
|
| 779 |
+
"kernelspec": {
|
| 780 |
+
"display_name": "Python 3 (ipykernel)",
|
| 781 |
+
"language": "python",
|
| 782 |
+
"name": "python3"
|
| 783 |
+
},
|
| 784 |
+
"language_info": {
|
| 785 |
+
"codemirror_mode": {
|
| 786 |
+
"name": "ipython",
|
| 787 |
+
"version": 3
|
| 788 |
+
},
|
| 789 |
+
"file_extension": ".py",
|
| 790 |
+
"mimetype": "text/x-python",
|
| 791 |
+
"name": "python",
|
| 792 |
+
"nbconvert_exporter": "python",
|
| 793 |
+
"pygments_lexer": "ipython3",
|
| 794 |
+
"version": "3.10.6"
|
| 795 |
+
},
|
| 796 |
+
"vscode": {
|
| 797 |
+
"interpreter": {
|
| 798 |
+
"hash": "909e94fa6c232d7c724ea0272d1d960c187d26acecb731545632ac2dfd18735f"
|
| 799 |
+
}
|
| 800 |
+
}
|
| 801 |
+
},
|
| 802 |
+
"nbformat": 4,
|
| 803 |
+
"nbformat_minor": 4
|
| 804 |
+
}
|
superresolution.jpg
ADDED
|
Git LFS Details
|
y8best.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:122d9c0094f56086015e691252ec35b6492c8ded346115da1eeac0f6a35c31c1
|
| 3 |
+
size 136723528
|