|
|
@ -57,10 +57,9 @@
|
|
|
|
"metadata": {
|
|
|
|
"metadata": {
|
|
|
|
"id": "wbvMlHd_QwMG",
|
|
|
|
"id": "wbvMlHd_QwMG",
|
|
|
|
"colab": {
|
|
|
|
"colab": {
|
|
|
|
"base_uri": "https://localhost:8080/",
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
"height": 1000
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"outputId": "5006941e-44ff-4e27-f53e-31bf87221334"
|
|
|
|
"outputId": "9bda69d4-e57f-404b-b6fe-117234e24677"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"source": [
|
|
|
|
"source": [
|
|
|
|
"# Pip install method (recommended)\n",
|
|
|
|
"# Pip install method (recommended)\n",
|
|
|
@ -68,14 +67,14 @@
|
|
|
|
"import ultralytics\n",
|
|
|
|
"import ultralytics\n",
|
|
|
|
"ultralytics.checks()"
|
|
|
|
"ultralytics.checks()"
|
|
|
|
],
|
|
|
|
],
|
|
|
|
"execution_count": null,
|
|
|
|
"execution_count": 1,
|
|
|
|
"outputs": [
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"output_type": "stream",
|
|
|
|
"output_type": "stream",
|
|
|
|
"name": "stderr",
|
|
|
|
"name": "stderr",
|
|
|
|
"text": [
|
|
|
|
"text": [
|
|
|
|
"Ultralytics YOLOv8.0.5 🚀 Python-3.8.16 torch-1.13.1+cu116 CUDA:0 (Tesla T4, 15110MiB)\n",
|
|
|
|
"Ultralytics YOLOv8.0.24 🚀 Python-3.8.10 torch-1.13.1+cu116 CUDA:0 (Tesla T4, 15110MiB)\n",
|
|
|
|
"Setup complete ✅ (2 CPUs, 12.7 GB RAM, 23.0/166.8 GB disk)\n"
|
|
|
|
"Setup complete ✅ (2 CPUs, 12.7 GB RAM, 30.8/166.8 GB disk)\n"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
@ -111,28 +110,27 @@
|
|
|
|
"colab": {
|
|
|
|
"colab": {
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"outputId": "3136de6b-2995-4731-e84c-962acb233d89"
|
|
|
|
"outputId": "abe002b5-3df9-4324-9e50-1587394398a2"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"source": [
|
|
|
|
"source": [
|
|
|
|
"# Run inference on an image with YOLOv8n\n",
|
|
|
|
"# Run inference on an image with YOLOv8n\n",
|
|
|
|
"!yolo task=detect mode=predict model=yolov8n.pt conf=0.25 source='https://ultralytics.com/images/zidane.jpg'"
|
|
|
|
"!yolo predict model=yolov8n.pt source='https://ultralytics.com/images/zidane.jpg'"
|
|
|
|
],
|
|
|
|
],
|
|
|
|
"execution_count": null,
|
|
|
|
"execution_count": 2,
|
|
|
|
"outputs": [
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"output_type": "stream",
|
|
|
|
"output_type": "stream",
|
|
|
|
"name": "stdout",
|
|
|
|
"name": "stdout",
|
|
|
|
"text": [
|
|
|
|
"text": [
|
|
|
|
"Downloading https://ultralytics.com/images/zidane.jpg to zidane.jpg...\n",
|
|
|
|
|
|
|
|
"100% 165k/165k [00:00<00:00, 12.0MB/s]\n",
|
|
|
|
|
|
|
|
"Ultralytics YOLOv8.0.5 🚀 Python-3.8.16 torch-1.13.1+cu116 CUDA:0 (Tesla T4, 15110MiB)\n",
|
|
|
|
|
|
|
|
"Downloading https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt to yolov8n.pt...\n",
|
|
|
|
"Downloading https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt to yolov8n.pt...\n",
|
|
|
|
"100% 6.24M/6.24M [00:00<00:00, 58.7MB/s]\n",
|
|
|
|
"\r 0% 0.00/6.23M [00:00<?, ?B/s]\r100% 6.23M/6.23M [00:00<00:00, 266MB/s]\n",
|
|
|
|
|
|
|
|
"Ultralytics YOLOv8.0.24 🚀 Python-3.8.10 torch-1.13.1+cu116 CUDA:0 (Tesla T4, 15110MiB)\n",
|
|
|
|
|
|
|
|
"YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"Fusing layers... \n",
|
|
|
|
"Downloading https://ultralytics.com/images/zidane.jpg to zidane.jpg...\n",
|
|
|
|
"YOLOv8n summary: 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs\n",
|
|
|
|
"100% 165k/165k [00:00<00:00, 87.4MB/s]\n",
|
|
|
|
"image 1/1 /content/zidane.jpg: 384x640 2 persons, 1 tie, 13.6ms\n",
|
|
|
|
"image 1/1 /content/zidane.jpg: 384x640 2 persons, 1 tie, 13.3ms\n",
|
|
|
|
"Speed: 0.4ms pre-process, 13.6ms inference, 52.1ms postprocess per image at shape (1, 3, 640, 640)\n",
|
|
|
|
"Speed: 0.5ms pre-process, 13.3ms inference, 43.5ms postprocess per image at shape (1, 3, 640, 640)\n",
|
|
|
|
"Results saved to \u001b[1mruns/detect/predict\u001b[0m\n"
|
|
|
|
"Results saved to \u001b[1mruns/detect/predict\u001b[0m\n"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -176,37 +174,35 @@
|
|
|
|
"cell_type": "code",
|
|
|
|
"cell_type": "code",
|
|
|
|
"metadata": {
|
|
|
|
"metadata": {
|
|
|
|
"id": "X58w8JLpMnjH",
|
|
|
|
"id": "X58w8JLpMnjH",
|
|
|
|
"outputId": "3e8689b5-e6e6-4764-c1d9-2626f53355f2",
|
|
|
|
"outputId": "df71d7a8-f42f-473a-c143-75f033c58433",
|
|
|
|
"colab": {
|
|
|
|
"colab": {
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"source": [
|
|
|
|
"source": [
|
|
|
|
"# Validate YOLOv8n on COCO128 val\n",
|
|
|
|
"# Validate YOLOv8n on COCO128 val\n",
|
|
|
|
"!yolo task=detect mode=val model=yolov8n.pt data=coco128.yaml"
|
|
|
|
"!yolo val model=yolov8n.pt data=coco128.yaml"
|
|
|
|
],
|
|
|
|
],
|
|
|
|
"execution_count": null,
|
|
|
|
"execution_count": 3,
|
|
|
|
"outputs": [
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"output_type": "stream",
|
|
|
|
"output_type": "stream",
|
|
|
|
"name": "stdout",
|
|
|
|
"name": "stdout",
|
|
|
|
"text": [
|
|
|
|
"text": [
|
|
|
|
"Ultralytics YOLOv8.0.5 🚀 Python-3.8.16 torch-1.13.1+cu116 CUDA:0 (Tesla T4, 15110MiB)\n",
|
|
|
|
"Ultralytics YOLOv8.0.24 🚀 Python-3.8.10 torch-1.13.1+cu116 CUDA:0 (Tesla T4, 15110MiB)\n",
|
|
|
|
"Downloading https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt to yolov8n.pt...\n",
|
|
|
|
"YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs\n",
|
|
|
|
"100% 6.24M/6.24M [00:01<00:00, 6.32MB/s]\n",
|
|
|
|
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"Fusing layers... \n",
|
|
|
|
"Dataset 'coco128.yaml' not found ⚠️, missing paths ['/content/datasets/coco128/images/train2017']\n",
|
|
|
|
"YOLOv8n summary: 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs\n",
|
|
|
|
"Downloading https://ultralytics.com/assets/coco128.zip to /content/datasets/coco128.zip...\n",
|
|
|
|
|
|
|
|
"100% 6.66M/6.66M [00:00<00:00, 50.5MB/s]\n",
|
|
|
|
|
|
|
|
"Unzipping /content/datasets/coco128.zip...\n",
|
|
|
|
|
|
|
|
"Dataset download success ✅ (0.5s), saved to \u001b[1m/content/datasets\u001b[0m\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"Dataset not found ⚠️, missing paths ['/datasets/coco128/images/train2017']\n",
|
|
|
|
|
|
|
|
"Downloading https://ultralytics.com/assets/coco128.zip to coco128.zip...\n",
|
|
|
|
|
|
|
|
"100% 6.66M/6.66M [00:00<00:00, 71.9MB/s]\n",
|
|
|
|
|
|
|
|
"Dataset download success ✅ (0.8s), saved to \u001b[1m/datasets\u001b[0m\n",
|
|
|
|
|
|
|
|
"Downloading https://ultralytics.com/assets/Arial.ttf to /root/.config/Ultralytics/Arial.ttf...\n",
|
|
|
|
"Downloading https://ultralytics.com/assets/Arial.ttf to /root/.config/Ultralytics/Arial.ttf...\n",
|
|
|
|
"100% 755k/755k [00:00<00:00, 44.6MB/s]\n",
|
|
|
|
"100% 755k/755k [00:00<00:00, 99.8MB/s]\n",
|
|
|
|
"\u001b[34m\u001b[1mval: \u001b[0mScanning /datasets/coco128/labels/train2017... 126 images, 2 backgrounds, 0 corrupt: 100% 128/128 [00:00<00:00, 1451.73it/s]\n",
|
|
|
|
"\u001b[34m\u001b[1mval: \u001b[0mScanning /content/datasets/coco128/labels/train2017... 126 images, 2 backgrounds, 0 corrupt: 100% 128/128 [00:00<00:00, 1290.29it/s]\n",
|
|
|
|
"\u001b[34m\u001b[1mval: \u001b[0mNew cache created: /datasets/coco128/labels/train2017.cache\n",
|
|
|
|
"\u001b[34m\u001b[1mval: \u001b[0mNew cache created: /content/datasets/coco128/labels/train2017.cache\n",
|
|
|
|
" Class Images Instances Box(P R mAP50 mAP50-95): 100% 8/8 [00:05<00:00, 1.53it/s]\n",
|
|
|
|
" Class Images Instances Box(P R mAP50 mAP50-95): 100% 8/8 [00:06<00:00, 1.22it/s]\n",
|
|
|
|
" all 128 929 0.64 0.537 0.605 0.446\n",
|
|
|
|
" all 128 929 0.64 0.537 0.605 0.446\n",
|
|
|
|
" person 128 254 0.797 0.677 0.764 0.538\n",
|
|
|
|
" person 128 254 0.797 0.677 0.764 0.538\n",
|
|
|
|
" bicycle 128 6 0.514 0.333 0.315 0.264\n",
|
|
|
|
" bicycle 128 6 0.514 0.333 0.315 0.264\n",
|
|
|
@ -279,7 +275,7 @@
|
|
|
|
" scissors 128 1 1 0 0.249 0.0746\n",
|
|
|
|
" scissors 128 1 1 0 0.249 0.0746\n",
|
|
|
|
" teddy bear 128 21 0.877 0.333 0.591 0.394\n",
|
|
|
|
" teddy bear 128 21 0.877 0.333 0.591 0.394\n",
|
|
|
|
" toothbrush 128 5 0.743 0.6 0.638 0.374\n",
|
|
|
|
" toothbrush 128 5 0.743 0.6 0.638 0.374\n",
|
|
|
|
"Speed: 1.1ms pre-process, 5.7ms inference, 0.0ms loss, 3.7ms post-process per image\n"
|
|
|
|
"Speed: 2.4ms pre-process, 7.8ms inference, 0.0ms loss, 3.3ms post-process per image\n"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
@ -301,23 +297,23 @@
|
|
|
|
"cell_type": "code",
|
|
|
|
"cell_type": "code",
|
|
|
|
"metadata": {
|
|
|
|
"metadata": {
|
|
|
|
"id": "1NcFxRcFdJ_O",
|
|
|
|
"id": "1NcFxRcFdJ_O",
|
|
|
|
"outputId": "3e6ce168-7f91-4253-d2f1-84c8254a66ee",
|
|
|
|
"outputId": "e0978a9a-ef1d-4a20-8082-19c8049d8c7e",
|
|
|
|
"colab": {
|
|
|
|
"colab": {
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"source": [
|
|
|
|
"source": [
|
|
|
|
"# Train YOLOv8n on COCO128 for 3 epochs\n",
|
|
|
|
"# Train YOLOv8n on COCO128 for 3 epochs\n",
|
|
|
|
"!yolo task=detect mode=train model=yolov8n.pt data=coco128.yaml epochs=3 imgsz=640"
|
|
|
|
"!yolo train model=yolov8n.pt data=coco128.yaml epochs=3 imgsz=640"
|
|
|
|
],
|
|
|
|
],
|
|
|
|
"execution_count": null,
|
|
|
|
"execution_count": 4,
|
|
|
|
"outputs": [
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"output_type": "stream",
|
|
|
|
"output_type": "stream",
|
|
|
|
"name": "stdout",
|
|
|
|
"name": "stdout",
|
|
|
|
"text": [
|
|
|
|
"text": [
|
|
|
|
"Ultralytics YOLOv8.0.5 🚀 Python-3.8.16 torch-1.13.1+cu116 CUDA:0 (Tesla T4, 15110MiB)\n",
|
|
|
|
"Ultralytics YOLOv8.0.24 🚀 Python-3.8.10 torch-1.13.1+cu116 CUDA:0 (Tesla T4, 15110MiB)\n",
|
|
|
|
"\u001b[34m\u001b[1myolo/engine/trainer: \u001b[0mtask=detect, mode=train, model=yolov8n.pt, data=coco128.yaml, epochs=3, patience=50, batch=16, imgsz=640, save=True, cache=False, device=, workers=8, project=None, name=None, exist_ok=False, pretrained=False, optimizer=SGD, verbose=False, 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=0.0, val=True, 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, hide_labels=False, hide_conf=False, vid_stride=1, line_thickness=3, visualize=False, augment=False, agnostic_nms=False, retina_masks=False, 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.0005, 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, hydra={'output_subdir': None, 'run': {'dir': '.'}}, v5loader=False, save_dir=runs/detect/train\n",
|
|
|
|
"\u001b[34m\u001b[1myolo/engine/trainer: \u001b[0mtask=detect, mode=train, model=yolov8n.pt, data=coco128.yaml, epochs=3, patience=50, batch=16, imgsz=640, save=True, cache=False, device=None, 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=0.0, val=True, 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, 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=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, 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/train\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
" from n params module arguments \n",
|
|
|
|
" from n params module arguments \n",
|
|
|
|
" 0 -1 1 464 ultralytics.nn.modules.Conv [3, 16, 3, 2] \n",
|
|
|
|
" 0 -1 1 464 ultralytics.nn.modules.Conv [3, 16, 3, 2] \n",
|
|
|
@ -347,38 +343,37 @@
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"Transferred 355/355 items from pretrained weights\n",
|
|
|
|
"Transferred 355/355 items from pretrained weights\n",
|
|
|
|
"\u001b[34m\u001b[1moptimizer:\u001b[0m SGD(lr=0.01) with parameter groups 57 weight(decay=0.0), 64 weight(decay=0.0005), 63 bias\n",
|
|
|
|
"\u001b[34m\u001b[1moptimizer:\u001b[0m SGD(lr=0.01) with parameter groups 57 weight(decay=0.0), 64 weight(decay=0.0005), 63 bias\n",
|
|
|
|
"\u001b[34m\u001b[1mtrain: \u001b[0mScanning /datasets/coco128/labels/train2017.cache... 126 images, 2 backgrounds, 0 corrupt: 100% 128/128 [00:00<?, ?it/s]\n",
|
|
|
|
"\u001b[34m\u001b[1mtrain: \u001b[0mScanning /content/datasets/coco128/labels/train2017.cache... 126 images, 2 backgrounds, 0 corrupt: 100% 128/128 [00:00<?, ?it/s]\n",
|
|
|
|
"\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",
|
|
|
|
"\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",
|
|
|
|
"\u001b[34m\u001b[1mval: \u001b[0mScanning /datasets/coco128/labels/train2017.cache... 126 images, 2 backgrounds, 0 corrupt: 100% 128/128 [00:00<?, ?it/s]\n",
|
|
|
|
"\u001b[34m\u001b[1mval: \u001b[0mScanning /content/datasets/coco128/labels/train2017.cache... 126 images, 2 backgrounds, 0 corrupt: 100% 128/128 [00:00<?, ?it/s]\n",
|
|
|
|
"Image sizes 640 train, 640 val\n",
|
|
|
|
"Image sizes 640 train, 640 val\n",
|
|
|
|
"Using 2 dataloader workers\n",
|
|
|
|
"Using 2 dataloader workers\n",
|
|
|
|
"Logging results to \u001b[1mruns/detect/train\u001b[0m\n",
|
|
|
|
"Logging results to \u001b[1mruns/detect/train\u001b[0m\n",
|
|
|
|
"Starting training for 3 epochs...\n",
|
|
|
|
"Starting training for 3 epochs...\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
|
|
|
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
|
|
|
" 1/3 4.31G 1.221 1.429 1.241 196 640: 100% 8/8 [00:09<00:00, 1.18s/it]\n",
|
|
|
|
" 1/3 4.31G 1.221 1.429 1.241 196 640: 100% 8/8 [00:08<00:00, 1.01s/it]\n",
|
|
|
|
" Class Images Instances Box(P R mAP50 mAP50-95): 100% 4/4 [00:02<00:00, 1.95it/s]\n",
|
|
|
|
" Class Images Instances Box(P R mAP50 mAP50-95): 100% 4/4 [00:01<00:00, 2.18it/s]\n",
|
|
|
|
" all 128 929 0.671 0.516 0.617 0.457\n",
|
|
|
|
" all 128 929 0.671 0.516 0.617 0.457\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
|
|
|
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
|
|
|
" 2/3 5.31G 1.186 1.306 1.255 287 640: 100% 8/8 [00:06<00:00, 1.33it/s]\n",
|
|
|
|
" 2/3 5.31G 1.186 1.306 1.255 287 640: 100% 8/8 [00:04<00:00, 1.63it/s]\n",
|
|
|
|
" Class Images Instances Box(P R mAP50 mAP50-95): 100% 4/4 [00:02<00:00, 1.92it/s]\n",
|
|
|
|
" Class Images Instances Box(P R mAP50 mAP50-95): 100% 4/4 [00:01<00:00, 2.23it/s]\n",
|
|
|
|
" all 128 929 0.668 0.582 0.637 0.473\n",
|
|
|
|
" all 128 929 0.668 0.582 0.637 0.473\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
|
|
|
" Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n",
|
|
|
|
" 3/3 5.31G 1.17 1.408 1.267 189 640: 100% 8/8 [00:06<00:00, 1.19it/s]\n",
|
|
|
|
" 3/3 5.31G 1.17 1.408 1.267 189 640: 100% 8/8 [00:04<00:00, 1.64it/s]\n",
|
|
|
|
" Class Images Instances Box(P R mAP50 mAP50-95): 100% 4/4 [00:04<00:00, 1.16s/it]\n",
|
|
|
|
" Class Images Instances Box(P R mAP50 mAP50-95): 100% 4/4 [00:03<00:00, 1.03it/s]\n",
|
|
|
|
" all 128 929 0.638 0.601 0.645 0.483\n",
|
|
|
|
" all 128 929 0.638 0.601 0.645 0.483\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"3 epochs completed in 0.011 hours.\n",
|
|
|
|
"3 epochs completed in 0.009 hours.\n",
|
|
|
|
"Optimizer stripped from runs/detect/train/weights/last.pt, 6.5MB\n",
|
|
|
|
"Optimizer stripped from runs/detect/train/weights/last.pt, 6.5MB\n",
|
|
|
|
"Optimizer stripped from runs/detect/train/weights/best.pt, 6.5MB\n",
|
|
|
|
"Optimizer stripped from runs/detect/train/weights/best.pt, 6.5MB\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"Validating runs/detect/train/weights/best.pt...\n",
|
|
|
|
"Validating runs/detect/train/weights/best.pt...\n",
|
|
|
|
"Ultralytics YOLOv8.0.5 🚀 Python-3.8.16 torch-1.13.1+cu116 CUDA:0 (Tesla T4, 15110MiB)\n",
|
|
|
|
"Ultralytics YOLOv8.0.24 🚀 Python-3.8.10 torch-1.13.1+cu116 CUDA:0 (Tesla T4, 15110MiB)\n",
|
|
|
|
"Fusing layers... \n",
|
|
|
|
"Model summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs\n",
|
|
|
|
"Model summary: 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs\n",
|
|
|
|
" Class Images Instances Box(P R mAP50 mAP50-95): 100% 4/4 [00:04<00:00, 1.05s/it]\n",
|
|
|
|
" Class Images Instances Box(P R mAP50 mAP50-95): 100% 4/4 [00:05<00:00, 1.31s/it]\n",
|
|
|
|
|
|
|
|
" all 128 929 0.638 0.602 0.644 0.483\n",
|
|
|
|
" all 128 929 0.638 0.602 0.644 0.483\n",
|
|
|
|
" person 128 254 0.703 0.709 0.769 0.548\n",
|
|
|
|
" person 128 254 0.703 0.709 0.769 0.548\n",
|
|
|
|
" bicycle 128 6 0.455 0.333 0.322 0.254\n",
|
|
|
|
" bicycle 128 6 0.455 0.333 0.322 0.254\n",
|
|
|
@ -451,8 +446,7 @@
|
|
|
|
" scissors 128 1 1 0 0.142 0.0426\n",
|
|
|
|
" scissors 128 1 1 0 0.142 0.0426\n",
|
|
|
|
" teddy bear 128 21 0.587 0.476 0.63 0.458\n",
|
|
|
|
" teddy bear 128 21 0.587 0.476 0.63 0.458\n",
|
|
|
|
" toothbrush 128 5 0.784 0.736 0.898 0.544\n",
|
|
|
|
" toothbrush 128 5 0.784 0.736 0.898 0.544\n",
|
|
|
|
"Speed: 0.2ms pre-process, 5.1ms inference, 0.0ms loss, 3.3ms post-process per image\n",
|
|
|
|
"Speed: 2.0ms pre-process, 4.0ms inference, 0.0ms loss, 2.5ms post-process per image\n",
|
|
|
|
"Saving runs/detect/train/predictions.json...\n",
|
|
|
|
|
|
|
|
"Results saved to \u001b[1mruns/detect/train\u001b[0m\n"
|
|
|
|
"Results saved to \u001b[1mruns/detect/train\u001b[0m\n"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -492,31 +486,30 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"cell_type": "code",
|
|
|
|
"source": [
|
|
|
|
"source": [
|
|
|
|
"!yolo mode=export model=yolov8n.pt format=torchscript"
|
|
|
|
"!yolo export model=yolov8n.pt format=torchscript"
|
|
|
|
],
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"metadata": {
|
|
|
|
"colab": {
|
|
|
|
"colab": {
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
"base_uri": "https://localhost:8080/"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"id": "CYIjW4igCjqD",
|
|
|
|
"id": "CYIjW4igCjqD",
|
|
|
|
"outputId": "3bb45917-f90e-4951-959d-7bcd26680f2e"
|
|
|
|
"outputId": "69cab2fb-cbfa-4acf-8e29-9c4fb6f4a38f"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"execution_count": null,
|
|
|
|
"execution_count": 5,
|
|
|
|
"outputs": [
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"output_type": "stream",
|
|
|
|
"output_type": "stream",
|
|
|
|
"name": "stdout",
|
|
|
|
"name": "stdout",
|
|
|
|
"text": [
|
|
|
|
"text": [
|
|
|
|
"Ultralytics YOLOv8.0.5 🚀 Python-3.8.16 torch-1.13.1+cu116 CPU\n",
|
|
|
|
"Ultralytics YOLOv8.0.24 🚀 Python-3.8.10 torch-1.13.1+cu116 CPU\n",
|
|
|
|
"Fusing layers... \n",
|
|
|
|
"YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs\n",
|
|
|
|
"YOLOv8n summary: 168 layers, 3151904 parameters, 0 gradients, 8.7 GFLOPs\n",
|
|
|
|
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"\u001b[34m\u001b[1mPyTorch:\u001b[0m starting from yolov8n.pt with output shape (1, 84, 8400) (6.2 MB)\n",
|
|
|
|
"\u001b[34m\u001b[1mPyTorch:\u001b[0m starting from yolov8n.pt with output shape (1, 84, 8400) (6.2 MB)\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"\u001b[34m\u001b[1mTorchScript:\u001b[0m starting export with torch 1.13.1+cu116...\n",
|
|
|
|
"\u001b[34m\u001b[1mTorchScript:\u001b[0m starting export with torch 1.13.1+cu116...\n",
|
|
|
|
"\u001b[34m\u001b[1mTorchScript:\u001b[0m export success ✅ 1.9s, saved as yolov8n.torchscript (12.4 MB)\n",
|
|
|
|
"\u001b[34m\u001b[1mTorchScript:\u001b[0m export success ✅ 1.7s, saved as yolov8n.torchscript (12.4 MB)\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"Export complete (2.6s)\n",
|
|
|
|
"Export complete (2.2s)\n",
|
|
|
|
"Results saved to \u001b[1m/content\u001b[0m\n",
|
|
|
|
"Results saved to \u001b[1m/content\u001b[0m\n",
|
|
|
|
"Predict: yolo task=detect mode=predict model=yolov8n.torchscript -WARNING ⚠️ not yet supported for YOLOv8 exported models\n",
|
|
|
|
"Predict: yolo task=detect mode=predict model=yolov8n.torchscript -WARNING ⚠️ not yet supported for YOLOv8 exported models\n",
|
|
|
|
"Validate: yolo task=detect mode=val model=yolov8n.torchscript -WARNING ⚠️ not yet supported for YOLOv8 exported models\n",
|
|
|
|
"Validate: yolo task=detect mode=val model=yolov8n.torchscript -WARNING ⚠️ not yet supported for YOLOv8 exported models\n",
|
|
|
|