Liuza1 commited on
Commit
2156389
·
verified ·
1 Parent(s): 739adc3

Upload yolov8.ipynb

Browse files
Files changed (1) hide show
  1. yolov8.ipynb +322 -0
yolov8.ipynb ADDED
@@ -0,0 +1,322 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": null,
6
+ "metadata": {},
7
+ "outputs": [],
8
+ "source": [
9
+ "!pip install -r requirement.txt"
10
+ ]
11
+ },
12
+ {
13
+ "cell_type": "code",
14
+ "execution_count": null,
15
+ "id": "2b1ac199-738d-483e-93cb-6624fd9b9de4",
16
+ "metadata": {},
17
+ "outputs": [],
18
+ "source": [
19
+ "from ultralytics import YOLO\n",
20
+ "\n",
21
+ "# Load a model\n",
22
+ "model = YOLO(\"yolov8n.yaml\") # build a new model from scratch\n",
23
+ "model = YOLO(\"yolov8n.pt\") # load a pretrained model (recommended for training)\n",
24
+ "\n",
25
+ "# Use the model\n",
26
+ "model.train(data=\"coco128.yaml\", epochs=3) # train the model\n",
27
+ "metrics = model.val() # evaluate model performance on the validation set\n",
28
+ "results = model(\"https://ultralytics.com/images/bus.jpg\") # predict on an image\n",
29
+ "path = model.export(format=\"onnx\") # export the model to ONNX format"
30
+ ]
31
+ },
32
+ {
33
+ "cell_type": "code",
34
+ "execution_count": null,
35
+ "id": "bb73b4b6-d444-4059-b64a-03479b4ab05c",
36
+ "metadata": {},
37
+ "outputs": [],
38
+ "source": [
39
+ "\n",
40
+ " from n params module arguments \n",
41
+ " 0 -1 1 464 ultralytics.nn.modules.conv.Conv [3, 16, 3, 2] \n",
42
+ " 1 -1 1 4672 ultralytics.nn.modules.conv.Conv [16, 32, 3, 2] \n",
43
+ " 2 -1 1 7360 ultralytics.nn.modules.block.C2f [32, 32, 1, True] \n",
44
+ " 3 -1 1 18560 ultralytics.nn.modules.conv.Conv [32, 64, 3, 2] \n",
45
+ " 4 -1 2 49664 ultralytics.nn.modules.block.C2f [64, 64, 2, True] \n",
46
+ " 5 -1 1 73984 ultralytics.nn.modules.conv.Conv [64, 128, 3, 2] \n",
47
+ " 6 -1 2 197632 ultralytics.nn.modules.block.C2f [128, 128, 2, True] \n",
48
+ " 7 -1 1 295424 ultralytics.nn.modules.conv.Conv [128, 256, 3, 2] \n",
49
+ " 8 -1 1 460288 ultralytics.nn.modules.block.C2f [256, 256, 1, True] \n",
50
+ " 9 -1 1 164608 ultralytics.nn.modules.block.SPPF [256, 256, 5] \n",
51
+ " 10 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
52
+ " 11 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1] \n",
53
+ " 12 -1 1 148224 ultralytics.nn.modules.block.C2f [384, 128, 1] \n",
54
+ " 13 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
55
+ " 14 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1] \n",
56
+ " 15 -1 1 37248 ultralytics.nn.modules.block.C2f [192, 64, 1] \n",
57
+ " 16 -1 1 36992 ultralytics.nn.modules.conv.Conv [64, 64, 3, 2] \n",
58
+ " 17 [-1, 12] 1 0 ultralytics.nn.modules.conv.Concat [1] \n",
59
+ " 18 -1 1 123648 ultralytics.nn.modules.block.C2f [192, 128, 1] \n",
60
+ " 19 -1 1 147712 ultralytics.nn.modules.conv.Conv [128, 128, 3, 2] \n",
61
+ " 20 [-1, 9] 1 0 ultralytics.nn.modules.conv.Concat [1] \n",
62
+ " 21 -1 1 493056 ultralytics.nn.modules.block.C2f [384, 256, 1] \n",
63
+ " 22 [15, 18, 21] 1 897664 ultralytics.nn.modules.head.Detect [80, [64, 128, 256]] \n",
64
+ "YOLOv8n summary: 225 layers, 3157200 parameters, 3157184 gradients\n",
65
+ "\n",
66
+ "Ultralytics YOLOv8.0.145 🚀 Python-3.7.10 torch-1.13.1+cu117 CPU (Hygon C86 7185 32-core Processor)\n",
67
+ "WARNING ⚠️ Upgrade to torch>=2.0.0 for deterministic training.\n",
68
+ "engine/trainer: task=detect, mode=train, model=yolov8n.pt, data=coco128.yaml, epochs=3, patience=50, batch=16, imgsz=640, save=True, save_period=-1, cache=False, device=None, workers=8, project=None, name=None, exist_ok=False, pretrained=True, optimizer=auto, verbose=True, seed=0, deterministic=True, single_cls=False, rect=False, cos_lr=False, close_mosaic=10, resume=False, amp=True, fraction=1.0, profile=False, overlap_mask=True, mask_ratio=4, dropout=0.0, val=True, split=val, save_json=False, save_hybrid=False, conf=None, iou=0.7, max_det=300, half=False, dnn=False, plots=True, source=None, show=False, save_txt=False, save_conf=False, save_crop=False, show_labels=True, show_conf=True, vid_stride=1, line_width=None, 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=None, workspace=4, nms=False, lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=7.5, cls=0.5, dfl=1.5, pose=12.0, kobj=1.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, tracker=botsort.yaml, save_dir=runs/detect/train7\n",
69
+ "\n",
70
+ " from n params module arguments \n",
71
+ " 0 -1 1 464 ultralytics.nn.modules.conv.Conv [3, 16, 3, 2] \n",
72
+ " 1 -1 1 4672 ultralytics.nn.modules.conv.Conv [16, 32, 3, 2] \n",
73
+ " 2 -1 1 7360 ultralytics.nn.modules.block.C2f [32, 32, 1, True] \n",
74
+ " 3 -1 1 18560 ultralytics.nn.modules.conv.Conv [32, 64, 3, 2] \n",
75
+ " 4 -1 2 49664 ultralytics.nn.modules.block.C2f [64, 64, 2, True] \n",
76
+ " 5 -1 1 73984 ultralytics.nn.modules.conv.Conv [64, 128, 3, 2] \n",
77
+ " 6 -1 2 197632 ultralytics.nn.modules.block.C2f [128, 128, 2, True] \n",
78
+ " 7 -1 1 295424 ultralytics.nn.modules.conv.Conv [128, 256, 3, 2] \n",
79
+ " 8 -1 1 460288 ultralytics.nn.modules.block.C2f [256, 256, 1, True] \n",
80
+ " 9 -1 1 164608 ultralytics.nn.modules.block.SPPF [256, 256, 5] \n",
81
+ " 10 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
82
+ " 11 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1] \n",
83
+ " 12 -1 1 148224 ultralytics.nn.modules.block.C2f [384, 128, 1] \n",
84
+ " 13 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n",
85
+ " 14 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1] \n",
86
+ " 15 -1 1 37248 ultralytics.nn.modules.block.C2f [192, 64, 1] \n",
87
+ " 16 -1 1 36992 ultralytics.nn.modules.conv.Conv [64, 64, 3, 2] \n",
88
+ " 17 [-1, 12] 1 0 ultralytics.nn.modules.conv.Concat [1] \n",
89
+ " 18 -1 1 123648 ultralytics.nn.modules.block.C2f [192, 128, 1] \n",
90
+ " 19 -1 1 147712 ultralytics.nn.modules.conv.Conv [128, 128, 3, 2] \n",
91
+ " 20 [-1, 9] 1 0 ultralytics.nn.modules.conv.Concat [1] \n",
92
+ " 21 -1 1 493056 ultralytics.nn.modules.block.C2f [384, 256, 1] \n",
93
+ " 22 [15, 18, 21] 1 897664 ultralytics.nn.modules.head.Detect [80, [64, 128, 256]] \n",
94
+ "Model summary: 225 layers, 3157200 parameters, 3157184 gradients\n",
95
+ "\n",
96
+ "Transferred 355/355 items from pretrained weights\n",
97
+ "TensorBoard: Start with 'tensorboard --logdir runs/detect/train7', view at http://localhost:6006/\n",
98
+ "train: Scanning /public/home/jsyadmin/datasets/coco128/labels/train2017.cache... 126 images, 2 backgrounds, 0 corrupt: 100%|██████████| 128/128 [00:00<?, ?it/s]\n",
99
+ "val: Scanning /public/home/jsyadmin/datasets/coco128/labels/train2017.cache... 126 images, 2 backgrounds, 0 corrupt: 100%|██████████| 128/128 [00:00<?, ?it/s]\n",
100
+ "Plotting labels to runs/detect/train7/labels.jpg... \n",
101
+ "optimizer: AdamW(lr=0.000119, momentum=0.9) with parameter groups 57 weight(decay=0.0), 64 weight(decay=0.0005), 63 bias(decay=0.0)\n",
102
+ "Image sizes 640 train, 640 val\n",
103
+ "Using 0 dataloader workers\n",
104
+ "Logging results to runs/detect/train7\n",
105
+ "Starting training for 3 epochs...\n",
106
+ "\n",
107
+ " Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
108
+ " 1/3 0G 1.096 1.365 1.202 201 640: 100%|██████████| 8/8 [00:50<00:00, 6.30s/it]\n",
109
+ " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 4/4 [00:15<00:00, 3.85s/it]\n",
110
+ " all 128 929 0.658 0.532 0.615 0.457\n",
111
+ "\n",
112
+ " Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
113
+ " 2/3 0G 1.216 1.443 1.268 136 640: 100%|██████████| 8/8 [00:46<00:00, 5.85s/it]\n",
114
+ " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 4/4 [00:15<00:00, 3.80s/it]\n",
115
+ " all 128 929 0.672 0.542 0.628 0.466\n",
116
+ "\n",
117
+ " Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
118
+ " 3/3 0G 1.193 1.342 1.243 206 640: 100%|██████████| 8/8 [00:47<00:00, 5.92s/it]\n",
119
+ " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 4/4 [00:15<00:00, 3.94s/it]\n",
120
+ " all 128 929 0.69 0.532 0.631 0.468\n",
121
+ "\n",
122
+ "3 epochs completed in 0.057 hours.\n",
123
+ "Optimizer stripped from runs/detect/train7/weights/last.pt, 6.5MB\n",
124
+ "Optimizer stripped from runs/detect/train7/weights/best.pt, 6.5MB\n",
125
+ "\n",
126
+ "Validating runs/detect/train7/weights/best.pt...\n",
127
+ "Ultralytics YOLOv8.0.145 🚀 Python-3.7.10 torch-1.13.1+cu117 CPU (Hygon C86 7185 32-core Processor)\n",
128
+ "Model summary (fused): 168 layers, 3151904 parameters, 0 gradients\n",
129
+ " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 4/4 [00:14<00:00, 3.53s/it]\n",
130
+ " all 128 929 0.691 0.531 0.631 0.469\n",
131
+ " person 128 254 0.818 0.655 0.764 0.538\n",
132
+ " bicycle 128 6 0.663 0.329 0.331 0.26\n",
133
+ " car 128 46 0.867 0.217 0.279 0.174\n",
134
+ " motorcycle 128 5 0.678 0.847 0.938 0.743\n",
135
+ " airplane 128 6 0.817 0.752 0.927 0.687\n",
136
+ " bus 128 7 0.753 0.714 0.728 0.671\n",
137
+ " train 128 3 0.565 0.667 0.83 0.681\n",
138
+ " truck 128 12 1 0.327 0.522 0.328\n",
139
+ " boat 128 6 0.299 0.167 0.36 0.233\n",
140
+ " traffic light 128 14 0.738 0.204 0.201 0.138\n",
141
+ " stop sign 128 2 1 0.971 0.995 0.707\n",
142
+ " bench 128 9 0.815 0.494 0.633 0.382\n",
143
+ " bird 128 16 0.911 0.625 0.894 0.556\n",
144
+ " cat 128 4 0.876 1 0.995 0.791\n",
145
+ " dog 128 9 0.658 0.889 0.871 0.648\n",
146
+ " horse 128 2 0.574 1 0.995 0.518\n",
147
+ " elephant 128 17 0.848 0.824 0.918 0.674\n",
148
+ " bear 128 1 0.624 1 0.995 0.895\n",
149
+ " zebra 128 4 0.865 1 0.995 0.965\n",
150
+ " giraffe 128 9 0.898 0.98 0.973 0.713\n",
151
+ " backpack 128 6 0.648 0.333 0.379 0.22\n",
152
+ " umbrella 128 18 0.814 0.5 0.668 0.465\n",
153
+ " handbag 128 19 1 0 0.207 0.126\n",
154
+ " tie 128 7 0.83 0.7 0.677 0.495\n",
155
+ " suitcase 128 4 0.61 0.787 0.828 0.592\n",
156
+ " frisbee 128 5 0.63 0.8 0.76 0.664\n",
157
+ " skis 128 1 0.746 1 0.995 0.497\n",
158
+ " snowboard 128 7 0.75 0.714 0.755 0.492\n",
159
+ " sports ball 128 6 0.689 0.378 0.502 0.274\n",
160
+ " kite 128 10 0.805 0.415 0.588 0.203\n",
161
+ " baseball bat 128 4 0.45 0.25 0.378 0.187\n",
162
+ " baseball glove 128 7 0.679 0.429 0.429 0.294\n",
163
+ " skateboard 128 5 0.811 0.6 0.599 0.446\n",
164
+ " tennis racket 128 7 0.695 0.334 0.502 0.365\n",
165
+ " bottle 128 18 0.508 0.344 0.366 0.219\n",
166
+ " wine glass 128 16 0.795 0.487 0.61 0.363\n",
167
+ " cup 128 36 0.651 0.26 0.402 0.289\n",
168
+ " fork 128 6 0.609 0.167 0.294 0.205\n",
169
+ " knife 128 16 0.745 0.549 0.628 0.362\n",
170
+ " spoon 128 22 0.511 0.191 0.349 0.182\n",
171
+ " bowl 128 28 0.693 0.679 0.641 0.528\n",
172
+ " banana 128 1 0 0 0.111 0.0369\n",
173
+ " sandwich 128 2 0.323 0.5 0.695 0.695\n",
174
+ " orange 128 4 1 0.334 0.995 0.666\n",
175
+ " broccoli 128 11 0.396 0.182 0.254 0.213\n",
176
+ " carrot 128 24 0.818 0.458 0.673 0.434\n",
177
+ " hot dog 128 2 0.634 1 0.828 0.795\n",
178
+ " pizza 128 5 0.791 1 0.995 0.843\n",
179
+ " donut 128 14 0.65 1 0.926 0.84\n",
180
+ " cake 128 4 0.725 1 0.995 0.88\n",
181
+ " chair 128 35 0.565 0.514 0.462 0.26\n",
182
+ " couch 128 6 0.423 0.333 0.614 0.469\n",
183
+ " potted plant 128 14 0.818 0.643 0.722 0.498\n",
184
+ " bed 128 3 0.793 0.667 0.775 0.676\n",
185
+ " dining table 128 13 0.512 0.615 0.514 0.41\n",
186
+ " toilet 128 2 0.644 0.5 0.745 0.721\n",
187
+ " tv 128 2 0.543 0.63 0.828 0.762\n",
188
+ " laptop 128 3 1 0 0.665 0.522\n",
189
+ " mouse 128 2 1 0 0.0443 0.00443\n",
190
+ " remote 128 8 0.874 0.5 0.578 0.502\n",
191
+ " cell phone 128 8 0 0 0.0582 0.0384\n",
192
+ " microwave 128 3 0.6 0.667 0.83 0.699\n",
193
+ " oven 128 5 0.456 0.4 0.343 0.272\n",
194
+ " sink 128 6 0.372 0.167 0.203 0.125\n",
195
+ " refrigerator 128 5 0.667 0.4 0.65 0.522\n",
196
+ " book 128 29 0.619 0.113 0.355 0.18\n",
197
+ " clock 128 9 0.778 0.781 0.891 0.721\n",
198
+ " vase 128 2 0.411 1 0.828 0.795\n",
199
+ " scissors 128 1 1 0 0.249 0.0746\n",
200
+ " teddy bear 128 21 0.939 0.333 0.636 0.431\n",
201
+ " toothbrush 128 5 0.747 0.4 0.672 0.424\n",
202
+ "Speed: 1.0ms preprocess, 91.7ms inference, 0.0ms loss, 2.2ms postprocess per image\n",
203
+ "Results saved to runs/detect/train7\n",
204
+ "Ultralytics YOLOv8.0.145 🚀 Python-3.7.10 torch-1.13.1+cu117 CPU (Hygon C86 7185 32-core Processor)\n",
205
+ "Model summary (fused): 168 layers, 3151904 parameters, 0 gradients\n",
206
+ "val: Scanning /public/home/jsyadmin/datasets/coco128/labels/train2017.cache... 126 images, 2 backgrounds, 0 corrupt: 100%|██████████| 128/128 [00:00<?, ?it/s]\n",
207
+ " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 8/8 [00:12<00:00, 1.62s/it]\n",
208
+ " all 128 929 0.677 0.547 0.626 0.463\n",
209
+ " person 128 254 0.805 0.665 0.766 0.539\n",
210
+ " bicycle 128 6 0.499 0.333 0.328 0.258\n",
211
+ " car 128 46 0.816 0.217 0.279 0.174\n",
212
+ " motorcycle 128 5 0.684 0.875 0.938 0.743\n",
213
+ " airplane 128 6 0.82 0.767 0.927 0.687\n",
214
+ " bus 128 7 0.74 0.714 0.728 0.671\n",
215
+ " train 128 3 0.555 0.667 0.83 0.681\n",
216
+ " truck 128 12 1 0.371 0.496 0.286\n",
217
+ " boat 128 6 0.238 0.167 0.327 0.205\n",
218
+ " traffic light 128 14 0.738 0.204 0.201 0.138\n",
219
+ " stop sign 128 2 1 0.989 0.995 0.708\n",
220
+ " bench 128 9 0.825 0.526 0.632 0.382\n",
221
+ " bird 128 16 0.85 0.708 0.884 0.549\n",
222
+ " cat 128 4 0.867 1 0.995 0.791\n",
223
+ " dog 128 9 0.649 0.889 0.871 0.648\n",
224
+ " horse 128 2 0.513 1 0.995 0.518\n",
225
+ " elephant 128 17 0.825 0.829 0.918 0.674\n",
226
+ " bear 128 1 0.609 1 0.995 0.895\n",
227
+ " zebra 128 4 0.86 1 0.995 0.965\n",
228
+ " giraffe 128 9 0.807 0.935 0.951 0.753\n",
229
+ " backpack 128 6 0.629 0.333 0.379 0.231\n",
230
+ " umbrella 128 18 0.703 0.5 0.663 0.462\n",
231
+ " handbag 128 19 1 0.0683 0.206 0.126\n",
232
+ " tie 128 7 0.827 0.714 0.677 0.495\n",
233
+ " suitcase 128 4 0.662 1 0.828 0.592\n",
234
+ " frisbee 128 5 0.604 0.8 0.759 0.664\n",
235
+ " skis 128 1 0.627 1 0.995 0.497\n",
236
+ " snowboard 128 7 0.727 0.714 0.755 0.491\n",
237
+ " sports ball 128 6 0.698 0.396 0.502 0.274\n",
238
+ " kite 128 10 0.824 0.472 0.589 0.204\n",
239
+ " baseball bat 128 4 0.526 0.25 0.353 0.199\n",
240
+ " baseball glove 128 7 0.641 0.429 0.429 0.316\n",
241
+ " skateboard 128 5 0.863 0.6 0.599 0.44\n",
242
+ " tennis racket 128 7 0.708 0.357 0.502 0.337\n",
243
+ " bottle 128 18 0.524 0.369 0.368 0.217\n",
244
+ " wine glass 128 16 0.776 0.433 0.569 0.354\n",
245
+ " cup 128 36 0.671 0.278 0.419 0.302\n",
246
+ " fork 128 6 0.584 0.167 0.236 0.183\n",
247
+ " knife 128 16 0.65 0.562 0.607 0.353\n",
248
+ " spoon 128 22 0.595 0.202 0.351 0.197\n",
249
+ " bowl 128 28 0.681 0.687 0.667 0.517\n",
250
+ " banana 128 1 0 0 0.0829 0.0344\n",
251
+ " sandwich 128 2 0.323 0.5 0.308 0.308\n",
252
+ " orange 128 4 1 0.371 0.995 0.666\n",
253
+ " broccoli 128 11 0.358 0.182 0.263 0.214\n",
254
+ " carrot 128 24 0.736 0.58 0.669 0.428\n",
255
+ " hot dog 128 2 0.658 0.974 0.828 0.828\n",
256
+ " pizza 128 5 0.857 1 0.995 0.843\n",
257
+ " donut 128 14 0.647 1 0.926 0.841\n",
258
+ " cake 128 4 0.612 1 0.995 0.88\n",
259
+ " chair 128 35 0.54 0.514 0.451 0.249\n",
260
+ " couch 128 6 0.524 0.5 0.715 0.553\n",
261
+ " potted plant 128 14 0.784 0.643 0.722 0.498\n",
262
+ " bed 128 3 0.764 0.667 0.863 0.655\n",
263
+ " dining table 128 13 0.465 0.538 0.486 0.387\n",
264
+ " toilet 128 2 0.629 0.5 0.745 0.721\n",
265
+ " tv 128 2 0.563 0.69 0.828 0.762\n",
266
+ " laptop 128 3 1 0 0.6 0.48\n",
267
+ " mouse 128 2 1 0 0.0683 0.00683\n",
268
+ " remote 128 8 0.858 0.5 0.613 0.523\n",
269
+ " cell phone 128 8 0 0 0.0576 0.0383\n",
270
+ " microwave 128 3 0.566 0.667 0.83 0.683\n",
271
+ " oven 128 5 0.459 0.4 0.343 0.272\n",
272
+ " sink 128 6 0.383 0.167 0.166 0.104\n",
273
+ " refrigerator 128 5 0.638 0.4 0.654 0.506\n",
274
+ " book 128 29 0.638 0.123 0.376 0.201\n",
275
+ " clock 128 9 0.782 0.798 0.892 0.722\n",
276
+ " vase 128 2 0.367 1 0.828 0.795\n",
277
+ " scissors 128 1 1 0 0.249 0.0746\n",
278
+ " teddy bear 128 21 0.92 0.333 0.632 0.428\n",
279
+ " toothbrush 128 5 0.745 0.6 0.743 0.478\n",
280
+ "Speed: 0.8ms preprocess, 86.0ms inference, 0.0ms loss, 2.4ms postprocess per image\n",
281
+ "Results saved to runs/detect/val3\n",
282
+ "\n",
283
+ "Found https://ultralytics.com/images/bus.jpg locally at bus.jpg\n",
284
+ "image 1/1 /public/home/jsyadmin/yolotest/bus.jpg: 640x480 4 persons, 1 bus, 399.2ms\n",
285
+ "Speed: 67.8ms preprocess, 399.2ms inference, 44.2ms postprocess per image at shape (1, 3, 640, 480)\n",
286
+ "Ultralytics YOLOv8.0.145 🚀 Python-3.7.10 torch-1.13.1+cu117 CPU (Hygon C86 7185 32-core Processor)\n",
287
+ "\n",
288
+ "PyTorch: starting from 'runs/detect/train7/weights/best.pt' with input shape (1, 3, 640, 640) BCHW and output shape(s) (1, 84, 8400) (6.2 MB)\n",
289
+ "\n",
290
+ "ONNX: starting export with onnx 1.14.1 opset 16...\n",
291
+ "ONNX: export success ✅ 2.6s, saved as 'runs/detect/train7/weights/best.onnx' (12.2 MB)\n",
292
+ "\n",
293
+ "Export complete (3.0s)\n",
294
+ "Results saved to /public/home/jsyadmin/yolotest/runs/detect/train7/weights\n",
295
+ "Predict: yolo predict task=detect model=runs/detect/train7/weights/best.onnx imgsz=640 \n",
296
+ "Validate: yolo val task=detect model=runs/detect/train7/weights/best.onnx imgsz=640 data=None \n",
297
+ "Visualize: https://netron.app"
298
+ ]
299
+ }
300
+ ],
301
+ "metadata": {
302
+ "kernelspec": {
303
+ "display_name": "Python 3 (ipykernel)",
304
+ "language": "python",
305
+ "name": "python3"
306
+ },
307
+ "language_info": {
308
+ "codemirror_mode": {
309
+ "name": "ipython",
310
+ "version": 3
311
+ },
312
+ "file_extension": ".py",
313
+ "mimetype": "text/x-python",
314
+ "name": "python",
315
+ "nbconvert_exporter": "python",
316
+ "pygments_lexer": "ipython3",
317
+ "version": "3.12.0"
318
+ }
319
+ },
320
+ "nbformat": 4,
321
+ "nbformat_minor": 5
322
+ }