Skip to content

Commit 2417861

Browse files
committed
Yolo update
1 parent d47a495 commit 2417861

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tracking-yolo-model.ipynb

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@
136136
"metadata": {},
137137
"outputs": [],
138138
"source": [
139-
"yolomodel = {\"config_path\":\"/home/adi/computer_vision/multi-object-tracker/yolo_dir/yolov3.cfg\",\n",
140-
" \"model_weights_path\":\"/home/adi/computer_vision/multi-object-tracker/yolo_dir/yolov3.weights\",\n",
139+
"yolomodel = {\"config_path\":\"./yolo_dir/yolov3.cfg\",\n",
140+
" \"model_weights_path\":\"./yolo_dir/yolov3.weights\",\n",
141141
" \"coco_names\":\"./yolo_dir/coco.names\",\n",
142142
" \"confidence_threshold\": 0.5,\n",
143143
" \"threshold\":0.3\n",
@@ -201,11 +201,11 @@
201201
},
202202
{
203203
"cell_type": "code",
204-
"execution_count": 6,
204+
"execution_count": 8,
205205
"metadata": {},
206206
"outputs": [],
207207
"source": [
208-
"video_src = \"./video_test2.mp4\"#0\n",
208+
"video_src = \"./data/video_test2.mp4\"#0\n",
209209
"cap = cv.VideoCapture(video_src)"
210210
]
211211
},
@@ -218,9 +218,9 @@
218218
},
219219
{
220220
"cell_type": "code",
221-
"execution_count": 7,
221+
"execution_count": 9,
222222
"metadata": {
223-
"scrolled": true
223+
"scrolled": false
224224
},
225225
"outputs": [
226226
{
@@ -287,19 +287,18 @@
287287
" 0.5, (0, 255, 0), 2)\n",
288288
" cv.circle(image, (centroid[0], centroid[1]), 4, (0, 255, 0), -1)\n",
289289
" \n",
290-
" #cv.imshow(\"image\", image)\n",
290+
" cv.imshow(\"image\", image)\n",
291291
" \n",
292292
" if cv.waitKey(1) & 0xFF == ord('q'):\n",
293293
" break\n",
294294
" \n",
295295
" if writer is None:\n",
296-
" # initialize our video writer\n",
297296
" fourcc = cv.VideoWriter_fourcc(*\"MJPG\")\n",
298297
" writer = cv.VideoWriter(\"output.avi\", fourcc, 30, (W, H), True)\n",
299298
" writer.write(image)\n",
300299
"writer.release()\n",
301300
"cap.release()\n",
302-
"#cv.destroyWindow(\"image\")"
301+
"cv.destroyWindow(\"image\")"
303302
]
304303
},
305304
{

0 commit comments

Comments
 (0)