Files
paint_defect_detection/Paint_defect_ddetection.ipynb
2026-10-28 17:27:32 +05:30

139 KiB

In [1]:
!pip install -U ultralytics
Collecting ultralytics
  Downloading ultralytics-8.4.191-py3-none-any.whl.metadata (47 kB)
Requirement already satisfied: numpy>=1.23.0 in /usr/local/lib/python3.13/dist-packages (from ultralytics) (2.1.3)
Requirement already satisfied: matplotlib>=3.3.0 in /usr/local/lib/python3.13/dist-packages (from ultralytics) (3.10.0)
Requirement already satisfied: opencv-python!=4.13.0.90,>=4.7.0 in /usr/local/lib/python3.13/dist-packages (from ultralytics) (5.0.0.93)
Requirement already satisfied: pillow>=7.1.2 in /usr/local/lib/python3.13/dist-packages (from ultralytics) (11.3.0)
Requirement already satisfied: pyyaml>=5.3.1 in /usr/local/lib/python3.13/dist-packages (from ultralytics) (6.0.3)
Requirement already satisfied: requests>=2.23.0 in /usr/local/lib/python3.13/dist-packages (from ultralytics) (2.32.4)
Requirement already satisfied: torch>=1.8.0 in /usr/local/lib/python3.13/dist-packages (from ultralytics) (2.11.0+cu130)
Requirement already satisfied: torchvision>=0.9.0 in /usr/local/lib/python3.13/dist-packages (from ultralytics) (0.26.0+cu130)
Requirement already satisfied: psutil>=5.8.0 in /usr/local/lib/python3.13/dist-packages (from ultralytics) (5.9.5)
Requirement already satisfied: polars>=0.20.0 in /usr/local/lib/python3.13/dist-packages (from ultralytics) (1.35.2)
Requirement already satisfied: nvidia-ml-py>=12.0.0 in /usr/local/lib/python3.13/dist-packages (from ultralytics) (13.615.71)
Collecting ultralytics-thop>=2.2.3 (from ultralytics)
  Downloading ultralytics_thop-2.2.3-py3-none-any.whl.metadata (14 kB)
