Skip to content

Commit 4585e8e

Browse files
committed
yolo
1 parent f2cc8fe commit 4585e8e

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

src/lectures/11_YOLO/yolo11.ipynb

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "fd5f3063-6675-4fb5-87cf-b98397bb3309",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"%pip install ultralytics\n",
11+
"import ultralytics\n",
12+
"ultralytics.checks()"
13+
]
14+
},
15+
{
16+
"cell_type": "code",
17+
"execution_count": null,
18+
"id": "d4521bb0-52b4-4b45-8c6f-b1e90538c6d1",
19+
"metadata": {},
20+
"outputs": [],
21+
"source": [
22+
"# Run inference on an image with YOLO11n\n",
23+
"!yolo predict model=yolo11n.pt source='https://ultralytics.com/images/zidane.jpg'"
24+
]
25+
},
26+
{
27+
"cell_type": "code",
28+
"execution_count": null,
29+
"id": "ff5cd75a-a82d-4bf3-a105-f76a41d7fd2a",
30+
"metadata": {},
31+
"outputs": [],
32+
"source": [
33+
"import matplotlib.pyplot as plt\n",
34+
"import matplotlib.image as mpimg\n",
35+
"predict = mpimg.imread('/content/runs/detect/predict/zidane.jpg')\n",
36+
"plt.imshow(predict)"
37+
]
38+
}
39+
],
40+
"metadata": {
41+
"kernelspec": {
42+
"display_name": "Python 3 (ipykernel)",
43+
"language": "python",
44+
"name": "python3"
45+
},
46+
"language_info": {
47+
"codemirror_mode": {
48+
"name": "ipython",
49+
"version": 3
50+
},
51+
"file_extension": ".py",
52+
"mimetype": "text/x-python",
53+
"name": "python",
54+
"nbconvert_exporter": "python",
55+
"pygments_lexer": "ipython3",
56+
"version": "3.12.3"
57+
}
58+
},
59+
"nbformat": 4,
60+
"nbformat_minor": 5
61+
}

0 commit comments

Comments
 (0)