From 80e1e7fa6efdc91a4706ad131a3af2982cd9e537 Mon Sep 17 00:00:00 2001 From: Amir Aziz <134054687+AmirAziz1221@users.noreply.github.com> Date: Mon, 24 Feb 2025 10:11:32 +0500 Subject: [PATCH] Created using Colab --- hub.ipynb | 997 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 723 insertions(+), 274 deletions(-) diff --git a/hub.ipynb b/hub.ipynb index f8b6a4b61..bc303219f 100644 --- a/hub.ipynb +++ b/hub.ipynb @@ -1,15 +1,5 @@ { "cells": [ - { - "cell_type": "markdown", - "metadata": { - "id": "view-in-github", - "colab_type": "text" - }, - "source": [ - "\"Open" - ] - }, { "cell_type": "markdown", "metadata": { @@ -51,13 +41,13 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "FyDnXd-n4c7Y", - "outputId": "99fdf8d5-8d61-4846-cbbe-066806e0bf5b" + "outputId": "6e552be2-8391-47d4-ecfd-7066c30246f0" }, "outputs": [ { @@ -65,7 +55,7 @@ "name": "stdout", "text": [ "Ultralytics 8.3.78 🚀 Python-3.11.11 torch-2.5.1+cu124 CUDA:0 (Tesla T4, 15095MiB)\n", - "Setup complete ✅ (2 CPUs, 12.7 GB RAM, 33.2/112.6 GB disk)\n" + "Setup complete ✅ (2 CPUs, 12.7 GB RAM, 33.7/112.6 GB disk)\n" ] } ], @@ -91,12 +81,39 @@ "cell_type": "code", "execution_count": null, "metadata": { - "id": "XSlZaJ9Iw_iZ", + "id": "XSlZaJ9Iw_iZ" + }, + "outputs": [], + "source": [ + "hub.login('48310fb975d1b0a23d2c6efa07ff3e714a825e1591')\n", + "\n", + "model = YOLO('https://hub.ultralytics.com/models/bo1n4qt5IUR7btlgn5z1')\n", + "results = model.train()" + ] + }, + { + "cell_type": "code", + "source": [ + "from ultralytics import YOLO\n", + "from ultralytics.hub import login\n", + "\n", + "# Login to Ultralytics HUB\n", + "hub.login('48310fb975d1b0a23d2c6efa07ff3e714a825e1591')\n", + "\n", + "# Load the trained model\n", + "model = YOLO('https://hub.ultralytics.com/models/bo1n4qt5IUR7btlgn5z1')\n", + "\n", + "# Resume training from the last checkpoint\n", + "results = model.train(resume=True)\n" + ], + "metadata": { + "id": "dlUtpmpK-Ee4", + "outputId": "61d675de-f83b-4258-df99-5b1f9aef2c07", "colab": { "base_uri": "https://localhost:8080/" - }, - "outputId": "0dee49c1-8884-4548-8ebd-76ebb4de2e4b" + } }, + "execution_count": null, "outputs": [ { "metadata": { @@ -105,9 +122,528 @@ "name": "stdout", "output_type": "stream", "text": [ - "\u001b[34m\u001b[1mUltralytics HUB: \u001b[0mNew authentication successful ✅\n", - "\u001b[34m\u001b[1mUltralytics HUB: \u001b[0mView model at https://hub.ultralytics.com/models/bo1n4qt5IUR7btlgn5z1 🚀\n", - "Downloading https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt to 'yolo11n.pt'...\n" + "\u001b[31m\u001b[1mrequirements:\u001b[0m Ultralytics requirement ['hub-sdk>=0.0.12'] not found, attempting AutoUpdate...\n", + "Collecting hub-sdk>=0.0.12\n", + " Downloading hub_sdk-0.0.18-py3-none-any.whl.metadata (10 kB)\n", + "Requirement already satisfied: requests in /usr/local/lib/python3.11/dist-packages (from hub-sdk>=0.0.12) (2.32.3)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests->hub-sdk>=0.0.12) (3.4.1)\n", + "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests->hub-sdk>=0.0.12) (3.10)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests->hub-sdk>=0.0.12) (2.3.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests->hub-sdk>=0.0.12) (2025.1.31)\n", + "Downloading hub_sdk-0.0.18-py3-none-any.whl (42 kB)\n", + " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.9/42.9 kB 4.8 MB/s eta 0:00:00\n", + "Installing collected packages: hub-sdk\n", + "Successfully installed hub-sdk-0.0.18\n", + "\n", + "\u001b[31m\u001b[1mrequirements:\u001b[0m AutoUpdate success ✅ 2.6s, installed 1 package: ['hub-sdk>=0.0.12']\n", + "\u001b[31m\u001b[1mrequirements:\u001b[0m ⚠️ \u001b[1mRestart runtime or rerun command for updates to take effect\u001b[0m\n", + "\n", + "\u001b[34m\u001b[1mUltralytics HUB: \u001b[0mNew authentication successful ✅\n", + "\u001b[34m\u001b[1mUltralytics HUB: \u001b[0mView model at https://hub.ultralytics.com/models/bo1n4qt5IUR7btlgn5z1 🚀\n", + "Downloading https://storage.googleapis.com/ultralytics-hub.appspot.com/users/Nj9w6H5S4vgdhdGujZDsLUDFT0L2/models/bo1n4qt5IUR7btlgn5z1/epoch-55.pt to 'weights/epoch-55.pt'...\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + "100%|██████████| 10.3M/10.3M [00:01<00:00, 8.36MB/s]\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING ⚠️ using HUB training arguments, ignoring local training arguments.\n", + "Ultralytics 8.3.78 🚀 Python-3.11.11 torch-2.5.1+cu124 CUDA:0 (Tesla T4, 15095MiB)\n", + "\u001b[34m\u001b[1mengine/trainer: \u001b[0mtask=detect, mode=train, model=weights/epoch-55.pt, data=https://storage.googleapis.com/ultralytics-hub.appspot.com/users/Nj9w6H5S4vgdhdGujZDsLUDFT0L2/datasets/4GvgAB9XppXH4bP87mAh/Pakistani Vehicle Dataset.zip, epochs=100, time=None, patience=100, batch=104, imgsz=640, save=True, save_period=-1, cache=None, device=None, workers=8, project=None, name=train, 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=weights/epoch-55.pt, amp=True, fraction=1.0, profile=False, freeze=None, multi_scale=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, vid_stride=1, stream_buffer=False, visualize=False, augment=False, agnostic_nms=False, classes=None, retina_masks=False, embed=None, show=False, save_frames=False, save_txt=False, save_conf=False, save_crop=False, show_labels=True, show_conf=True, show_boxes=True, line_width=None, format=torchscript, keras=False, optimize=False, int8=False, dynamic=False, simplify=True, opset=None, workspace=None, 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.0, box=7.5, cls=0.5, dfl=1.5, pose=12.0, kobj=1.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, bgr=0.0, mosaic=1.0, mixup=0.0, copy_paste=0.0, copy_paste_mode=flip, auto_augment=randaugment, erasing=0.4, crop_fraction=1.0, cfg=None, tracker=botsort.yaml, save_dir=runs/detect/train\n", + "Downloading https://storage.googleapis.com/ultralytics-hub.appspot.com/users/Nj9w6H5S4vgdhdGujZDsLUDFT0L2/datasets/4GvgAB9XppXH4bP87mAh/Pakistani Vehicle Dataset.zip to 'Pakistani Vehicle Dataset.zip'...\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + "100%|██████████| 996M/996M [00:38<00:00, 27.3MB/s]\n", + "Unzipping Pakistani Vehicle Dataset.zip to /content/datasets/Pakistani Vehicle Dataset...: 100%|██████████| 28051/28051 [00:10<00:00, 2588.95file/s]\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "Downloading https://ultralytics.com/assets/Arial.ttf to '/root/.config/Ultralytics/Arial.ttf'...\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + "100%|██████████| 755k/755k [00:00<00:00, 19.6MB/s]\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[34m\u001b[1mTensorBoard: \u001b[0mStart with 'tensorboard --logdir runs/detect/train', view at http://localhost:6006/\n", + "\n", + " from n params module arguments \n", + " 0 -1 1 464 ultralytics.nn.modules.conv.Conv [3, 16, 3, 2] \n", + " 1 -1 1 4672 ultralytics.nn.modules.conv.Conv [16, 32, 3, 2] \n", + " 2 -1 1 6640 ultralytics.nn.modules.block.C3k2 [32, 64, 1, False, 0.25] \n", + " 3 -1 1 36992 ultralytics.nn.modules.conv.Conv [64, 64, 3, 2] \n", + " 4 -1 1 26080 ultralytics.nn.modules.block.C3k2 [64, 128, 1, False, 0.25] \n", + " 5 -1 1 147712 ultralytics.nn.modules.conv.Conv [128, 128, 3, 2] \n", + " 6 -1 1 87040 ultralytics.nn.modules.block.C3k2 [128, 128, 1, True] \n", + " 7 -1 1 295424 ultralytics.nn.modules.conv.Conv [128, 256, 3, 2] \n", + " 8 -1 1 346112 ultralytics.nn.modules.block.C3k2 [256, 256, 1, True] \n", + " 9 -1 1 164608 ultralytics.nn.modules.block.SPPF [256, 256, 5] \n", + " 10 -1 1 249728 ultralytics.nn.modules.block.C2PSA [256, 256, 1] \n", + " 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n", + " 12 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1] \n", + " 13 -1 1 111296 ultralytics.nn.modules.block.C3k2 [384, 128, 1, False] \n", + " 14 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n", + " 15 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1] \n", + " 16 -1 1 32096 ultralytics.nn.modules.block.C3k2 [256, 64, 1, False] \n", + " 17 -1 1 36992 ultralytics.nn.modules.conv.Conv [64, 64, 3, 2] \n", + " 18 [-1, 13] 1 0 ultralytics.nn.modules.conv.Concat [1] \n", + " 19 -1 1 86720 ultralytics.nn.modules.block.C3k2 [192, 128, 1, False] \n", + " 20 -1 1 147712 ultralytics.nn.modules.conv.Conv [128, 128, 3, 2] \n", + " 21 [-1, 10] 1 0 ultralytics.nn.modules.conv.Concat [1] \n", + " 22 -1 1 378880 ultralytics.nn.modules.block.C3k2 [384, 256, 1, True] \n", + " 23 [16, 19, 22] 1 431842 ultralytics.nn.modules.head.Detect [6, [64, 128, 256]] \n", + "YOLO11n summary: 181 layers, 2,591,010 parameters, 2,590,994 gradients, 6.4 GFLOPs\n", + "\n", + "Transferred 499/499 items from pretrained weights\n", + "Freezing layer 'model.23.dfl.conv.weight'\n", + "\u001b[34m\u001b[1mAMP: \u001b[0mrunning Automatic Mixed Precision (AMP) checks...\n", + "Downloading https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt to 'yolo11n.pt'...\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + "100%|██████████| 5.35M/5.35M [00:00<00:00, 115MB/s]\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[34m\u001b[1mAMP: \u001b[0mchecks passed ✅\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[34m\u001b[1mtrain: \u001b[0mScanning /content/datasets/Pakistani Vehicle Dataset/train/labels... 12273 images, 1482 backgrounds, 0 corrupt: 100%|██████████| 12273/12273 [00:05<00:00, 2395.53it/s]\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[34m\u001b[1mtrain: \u001b[0mNew cache created: /content/datasets/Pakistani Vehicle Dataset/train/labels.cache\n", + "WARNING ⚠️ Box and segment counts should be equal, but got len(segments) = 1866, len(boxes) = 22229. To resolve this only boxes will be used and all segments will be removed. To avoid this please supply either a detect or segment dataset, not a detect-segment mixed dataset.\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, num_output_channels=3, method='weighted_average'), CLAHE(p=0.01, clip_limit=(1.0, 4.0), tile_grid_size=(8, 8))\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[34m\u001b[1mval: \u001b[0mScanning /content/datasets/Pakistani Vehicle Dataset/valid/labels... 1167 images, 64 backgrounds, 0 corrupt: 100%|██████████| 1167/1167 [00:00<00:00, 1411.29it/s]" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[34m\u001b[1mval: \u001b[0mNew cache created: /content/datasets/Pakistani Vehicle Dataset/valid/labels.cache\n", + "WARNING ⚠️ Box and segment counts should be equal, but got len(segments) = 368, len(boxes) = 2348. To resolve this only boxes will be used and all segments will be removed. To avoid this please supply either a detect or segment dataset, not a detect-segment mixed dataset.\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "Plotting labels to runs/detect/train/labels.jpg... \n", + "\u001b[34m\u001b[1moptimizer:\u001b[0m 'optimizer=auto' found, ignoring 'lr0=0.01' and 'momentum=0.937' and determining best 'optimizer', 'lr0' and 'momentum' automatically... \n", + "\u001b[34m\u001b[1moptimizer:\u001b[0m SGD(lr=0.01, momentum=0.9) with parameter groups 81 weight(decay=0.0), 88 weight(decay=0.0008125000000000001), 87 bias(decay=0.0)\n", + "Resuming training weights/epoch-55.pt from epoch 57 to 100 total epochs\n", + "\u001b[34m\u001b[1mTensorBoard: \u001b[0mmodel graph visualization added ✅\n", + "Image sizes 640 train, 640 val\n", + "Using 2 dataloader workers\n", + "Logging results to \u001b[1mruns/detect/train\u001b[0m\n", + "Starting training for 100 epochs...\n", + "\n", + " Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + " 57/100 14.2G 0.8002 0.6593 1.126 19 640: 100%|██████████| 119/119 [03:40<00:00, 1.85s/it]\n", + " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 6/6 [00:17<00:00, 2.89s/it]" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + " all 1167 2348 0.826 0.679 0.782 0.572\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + " 58/100 14.2G 0.7912 0.6199 1.122 1 640: 100%|██████████| 119/119 [03:42<00:00, 1.87s/it]\n", + " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 6/6 [00:17<00:00, 2.84s/it]" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + " all 1167 2348 0.828 0.691 0.773 0.569\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + " 59/100 14.2G 0.7839 0.6081 1.113 2 640: 100%|██████████| 119/119 [03:26<00:00, 1.73s/it]\n", + " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 6/6 [00:13<00:00, 2.32s/it]" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + " all 1167 2348 0.818 0.686 0.772 0.566\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + " 60/100 14.1G 0.7731 0.6017 1.106 349 640: 80%|███████▉ | 95/119 [02:43<00:46, 1.95s/it]" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING: CUDA OutOfMemoryError in TaskAlignedAssigner, using CPU\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + " 60/100 14.2G 0.7724 0.6016 1.106 7 640: 100%|██████████| 119/119 [03:31<00:00, 1.78s/it]\n", + " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 6/6 [00:12<00:00, 2.10s/it]" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + " all 1167 2348 0.804 0.709 0.779 0.569\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[34m\u001b[1mUltralytics HUB: \u001b[0mUploading checkpoint https://hub.ultralytics.com/models/bo1n4qt5IUR7btlgn5z1\n", + "\n", + " Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + " 61/100 14G 0.7639 0.5982 1.105 6 640: 100%|██████████| 119/119 [03:20<00:00, 1.69s/it]\n", + " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 6/6 [00:12<00:00, 2.00s/it]" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + " all 1167 2348 0.829 0.686 0.77 0.562\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + " 62/100 14.2G 0.7715 0.6029 1.11 348 640: 46%|████▌ | 55/119 [01:32<01:51, 1.74s/it]" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "WARNING: CUDA OutOfMemoryError in TaskAlignedAssigner, using CPU\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + " 62/100 14.2G 0.7727 0.5984 1.107 4 640: 100%|██████████| 119/119 [03:26<00:00, 1.74s/it]\n", + " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 6/6 [00:12<00:00, 2.14s/it]" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + " all 1167 2348 0.813 0.693 0.767 0.567\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stderr", + "output_type": "stream", + "text": [ + " 63/100 14.2G 0.7909 0.6 1.124 1 640: 100%|██████████| 119/119 [03:22<00:00, 1.70s/it]\n", + " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 6/6 [00:12<00:00, 2.11s/it]" + ] + }, + { + "metadata": { + "tags": null + }, + "name": "stdout", + "output_type": "stream", + "text": [ + " all 1167 2348 0.812 0.7 0.767 0.559\n" ] }, { @@ -117,7 +653,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 5.35M/5.35M [00:00<00:00, 285MB/s]" + "\n" ] }, { @@ -127,9 +663,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "Ultralytics 8.3.78 🚀 Python-3.11.11 torch-2.5.1+cu124 CUDA:0 (Tesla T4, 15095MiB)\n", - "\u001b[34m\u001b[1mengine/trainer: \u001b[0mtask=detect, mode=train, model=yolo11n.pt, data=https://storage.googleapis.com/ultralytics-hub.appspot.com/users/Nj9w6H5S4vgdhdGujZDsLUDFT0L2/datasets/4GvgAB9XppXH4bP87mAh/Pakistani Vehicle Dataset.zip, epochs=100, time=None, patience=100, batch=-1, imgsz=640, save=True, save_period=-1, cache=None, device=None, workers=8, project=None, name=train, 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, freeze=None, multi_scale=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, vid_stride=1, stream_buffer=False, visualize=False, augment=False, agnostic_nms=False, classes=None, retina_masks=False, embed=None, show=False, save_frames=False, save_txt=False, save_conf=False, save_crop=False, show_labels=True, show_conf=True, show_boxes=True, line_width=None, format=torchscript, keras=False, optimize=False, int8=False, dynamic=False, simplify=True, opset=None, workspace=None, 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, 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, bgr=0.0, mosaic=1.0, mixup=0.0, copy_paste=0.0, copy_paste_mode=flip, auto_augment=randaugment, erasing=0.4, crop_fraction=1.0, cfg=None, tracker=botsort.yaml, save_dir=runs/detect/train\n", - "Downloading https://storage.googleapis.com/ultralytics-hub.appspot.com/users/Nj9w6H5S4vgdhdGujZDsLUDFT0L2/datasets/4GvgAB9XppXH4bP87mAh/Pakistani Vehicle Dataset.zip to 'Pakistani Vehicle Dataset.zip'...\n" + "\n", + " Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n" ] }, { @@ -139,9 +674,8 @@ "name": "stderr", "output_type": "stream", "text": [ - "\n", - "100%|██████████| 996M/996M [01:23<00:00, 12.5MB/s]\n", - "Unzipping Pakistani Vehicle Dataset.zip to /content/datasets/Pakistani Vehicle Dataset...: 100%|██████████| 28051/28051 [00:10<00:00, 2623.42file/s]\n" + " 64/100 13.9G 0.7667 0.6144 1.103 11 640: 100%|██████████| 119/119 [03:22<00:00, 1.70s/it]\n", + " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 6/6 [00:13<00:00, 2.29s/it]" ] }, { @@ -151,7 +685,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Downloading https://ultralytics.com/assets/Arial.ttf to '/root/.config/Ultralytics/Arial.ttf'...\n" + " all 1167 2348 0.825 0.703 0.773 0.566\n" ] }, { @@ -161,7 +695,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 755k/755k [00:00<00:00, 114MB/s]\n" + "\n" ] }, { @@ -171,40 +705,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "Overriding model.yaml nc=80 with nc=6\n", - "\n", - " from n params module arguments \n", - " 0 -1 1 464 ultralytics.nn.modules.conv.Conv [3, 16, 3, 2] \n", - " 1 -1 1 4672 ultralytics.nn.modules.conv.Conv [16, 32, 3, 2] \n", - " 2 -1 1 6640 ultralytics.nn.modules.block.C3k2 [32, 64, 1, False, 0.25] \n", - " 3 -1 1 36992 ultralytics.nn.modules.conv.Conv [64, 64, 3, 2] \n", - " 4 -1 1 26080 ultralytics.nn.modules.block.C3k2 [64, 128, 1, False, 0.25] \n", - " 5 -1 1 147712 ultralytics.nn.modules.conv.Conv [128, 128, 3, 2] \n", - " 6 -1 1 87040 ultralytics.nn.modules.block.C3k2 [128, 128, 1, True] \n", - " 7 -1 1 295424 ultralytics.nn.modules.conv.Conv [128, 256, 3, 2] \n", - " 8 -1 1 346112 ultralytics.nn.modules.block.C3k2 [256, 256, 1, True] \n", - " 9 -1 1 164608 ultralytics.nn.modules.block.SPPF [256, 256, 5] \n", - " 10 -1 1 249728 ultralytics.nn.modules.block.C2PSA [256, 256, 1] \n", - " 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n", - " 12 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1] \n", - " 13 -1 1 111296 ultralytics.nn.modules.block.C3k2 [384, 128, 1, False] \n", - " 14 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] \n", - " 15 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1] \n", - " 16 -1 1 32096 ultralytics.nn.modules.block.C3k2 [256, 64, 1, False] \n", - " 17 -1 1 36992 ultralytics.nn.modules.conv.Conv [64, 64, 3, 2] \n", - " 18 [-1, 13] 1 0 ultralytics.nn.modules.conv.Concat [1] \n", - " 19 -1 1 86720 ultralytics.nn.modules.block.C3k2 [192, 128, 1, False] \n", - " 20 -1 1 147712 ultralytics.nn.modules.conv.Conv [128, 128, 3, 2] \n", - " 21 [-1, 10] 1 0 ultralytics.nn.modules.conv.Concat [1] \n", - " 22 -1 1 378880 ultralytics.nn.modules.block.C3k2 [384, 256, 1, True] \n", - " 23 [16, 19, 22] 1 431842 ultralytics.nn.modules.head.Detect [6, [64, 128, 256]] \n", - "YOLO11n summary: 181 layers, 2,591,010 parameters, 2,590,994 gradients, 6.4 GFLOPs\n", "\n", - "Transferred 448/499 items from pretrained weights\n", - "\u001b[34m\u001b[1mTensorBoard: \u001b[0mStart with 'tensorboard --logdir runs/detect/train', view at http://localhost:6006/\n", - "Freezing layer 'model.23.dfl.conv.weight'\n", - "\u001b[34m\u001b[1mAMP: \u001b[0mrunning Automatic Mixed Precision (AMP) checks...\n", - "\u001b[34m\u001b[1mAMP: \u001b[0mchecks passed ✅\n" + " Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size\n" ] }, { @@ -214,7 +716,8 @@ "name": "stderr", "output_type": "stream", "text": [ - "\u001b[34m\u001b[1mtrain: \u001b[0mScanning /content/datasets/Pakistani Vehicle Dataset/train/labels... 12273 images, 1482 backgrounds, 0 corrupt: 100%|██████████| 12273/12273 [00:05<00:00, 2251.16it/s]\n" + " 65/100 14.1G 0.7695 0.5898 1.107 1 640: 100%|██████████| 119/119 [03:22<00:00, 1.70s/it]\n", + " Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 6/6 [00:12<00:00, 2.03s/it]" ] }, { @@ -224,18 +727,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "\u001b[34m\u001b[1mtrain: \u001b[0mNew cache created: /content/datasets/Pakistani Vehicle Dataset/train/labels.cache\n", - "WARNING ⚠️ Box and segment counts should be equal, but got len(segments) = 1866, len(boxes) = 22229. To resolve this only boxes will be used and all segments will be removed. To avoid this please supply either a detect or segment dataset, not a detect-segment mixed dataset.\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, num_output_channels=3, method='weighted_average'), CLAHE(p=0.01, clip_limit=(1.0, 4.0), tile_grid_size=(8, 8))\n", - "\u001b[34m\u001b[1mAutoBatch: \u001b[0mComputing optimal batch size for imgsz=640 at 60.0% CUDA memory utilization.\n", - "\u001b[34m\u001b[1mAutoBatch: \u001b[0mCUDA:0 (Tesla T4) 14.74G total, 0.10G reserved, 0.06G allocated, 14.58G free\n", - " Params GFLOPs GPU_mem (GB) forward (ms) backward (ms) input output\n", - " 2591010 6.446 0.457 48.41 342.5 (1, 3, 640, 640) list\n", - " 2591010 12.89 0.606 28.91 108.4 (2, 3, 640, 640) list\n", - " 2591010 25.78 0.919 47.55 148.8 (4, 3, 640, 640) list\n", - " 2591010 51.57 1.560 42.16 156.1 (8, 3, 640, 640) list\n", - " 2591010 103.1 2.802 54.23 118.3 (16, 3, 640, 640) list\n", - "\u001b[34m\u001b[1mAutoBatch: \u001b[0mUsing batch-size 104 for CUDA:0 8.92G/14.74G (60%) ✅\n" + " all 1167 2348 0.802 0.699 0.768 0.568\n" ] }, { @@ -245,7 +737,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "\u001b[34m\u001b[1mtrain: \u001b[0mScanning /content/datasets/Pakistani Vehicle Dataset/train/labels.cache... 12273 images, 1482 backgrounds, 0 corrupt: 100%|██████████| 12273/12273 [00:00