Collecting ultralytics-platform>=0.1.45 (from ultralytics)
  Downloading ultralytics_platform-0.1.100-py3-none-any.whl.metadata (17 kB)
Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.13/dist-packages (from matplotlib>=3.3.0->ultralytics) (1.4.0)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.13/dist-packages (from matplotlib>=3.3.0->ultralytics) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.13/dist-packages (from matplotlib>=3.3.0->ultralytics) (4.67.0)
Requirement already satisfied: kiwisolver>=1.3.1 in /usr/local/lib/python3.13/dist-packages (from matplotlib>=3.3.0->ultralytics) (1.5.1)
Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.13/dist-packages (from matplotlib>=3.3.0->ultralytics) (26.3)
Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.13/dist-packages (from matplotlib>=3.3.0->ultralytics) (3.3.3)
Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.13/dist-packages (from matplotlib>=3.3.0->ultralytics) (2.9.0.post0)
Requirement already satisfied: polars-runtime-32==1.35.2 in /usr/local/lib/python3.13/dist-packages (from polars>=0.20.0->ultralytics) (1.35.2)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.13/dist-packages (from python-dateutil>=2.7->matplotlib>=3.3.0->ultralytics) (1.17.0)
Requirement already satisfied: charset_normalizer<4,>=2 in /usr/local/lib/python3.13/dist-packages (from requests>=2.23.0->ultralytics) (3.4.9)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.13/dist-packages (from requests>=2.23.0->ultralytics) (3.20)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.13/dist-packages (from requests>=2.23.0->ultralytics) (2.5.0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.13/dist-packages (from requests>=2.23.0->ultralytics) (2026.10.23)
Requirement already satisfied: filelock in /usr/local/lib/python3.13/dist-packages (from torch>=1.8.0->ultralytics) (4.2.4)
Requirement already satisfied: typing-extensions>=4.10.0 in /usr/local/lib/python3.13/dist-packages (from torch>=1.8.0->ultralytics) (4.16.0)
Requirement already satisfied: setuptools<82 in /usr/local/lib/python3.13/dist-packages (from torch>=1.8.0->ultralytics) (80.10.2)
Requirement already satisfied: sympy>=1.13.3 in /usr/local/lib/python3.13/dist-packages (from torch>=1.8.0->ultralytics) (1.14.0)
Requirement already satisfied: networkx>=2.5.1 in /usr/local/lib/python3.13/dist-packages (from torch>=1.8.0->ultralytics) (3.7)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.13/dist-packages (from torch>=1.8.0->ultralytics) (3.1.6)
Requirement already satisfied: fsspec>=0.8.5 in /usr/local/lib/python3.13/dist-packages (from torch>=1.8.0->ultralytics) (2025.12.0)
Requirement already satisfied: cuda-toolkit==13.0.2 in /usr/local/lib/python3.13/dist-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=1.8.0->ultralytics) (13.0.2)
Requirement already satisfied: cuda-bindings<14,>=13.0.3 in /usr/local/lib/python3.13/dist-packages (from torch>=1.8.0->ultralytics) (13.0.3)
Requirement already satisfied: nvidia-cudnn-cu13==9.19.0.56 in /usr/local/lib/python3.13/dist-packages (from torch>=1.8.0->ultralytics) (9.19.0.56)
Requirement already satisfied: nvidia-cusparselt-cu13==0.8.0 in /usr/local/lib/python3.13/dist-packages (from torch>=1.8.0->ultralytics) (0.8.0)
Requirement already satisfied: nvidia-nccl-cu13==2.28.9 in /usr/local/lib/python3.13/dist-packages (from torch>=1.8.0->ultralytics) (2.28.9)
Requirement already satisfied: nvidia-nvshmem-cu13==3.4.5 in /usr/local/lib/python3.13/dist-packages (from torch>=1.8.0->ultralytics) (3.4.5)
Requirement already satisfied: triton==3.6.0 in /usr/local/lib/python3.13/dist-packages (from torch>=1.8.0->ultralytics) (3.6.0)
Requirement already satisfied: nvidia-cublas==13.1.0.3.* in /usr/local/lib/python3.13/dist-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=1.8.0->ultralytics) (13.1.0.3)
Requirement already satisfied: nvidia-cuda-runtime==13.0.96.* in /usr/local/lib/python3.13/dist-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=1.8.0->ultralytics) (13.0.96)
Requirement already satisfied: nvidia-cufft==12.0.0.61.* in /usr/local/lib/python3.13/dist-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=1.8.0->ultralytics) (12.0.0.61)
Requirement already satisfied: nvidia-cufile==1.15.1.6.* in /usr/local/lib/python3.13/dist-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=1.8.0->ultralytics) (1.15.1.6)
Requirement already satisfied: nvidia-cuda-cupti==13.0.85.* in /usr/local/lib/python3.13/dist-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=1.8.0->ultralytics) (13.0.85)
Requirement already satisfied: nvidia-curand==10.4.0.35.* in /usr/local/lib/python3.13/dist-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=1.8.0->ultralytics) (10.4.0.35)
Requirement already satisfied: nvidia-cusolver==12.0.4.66.* in /usr/local/lib/python3.13/dist-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=1.8.0->ultralytics) (12.0.4.66)
Requirement already satisfied: nvidia-cusparse==12.6.3.3.* in /usr/local/lib/python3.13/dist-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=1.8.0->ultralytics) (12.6.3.3)
Requirement already satisfied: nvidia-nvjitlink==13.0.88.* in /usr/local/lib/python3.13/dist-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=1.8.0->ultralytics) (13.0.88)
Requirement already satisfied: nvidia-cuda-nvrtc==13.0.88.* in /usr/local/lib/python3.13/dist-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=1.8.0->ultralytics) (13.0.88)
Requirement already satisfied: nvidia-nvtx==13.0.85.* in /usr/local/lib/python3.13/dist-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==13.0.2; platform_system == "Linux"->torch>=1.8.0->ultralytics) (13.0.85)
Requirement already satisfied: cuda-pathfinder~=1.1 in /usr/local/lib/python3.13/dist-packages (from cuda-bindings<14,>=13.0.3->torch>=1.8.0->ultralytics) (1.8.4)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.13/dist-packages (from sympy>=1.13.3->torch>=1.8.0->ultralytics) (1.3.0)
Requirement already satisfied: httpx<1,>=0.28 in /usr/local/lib/python3.13/dist-packages (from ultralytics-platform>=0.1.45->ultralytics) (0.28.1)
Requirement already satisfied: anyio in /usr/local/lib/python3.13/dist-packages (from httpx<1,>=0.28->ultralytics-platform>=0.1.45->ultralytics) (4.15.1)
Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.13/dist-packages (from httpx<1,>=0.28->ultralytics-platform>=0.1.45->ultralytics) (1.0.9)
Requirement already satisfied: h11>=0.16 in /usr/local/lib/python3.13/dist-packages (from httpcore==1.*->httpx<1,>=0.28->ultralytics-platform>=0.1.45->ultralytics) (0.16.0)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.13/dist-packages (from jinja2->torch>=1.8.0->ultralytics) (3.0.4)
Downloading ultralytics-8.4.191-py3-none-any.whl (1.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 39.1 MB/s  0:00:00
[?25hDownloading ultralytics_platform-0.1.100-py3-none-any.whl (99 kB)
Downloading ultralytics_thop-2.2.3-py3-none-any.whl (32 kB)
Installing collected packages: ultralytics-platform, ultralytics-thop, ultralytics
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3/3 [ultralytics]
Successfully installed ultralytics-8.4.191 ultralytics-platform-0.1.100 ultralytics-thop-2.2.3
In [2]:


import os
os.makedirs("/content/drive/MyDrive/paint_defect_training", exist_ok=True)

import torch
print("GPU available:", torch.cuda.is_available())
if torch.cuda.is_available():
    print("GPU:", torch.cuda.get_device_name(0))
GPU available: True
GPU: Tesla T4
In [3]:

from pathlib import Path

drive_path = Path("/content/drive/MyDrive")

for p in drive_path.iterdir():
    print(p.name)
Colab Notebooks
single_20250521_151734.jpg
single_20250521_151735.jpg
single_20250521_151736.jpg
single_20250521_151739.jpg
single_20250521_151738.jpg
single_20250521_151744.jpg
single_20250521_151805.jpg
single_20250521_151804.jpg
single_20250521_151806.jpg
single_20250521_151809.jpg
single_20250521_151808.jpg
single_20250521_151815.jpg
single_20250521_151816.jpg
single_20250521_151824.jpg
single_20250521_151825.jpg
Gun Detection
Roll_stopper
predict
predict2
predict3
predict4
predict5
predict6
predict7
predict8
predict9
predict10
predict11
predict12
predict13
predict14
flying_objects
roll_stopper.v4i.yolov8
image_generation.7z
image_generation (1).zip
YOGA.pdf
MALHAR.pdf
shivani_offerletter.pdf
invoice.docx
Invoice.gsheet
invoice_data (2).json
invoice_data (3).json
invoice_data (1).json
INVOICES FOR OCR.zip
invoice_database (1).docx
14936-pages (2).pdf
invoice_database.docx
PHARMACEA LINK _FREE GOODS (1).pdf
invoice_data.json
gcp.py
final_new (1).py
PHARMACEA LINK _FREE GOODS.pdf
best.pt
Screenshot from 2026-01-20 17-17-37.png
helmet-dataset
YOLO26_Runs
deepstream_dashboard.py
app_helmet (1).py
OllamaSetup.txt
patient_1124807 .json
patient_17319.json
patient_16035.json
patient_11042.json
patient_10237 (1).json
patient_10109 .json
Patients
80 of 100 ephocs o img sz 640
ppe.pt
TKILDashboard
tkil.jpeg
final_new.py
IMG_20260501_080140_724.webp
Picture1 (1).png
a.py
my_abbrev_model.zip
image_generation.zip
NITIN AGEN 1 (1).pdf
NITIN AGEN 1.pdf
dmhtxt.txt
prompts_dmh.txt
mm.docx
stopper_person
PPE_Detection_Two_Day_Report (1).docx
Shivani Salary Slip.xlsx - Payslip Jan-2026 (4).pdf
Picture1.png
degree_cer.jpeg
AADHAR.pdf
img.jpeg
salary.pdf
12th_cer (1).pdf
12th_cer.pdf
10th_cer.pdf
10th_result.pdf
pancard.pdf
12th_result.pdf
voting_card.pdf
PASSBOOK.jpeg
Shivani Job offer letter.pdf
SIGN.jpeg
114945-702640230.mp4
Shivani_Vilas_Patil.pdf
dmh bill no.8504 (1).pdf
Drowziness.gsheet
Untitled spreadsheet.gsheet
handwritten_extraction
paint_defect_training
In [4]:

from pathlib import Path
import yaml

DATASET_DIR = "/content/drive/MyDrive/paint_defect_training"

root = Path(DATASET_DIR).resolve()
yaml_path = root / "data.yaml"

print("Dataset exists:", root.exists())
print("YAML exists:", yaml_path.exists())
print("Folders:", [p.name for p in root.iterdir()])
Dataset exists: True
YAML exists: True
Folders: ['README.roboflow.txt', 'README.dataset.txt', 'data.yaml', 'test', 'valid', 'train', 'data_colab.yaml']
In [5]:

with open(yaml_path, "r") as f:
    config = yaml.safe_load(f)

print("Classes:", config["names"])
print("Number of classes:", config["nc"])

for split in ["train", "valid", "test"]:
    image_dir = root / split / "images"

    if image_dir.exists():
        count = sum(
            1 for p in image_dir.iterdir()
            if p.suffix.lower() in
            {".jpg", ".jpeg", ".png", ".bmp", ".webp"}
        )
        print(f"{split}: {count} images")
    else:
        print(f"{split}: folder not found")
Classes: ['Oil Marks', 'Orange Peel', 'Paint sagging', 'Peel Off', 'Scratches', 'Water Marks', 'bubbling']
Number of classes: 7
train: 1464 images
valid: 140 images
test: 68 images
In [6]:
from pathlib import Path
import yaml

root = Path(DATASET_DIR).resolve()
yaml_path = root / "data.yaml"

with open(yaml_path, "r") as f:
    data = yaml.safe_load(f)

data["path"] = str(root)
data["train"] = "train/images"
data["val"] = "valid/images"
data["test"] = "test/images"

DATA_YAML = root / "data_colab.yaml"

with open(DATA_YAML, "w") as f:
    yaml.safe_dump(data, f, sort_keys=False)

print(DATA_YAML.read_text())
train: train/images
val: valid/images
test: test/images
nc: 7
names:
- Oil Marks
- Orange Peel
- Paint sagging
- Peel Off
- Scratches
- Water Marks
- bubbling
roboflow:
  workspace: buildwellai
  project: paint-defects-u2wuj-sor3g
  version: 1
  license: CC BY 4.0
path: /content/drive/MyDrive/paint_defect_training

In [7]:
import torch
import ultralytics

print("Ultralytics:", ultralytics.__version__)
print("GPU available:", torch.cuda.is_available())

if torch.cuda.is_available():
    print("GPU:", torch.cuda.get_device_name(0))
else:
    raise RuntimeError(
        "Enable a GPU in Runtime > Change runtime type."
    )
Creating new Ultralytics Settings v0.0.8 file ✅ 
View Ultralytics Settings with 'yolo settings' or at '/root/.config/Ultralytics/settings.json'
Update Settings with 'yolo settings key=value', i.e. 'yolo settings runs_dir=path/to/dir'. For help see https://docs.ultralytics.com/usage/settings.
Ultralytics: 8.4.191
GPU available: True
GPU: Tesla T4
In [8]:

from ultralytics import YOLO
from pathlib import Path

MODEL_NAME = "yolo26s.pt"

# Load pretrained YOLO26 weights.
model = YOLO(MODEL_NAME)

results = model.train(
    data=str(DATA_YAML),

    # Training duration
    epochs=100,
    patience=25,

    # Resolution: useful starting point for small defects
    imgsz=832,

    # Start conservatively on a Colab T4
    batch=8,
    device=0,
    workers=2,
    amp=True,

    # Fine-tuning optimizer settings
    optimizer="AdamW",
    lr0=0.001,
    lrf=0.01,
    weight_decay=0.0005,
    warmup_epochs=3,

    # Moderate augmentation for surface inspection
    hsv_h=0.01,
    hsv_s=0.30,
    hsv_v=0.20,
    degrees=3.0,
    translate=0.05,
    scale=0.20,
    fliplr=0.5,
    flipud=0.0,
    mosaic=0.5,
    mixup=0.0,
    close_mosaic=10,

    # Reproducibility and checkpoint saving
    seed=42,
    deterministic=True,
    save=True,
    save_period=10,

    # Store results on Google Drive
    project="/content/drive/MyDrive/paint_defect_training",
    name="yolo26s_832",
    exist_ok=True,
    plots=True,
    verbose=True,
)

print("Training completed.")
Downloading https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26s.pt to 'yolo26s.pt': 100% ━━━━━━━━━━━━ 19.5MB 168.1MB/s 0.1s
Ultralytics 8.4.191 🚀 Python-3.13.16 torch-2.11.0+cu130 CUDA:0 (Tesla T4, 14913MiB)
engine/trainer: agnostic_nms=False, amp=True, angle=1.0, augment=False, auto_augment=randaugment, batch=8, bgr=0.0, box=7.5, cache=False, cfg=None, channels_last=None, classes=None, close_mosaic=10, cls=0.5, cls_pw=0.0, cls_remap=True, compile=False, conf=None, copy_paste=0.0, copy_paste_mode=flip, cos_lr=False, cutmix=0.0, data=/content/drive/MyDrive/paint_defect_training/data_colab.yaml, degrees=3.0, deterministic=True, device=0, dfl=1.5, dgrad=0.5, dis=6.0, distill_model=None, dlam=1.0, dlog=1.0, dnn=False, dropout=0.0, dynamic=False, embed=None, epochs=100, erasing=0.4, exist_ok=True, fliplr=0.5, flipud=0.0, format=torchscript, fraction=1.0, freeze=None, hsv_h=0.01, hsv_s=0.3, hsv_v=0.2, imgsz=832, iou=0.7, kobj=1.0, line_width=None, lr0=0.001, lrf=0.01, mask_ratio=4, max_det=300, mixup=0.0, mode=train, model=yolo26s.pt, momentum=0.937, mosaic=0.5, multi_scale=0.0, name=yolo26s_832, nbs=64, nms=None, opset=None, optimize=False, optimizer=AdamW, overlap_mask=True, patience=25, perspective=0.0, plots=True, pose=12.0, pretrained=True, profile=False, project=/content/drive/MyDrive/paint_defect_training, quantize=None, rect=False, resume=False, retina_masks=False, rle=1.0, save=True, save_conf=False, save_crop=False, save_dir=/content/drive/MyDrive/paint_defect_training/yolo26s_832, save_frames=False, save_json=False, save_period=10, save_txt=False, scale=0.2, seed=42, shear=0.0, show=False, show_boxes=True, show_conf=True, show_labels=True, simplify=True, single_cls=False, source=None, split=val, stream_buffer=False, task=detect, time=None, tracker=tracktrack.yaml, translate=0.05, val=True, verbose=True, vid_stride=1, visualize=False, warmup_bias_lr=0.1, warmup_epochs=3, warmup_momentum=0.8, weight_decay=0.0005, workers=2, workspace=None
Downloading https://ultralytics.com/assets/Arial.ttf to '/root/.config/Ultralytics/Arial.ttf': 100% ━━━━━━━━━━━━ 755.1KB 25.9MB/s 0.0s
Overriding model.yaml nc=80 with nc=7

                   from  n    params  module                                       arguments                     
  0                  -1  1       928  ultralytics.nn.modules.conv.Conv             [3, 32, 3, 2]                 
  1                  -1  1     18560  ultralytics.nn.modules.conv.Conv             [32, 64, 3, 2]                
  2                  -1  1     26080  ultralytics.nn.modules.block.C3k2            [64, 128, 1, False, 0.25]     
  3                  -1  1    147712  ultralytics.nn.modules.conv.Conv             [128, 128, 3, 2]              
  4                  -1  1    103360  ultralytics.nn.modules.block.C3k2            [128, 256, 1, False, 0.25]    
  5                  -1  1    590336  ultralytics.nn.modules.conv.Conv             [256, 256, 3, 2]              
  6                  -1  1    346112  ultralytics.nn.modules.block.C3k2            [256, 256, 1, True]           
  7                  -1  1   1180672  ultralytics.nn.modules.conv.Conv             [256, 512, 3, 2]              
  8                  -1  1   1380352  ultralytics.nn.modules.block.C3k2            [512, 512, 1, True]           
  9                  -1  1    656896  ultralytics.nn.modules.block.SPPF            [512, 512, 5, 3, True]        
 10                  -1  1    990976  ultralytics.nn.modules.block.C2PSA           [512, 512, 1]                 
 11                  -1  1         0  torch.nn.modules.upsampling.Upsample         [None, 2, 'nearest']          
 12             [-1, 6]  1         0  ultralytics.nn.modules.conv.Concat           [1]                           
 13                  -1  1    477184  ultralytics.nn.modules.block.C3k2            [768, 256, 1, True]           
 14                  -1  1         0  torch.nn.modules.upsampling.Upsample         [None, 2, 'nearest']          
 15             [-1, 4]  1         0  ultralytics.nn.modules.conv.Concat           [1]                           
 16                  -1  1    136192  ultralytics.nn.modules.block.C3k2            [512, 128, 1, True]           
 17                  -1  1    147712  ultralytics.nn.modules.conv.Conv             [128, 128, 3, 2]              
 18            [-1, 13]  1         0  ultralytics.nn.modules.conv.Concat           [1]                           
 19                  -1  1    378880  ultralytics.nn.modules.block.C3k2            [384, 256, 1, True]           
 20                  -1  1    590336  ultralytics.nn.modules.conv.Conv             [256, 256, 3, 2]              
 21            [-1, 10]  1         0  ultralytics.nn.modules.conv.Concat           [1]                           
 22                  -1  1   1843712  ultralytics.nn.modules.block.C3k2            [768, 512, 1, True, 0.5, True]
 23        [16, 19, 22]  1    937282  ultralytics.nn.modules.head.Detect           [7, 1, True, [128, 256, 512]] 
YOLO26s summary: 260 layers, 9,953,282 parameters, 9,953,282 gradients, 22.8 GFLOPs

Transferred 696/708 items from pretrained weights
AMP: running Automatic Mixed Precision (AMP) checks...
AMP: downloading yolo26n.pt for AMP checks (one-time, not used for training)...
Downloading https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26n.pt to 'weights/yolo26n.pt': 100% ━━━━━━━━━━━━ 5.3MB 91.4MB/s 0.1s
AMP: checks passed ✅
WARNING ⚠️ train: Slow image access detected (ping: 1.3±0.9 ms, read: 0.1±0.1 MB/s, size: 43.5 KB). Use local storage instead of remote/mounted storage for better performance. See https://docs.ultralytics.com/guides/model-training-tips
train: Scanning /content/drive/MyDrive/paint_defect_training/train/labels... 1464 images, 0 backgrounds, 0 corrupt: 100% ━━━━━━━━━━━━ 1464/1464 2.2it/s 10:51
train: New cache created: /content/drive/MyDrive/paint_defect_training/train/labels.cache
albumentations: Blur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01, method='weighted_average', num_output_channels=3), CLAHE(p=0.01, clip_limit=(1.0, 4.0), tile_grid_size=(8, 8))
WARNING ⚠️ val: Slow image access detected (ping: 0.7±0.6 ms, read: 0.9±1.8 MB/s, size: 19.8 KB). Use local storage instead of remote/mounted storage for better performance. See https://docs.ultralytics.com/guides/model-training-tips
val: Scanning /content/drive/MyDrive/paint_defect_training/valid/labels... 140 images, 0 backgrounds, 0 corrupt: 100% ━━━━━━━━━━━━ 140/140 2.3it/s 1:00
val: New cache created: /content/drive/MyDrive/paint_defect_training/valid/labels.cache
optimizer: AdamW(lr=0.001, momentum=0.937) with parameter groups 114 weight(decay=0.0), 126 weight(decay=0.0005), 126 bias(decay=0.0)
Plotting labels to /content/drive/MyDrive/paint_defect_training/yolo26s_832/labels.jpg... 
Using 1464 train, 140 val images for fraction=1.0 at imgsz=832
Using 2 dataloader workers
Logging results to /content/drive/MyDrive/paint_defect_training/yolo26s_832
Starting training for 100 epochs...

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
      1/100      4.14G      1.952      8.281    0.04672          9        832: 100% ━━━━━━━━━━━━ 183/183 3.7it/s 49.2s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 2.5it/s 3.7s
                   all        140        147      0.651      0.104      0.126     0.0383

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
      2/100      5.23G      1.858      3.761    0.04464         16        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.4s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.5it/s 2.0s
                   all        140        147      0.171      0.315      0.147     0.0484

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
      3/100      5.23G      1.867      3.499    0.04438         13        832: 100% ━━━━━━━━━━━━ 183/183 3.8it/s 48.4s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147       0.41      0.202      0.212     0.0613

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
      4/100      5.23G      1.861      3.214    0.04441         15        832: 100% ━━━━━━━━━━━━ 183/183 3.7it/s 49.1s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.422      0.263      0.276     0.0893

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
      5/100      5.23G      1.825      3.014    0.04279         15        832: 100% ━━━━━━━━━━━━ 183/183 3.8it/s 48.3s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.6it/s 2.0s
                   all        140        147      0.308      0.386      0.327      0.111

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
      6/100      5.23G       1.84      2.884    0.04425         10        832: 100% ━━━━━━━━━━━━ 183/183 3.7it/s 49.8s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.4it/s 2.1s
                   all        140        147      0.323      0.401      0.256     0.0949

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
      7/100      5.23G      1.826      2.803    0.04278         10        832: 100% ━━━━━━━━━━━━ 183/183 3.8it/s 47.6s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.6it/s 2.0s
                   all        140        147       0.27      0.495      0.381      0.157

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
      8/100      5.23G      1.783        2.6    0.04222         13        832: 100% ━━━━━━━━━━━━ 183/183 3.7it/s 49.3s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.5it/s 2.0s
                   all        140        147      0.381       0.46      0.437       0.17

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
      9/100      5.23G      1.793       2.48    0.04212          8        832: 100% ━━━━━━━━━━━━ 183/183 3.7it/s 48.8s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.568      0.589      0.569      0.225

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     10/100      5.23G      1.755      2.412    0.04151         15        832: 100% ━━━━━━━━━━━━ 183/183 3.7it/s 48.9s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.496      0.482      0.536      0.194

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     11/100      5.23G      1.764       2.24    0.04187         13        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.7s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147       0.54      0.523      0.536      0.203

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     12/100      5.23G      1.734      2.197    0.04109         12        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.2s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.645      0.566       0.62      0.256

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     13/100      5.23G      1.724      2.091    0.04077         12        832: 100% ━━━━━━━━━━━━ 183/183 3.7it/s 50.1s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.6it/s 2.0s
                   all        140        147      0.602       0.62      0.602       0.23

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     14/100      5.23G      1.723      2.023    0.04061         13        832: 100% ━━━━━━━━━━━━ 183/183 3.8it/s 47.7s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.758      0.697      0.763      0.315

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     15/100      5.23G      1.754      1.935    0.04193         15        832: 100% ━━━━━━━━━━━━ 183/183 3.7it/s 49.5s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.6it/s 1.9s
                   all        140        147      0.648      0.643      0.666      0.276

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     16/100      5.23G      1.733      1.824    0.04107         18        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.2s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.6it/s 1.9s
                   all        140        147      0.671      0.642      0.681      0.268

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     17/100      5.23G      1.694      1.792    0.03986         15        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.5s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.659      0.723      0.718      0.301

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     18/100      5.23G      1.693      1.683    0.03965         14        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.5s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.6it/s 2.0s
                   all        140        147      0.656      0.707      0.699      0.265

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     19/100      5.23G       1.68      1.662    0.03877         15        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.2s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.6it/s 2.0s
                   all        140        147      0.724      0.705      0.716        0.3

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     20/100      5.23G      1.669      1.655    0.03889         14        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.1s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.6it/s 1.9s
                   all        140        147      0.734      0.664       0.72      0.288

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     21/100      5.23G      1.651      1.528    0.03887         15        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.9s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.727      0.753      0.757      0.316

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     22/100      5.23G      1.635      1.454    0.03833         19        832: 100% ━━━━━━━━━━━━ 183/183 3.7it/s 49.3s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.5it/s 2.0s
                   all        140        147      0.786      0.676      0.746      0.299

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     23/100      5.23G      1.672      1.423    0.03927         15        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.3s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.782      0.677       0.71      0.284

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     24/100      5.23G      1.635      1.402    0.03875         13        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.4s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.785      0.796      0.787      0.324

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     25/100      5.23G      1.593      1.326    0.03687         17        832: 100% ━━━━━━━━━━━━ 183/183 3.7it/s 49.2s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.6it/s 2.0s
                   all        140        147      0.801      0.746      0.792      0.333

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     26/100      5.23G      1.572      1.308    0.03655         16        832: 100% ━━━━━━━━━━━━ 183/183 3.7it/s 49.2s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.9it/s 1.8s
                   all        140        147      0.727      0.793      0.783      0.316

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     27/100      5.23G      1.526      1.305    0.03496          9        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.0s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.814      0.807      0.805      0.315

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     28/100      5.23G      1.556      1.244    0.03613          9        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.2s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.6it/s 1.9s
                   all        140        147      0.787      0.761      0.746      0.323

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     29/100      5.23G      1.551      1.221    0.03525         15        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.8s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.772       0.75      0.761      0.315

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     30/100      5.23G      1.528      1.237     0.0348         11        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.7s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.5it/s 2.0s
                   all        140        147      0.754      0.752      0.784      0.331

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     31/100      5.23G      1.499      1.196    0.03342         16        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.6s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.741      0.725      0.741      0.308

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     32/100      5.23G      1.463      1.193    0.03308         12        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.6s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.747      0.804      0.777      0.339

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     33/100      5.23G      1.466        1.1      0.033         12        832: 100% ━━━━━━━━━━━━ 183/183 3.8it/s 48.2s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.9it/s 1.8s
                   all        140        147      0.777      0.783      0.771      0.345

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     34/100      5.23G      1.469      1.124    0.03327         14        832: 100% ━━━━━━━━━━━━ 183/183 3.8it/s 48.6s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.801      0.766      0.778      0.339

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     35/100      5.23G      1.473       1.09    0.03292         12        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.4s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.767      0.751      0.737      0.301

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     36/100      5.23G      1.463      1.137    0.03275         16        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.0s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.9it/s 1.9s
                   all        140        147      0.769      0.793      0.767      0.325

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     37/100      5.23G      1.418      1.064    0.03165         10        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.0s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147       0.78      0.777      0.783      0.334

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     38/100      5.23G      1.409      1.031    0.03182         17        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.2s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.794      0.751      0.761      0.318

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     39/100      5.23G      1.434      1.034    0.03197         12        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.2s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.829      0.724       0.77      0.313

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     40/100      5.23G      1.369     0.9931    0.03063         16        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.1s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.5it/s 2.0s
                   all        140        147      0.825      0.765        0.8      0.347

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     41/100      5.23G      1.332     0.9919    0.02963         16        832: 100% ━━━━━━━━━━━━ 183/183 3.7it/s 49.8s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.794      0.742      0.765      0.312

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     42/100      5.23G      1.335     0.9631     0.0292         14        832: 100% ━━━━━━━━━━━━ 183/183 3.8it/s 47.6s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 5.0it/s 1.8s
                   all        140        147      0.757      0.746      0.717       0.31

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     43/100      5.23G      1.322       0.97    0.02884         11        832: 100% ━━━━━━━━━━━━ 183/183 3.8it/s 48.1s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.5it/s 2.0s
                   all        140        147      0.732      0.749      0.733      0.312

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     44/100      5.23G       1.31     0.9649    0.02844         10        832: 100% ━━━━━━━━━━━━ 183/183 3.8it/s 47.7s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.769      0.811      0.805      0.329

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     45/100      5.23G      1.315     0.9127    0.02881         14        832: 100% ━━━━━━━━━━━━ 183/183 3.8it/s 47.8s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.777      0.768      0.753      0.332

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     46/100      5.23G      1.275     0.8997    0.02745         12        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.5s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.5it/s 2.0s
                   all        140        147       0.79      0.754      0.739      0.319

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     47/100      5.23G      1.272     0.9288    0.02776         10        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.0s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.857      0.765      0.801      0.328

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     48/100      5.23G      1.277     0.9135    0.02763         13        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.8s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147       0.76      0.755      0.733      0.312

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     49/100      5.23G      1.289     0.9163    0.02835         12        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.2s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.768      0.757      0.755      0.328

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     50/100      5.23G      1.235     0.8683    0.02693         14        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.5s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.698      0.761      0.694      0.289

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     51/100      5.23G      1.234      0.829    0.02666         14        832: 100% ━━━━━━━━━━━━ 183/183 4.0it/s 46.2s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 5.1it/s 1.8s
                   all        140        147      0.792      0.745      0.748      0.323

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     52/100      5.23G       1.21     0.8018    0.02615         14        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.4s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.822      0.794        0.8       0.33

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     53/100      5.23G      1.215     0.8122    0.02586         18        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.7s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.791      0.734      0.755      0.333

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     54/100      5.23G      1.214     0.8032    0.02602         13        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.6s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.9it/s 1.8s
                   all        140        147      0.809       0.78      0.777      0.326

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     55/100      5.23G      1.187     0.7858    0.02577         10        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.0s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.792      0.799      0.782      0.331

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     56/100      5.23G      1.185     0.7781    0.02507         11        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.7s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.6it/s 1.9s
                   all        140        147      0.776      0.796      0.758      0.313

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     57/100      5.23G      1.178     0.7861    0.02519         12        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 47.4s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.772      0.784      0.765      0.335

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     58/100      5.23G      1.135     0.7646    0.02423         14        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.9s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.6it/s 2.0s
                   all        140        147      0.734      0.751      0.698      0.315

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     59/100      5.23G      1.141     0.7468    0.02433         15        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.8s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.7it/s 1.9s
                   all        140        147      0.771      0.728      0.729      0.322

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     60/100      5.23G      1.153     0.7456    0.02435         13        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.6s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.6it/s 1.9s
                   all        140        147      0.811      0.736      0.757      0.324

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     61/100      5.23G      1.127     0.7682    0.02394         13        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.8s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.769       0.78       0.74      0.316

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     62/100      5.23G      1.122     0.7138    0.02353         14        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.6s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.8it/s 1.9s
                   all        140        147      0.748      0.779      0.756      0.327

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     63/100      5.23G      1.074     0.6953    0.02266         16        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.5s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.9it/s 1.8s
                   all        140        147      0.818      0.808      0.787      0.329

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     64/100      5.23G      1.064     0.7019     0.0224         12        832: 100% ━━━━━━━━━━━━ 183/183 4.0it/s 46.1s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.9it/s 1.8s
                   all        140        147      0.801      0.802      0.778      0.316

      Epoch    GPU_mem   box_loss   cls_loss    l1_loss  Instances       Size
     65/100      5.23G      1.044     0.6481    0.02215          9        832: 100% ━━━━━━━━━━━━ 183/183 3.9it/s 46.5s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 4.9it/s 1.8s
                   all        140        147      0.774      0.779      0.756      0.312
EarlyStopping: Training stopped early as no improvement observed in last 25 epochs. Best results observed at epoch 40, best model saved as best.pt.
To update EarlyStopping(patience=25) pass a new patience value, i.e. `patience=300` or use `patience=0` to disable EarlyStopping.

65 epochs completed in 0.911 hours.
Optimizer stripped from /content/drive/MyDrive/paint_defect_training/yolo26s_832/weights/last.pt, 20.3MB
Optimizer stripped from /content/drive/MyDrive/paint_defect_training/yolo26s_832/weights/best.pt, 20.3MB

Validating /content/drive/MyDrive/paint_defect_training/yolo26s_832/weights/best.pt...
Ultralytics 8.4.191 🚀 Python-3.13.16 torch-2.11.0+cu130 CUDA:0 (Tesla T4, 14913MiB)
YOLO26s summary (fused): 120 layers, 9,467,889 parameters, 0 gradients, 20.8 GFLOPs
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 9/9 1.9it/s 4.9s
                   all        140        147       0.83      0.763      0.801      0.347
             Oil Marks         14         14       0.97          1      0.995      0.577
           Orange Peel         24         24      0.635      0.583      0.578      0.283
         Paint sagging         22         25      0.787      0.592      0.693      0.253
              Peel Off         30         30      0.972      0.967      0.994      0.531
             Scratches         13         14      0.708      0.571      0.671      0.224
           Water Marks         12         12      0.904      0.917      0.915      0.248
              bubbling         25         28      0.833      0.714      0.761      0.315
Speed: 2.0ms preprocess, 27.4ms inference, 0.0ms loss, 1.4ms postprocess per image
Results saved to /content/drive/MyDrive/paint_defect_training/yolo26s_832
Training completed.
In [10]:

from ultralytics import YOLO

BEST_MODEL = (
    "/content/drive/MyDrive/paint_defect_training/"
    "yolo26s_832/weights/best.pt"
)

model = YOLO(BEST_MODEL)

metrics = model.val(
    data=str(DATA_YAML),
    imgsz=832,
    batch=8,
    device=0,
    plots=True,
)

print("mAP50:", metrics.box.map50)
print("mAP50-95:", metrics.box.map)
print("Per-class mAP50-95:", metrics.box.maps)
Ultralytics 8.4.191 🚀 Python-3.13.16 torch-2.11.0+cu130 CUDA:0 (Tesla T4, 14913MiB)
YOLO26s summary (fused): 120 layers, 9,467,889 parameters, 0 gradients, 20.8 GFLOPs
WARNING ⚠️ val: Slow image access detected (ping: 0.5±0.1 ms, read: 35.2±37.6 MB/s, size: 38.7 KB). Use local storage instead of remote/mounted storage for better performance. See https://docs.ultralytics.com/guides/model-training-tips
val: Scanning /content/drive/MyDrive/paint_defect_training/valid/labels.cache... 140 images, 0 backgrounds, 0 corrupt: 100% ━━━━━━━━━━━━ 140/140 29.4Mit/s 0.0s
                 Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100% ━━━━━━━━━━━━ 18/18 3.8it/s 4.8s
                   all        140        147      0.813      0.757      0.792      0.346
             Oil Marks         14         14      0.969          1      0.995      0.568
           Orange Peel         24         24      0.629      0.583      0.602        0.3
         Paint sagging         22         25      0.788      0.596      0.692      0.248
              Peel Off         30         30      0.971      0.967      0.994      0.526
             Scratches         13         14      0.703      0.571      0.678      0.225
           Water Marks         12         12       0.82      0.833      0.829      0.239
              bubbling         25         28      0.808       0.75      0.756      0.312
Speed: 2.8ms preprocess, 22.1ms inference, 0.0ms loss, 1.8ms postprocess per image
Results saved to /content/runs/detect/val
mAP50: 0.7921914040156804
mAP50-95: 0.34551808148313606
Per-class mAP50-95: [    0.56777         0.3      0.2479     0.52636     0.22525     0.23929     0.31205]
In [22]:

from google.colab import files
from IPython.display import display, Image
from pathlib import Path

uploaded = files.upload()
image_path = next(iter(uploaded.keys()))

model = YOLO(BEST_MODEL)

results = model.predict(
    source=image_path,
    imgsz=832,
    conf=0.25,
    iou=0.50,
    save=True,
    project="/content/drive/MyDrive/paint_defect_training",
    name="predictions",
)

output_path = Path(results[0].save_dir) / Path(image_path).name
display(Image(filename=str(output_path)))
Upload widget is only available when the cell has been executed in the current browser session. Please rerun this cell to enable.
Saving PEEL-OFF-1_0_8030_jpg.rf.cc5b0e5194ea0156a7a9ed3d04145cc6.jpg to PEEL-OFF-1_0_8030_jpg.rf.cc5b0e5194ea0156a7a9ed3d04145cc6.jpg

image 1/1 /content/PEEL-OFF-1_0_8030_jpg.rf.cc5b0e5194ea0156a7a9ed3d04145cc6.jpg: 512x832 1 Peel Off, 24.3ms
Speed: 1.8ms preprocess, 24.3ms inference, 1.3ms postprocess per image at shape (1, 3, 512, 832)
Results saved to /content/drive/MyDrive/paint_defect_training/predictions-12
In [ ]: