116 KiB
116 KiB
In [ ]:
!pip install -q -U ultralytics opencv-python-headless
import os
import glob
import shutil
import zipfile
from pathlib import Path
# Tools for reading images and showing pictures on screen.
import cv2
import matplotlib.pyplot as plt
# The YOLO model itself.
from ultralytics import YOLO
# Check that a GPU is connected. Training needs a GPU to be fast.
!nvidia-smi --query-gpu=name,memory.total --format=csv
name, memory.total [MiB] Tesla T4, 15360 MiB
In [ ]:
# Connect to Google Drive. A popup will ask you to allow access - click Allow.
from google.colab import drive
drive.mount('/content/drive')
# ======================================================
# EDIT THIS LINE ONLY: path to your dataset zip file in Drive.
# ======================================================
DATASET_ZIP = "/content/drive/MyDrive/marker_dataset.zip"
# Folder where we will unzip the dataset.
RAW_ROOT = "/content/dataset"
# Unzip the dataset into RAW_ROOT.
with zipfile.ZipFile(DATASET_ZIP, 'r') as zf:
zf.extractall(RAW_ROOT)
# Show the folders inside, so we can confirm train/valid/test are there.
print("Dataset folders found:")
!find "$RAW_ROOT" -maxdepth 3 -type d
Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount("/content/drive", force_remount=True).
Dataset folders found:
/content/dataset
/content/dataset/test
/content/dataset/test/labels
/content/dataset/test/images
/content/dataset/valid
/content/dataset/valid/labels
/content/dataset/valid/images
/content/dataset/train
/content/dataset/train/labels
/content/dataset/train/images
In [ ]:
# Names of your split folders inside the unzipped dataset.
# EDIT THESE if your folders are named differently.
TRAIN_DIR = "train"
VALID_DIR = "valid"
TEST_DIR = "test"
CLASS_NAMES = ["Marker"] # only one class
# Write the data.yaml file that YOLO reads during training.
data_yaml = f"""
path: {RAW_ROOT}
train: {TRAIN_DIR}/images
val: {VALID_DIR}/images
test: {TEST_DIR}/images
names:
0: Marker
"""
DATA_YAML_PATH = f"{RAW_ROOT}/data.yaml"
with open(DATA_YAML_PATH, "w") as f:
f.write(data_yaml)
print("data.yaml created:")
print(data_yaml)
data.yaml created: path: /content/dataset train: train/images val: valid/images test: test/images names: 0: Marker
In [ ]:
from google.colab import drive
drive.mount('/content/drive')Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount("/content/drive", force_remount=True).
In [ ]:
MODEL_SIZE = "s" # "n" = fastest/smallest, "s" = small, "m" = medium (more accurate but more likely to overfit on small data)
EPOCHS = 150 # maximum number of training rounds (early stopping usually stops before this)
IMG_SIZE = 640 # image size used for training
BATCH = 16 # how many images are processed at once
# Load a YOLO model that is already pre-trained on general objects.
# We will fine-tune it to recognize our "Marker" class.
model = YOLO(f"yolo26{MODEL_SIZE}.pt")
# Start training.
results = model.train(
data=DATA_YAML_PATH,
epochs=EPOCHS,
imgsz=IMG_SIZE,
batch=BATCH,
patience=30, # stop early if no improvement for 30 rounds (helps avoid overfitting)
project="/content/runs",
name="marker_yolo",
exist_ok=True,
seed=42, # keeps results repeatable
single_cls=True, # one class only
optimizer="AdamW",
lr0=0.001, # starting learning rate
lrf=0.01, # final learning rate (as a fraction of the start)
cos_lr=True, # smoothly lowers the learning rate over time
weight_decay=0.0005, # helps prevent overfitting
# --- Built-in image augmentation (small random changes every epoch) ---
hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, # slight color/brightness changes
degrees=10.0, # small random rotation
translate=0.1, # small random shift
scale=0.5, # small random zoom
fliplr=0.5, # 50% chance of a horizontal flip
mosaic=1.0, # combines multiple images together during training
close_mosaic=15, # turns that off for the last 15 rounds, for cleaner fine-tuning
plots=True, # saves training charts so we can check for overfitting
val=True, # checks performance on the validation set every round
cache=True, # keeps images in memory for faster training
)
# Path to the best version of the model found during training.
BEST_WEIGHTS = str(Path(results.save_dir) / "weights" / "best.pt")
print(f"Training done. Best model saved at: {BEST_WEIGHTS}")
Ultralytics 8.4.161 🚀 Python-3.13.15 torch-2.11.0+cu128 CUDA:0 (Tesla T4, 14913MiB)
[34m[1mengine/trainer: [0magnostic_nms=False, amp=True, angle=1.0, augment=False, auto_augment=randaugment, batch=16, bgr=0.0, box=7.5, cache=True, cfg=None, channels_last=None, classes=None, close_mosaic=15, cls=0.5, cls_pw=0.0, cls_remap=True, compile=False, conf=None, copy_paste=0.0, copy_paste_mode=flip, cos_lr=True, cutmix=0.0, data=/content/dataset/data.yaml, degrees=10.0, deterministic=True, device=, 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=150, erasing=0.4, exist_ok=True, fliplr=0.5, flipud=0.0, format=torchscript, fraction=1.0, freeze=None, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, imgsz=640, iou=0.7, keras=False, 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=1.0, multi_scale=0.0, name=marker_yolo, nbs=64, nms=None, opset=None, optimize=False, optimizer=AdamW, overlap_mask=True, patience=30, perspective=0.0, plots=True, pose=12.0, pretrained=True, profile=False, project=/content/runs, quantize=None, rect=False, resume=False, retina_masks=False, rle=1.0, save=True, save_conf=False, save_crop=False, save_dir=/content/runs/marker_yolo, save_frames=False, save_json=False, save_period=-1, save_txt=False, scale=0.5, seed=42, shear=0.0, show=False, show_boxes=True, show_conf=True, show_labels=True, simplify=True, single_cls=True, source=None, split=val, stream_buffer=False, task=detect, time=None, tracker=tracktrack.yaml, translate=0.1, val=True, verbose=True, vid_stride=1, visualize=False, warmup_bias_lr=0.1, warmup_epochs=3.0, warmup_momentum=0.8, weight_decay=0.0005, workers=8, workspace=None
Overriding class names with single class.
Overriding model.yaml nc=80 with nc=1
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 932638 ultralytics.nn.modules.head.Detect [1, 1, True, [128, 256, 512]]
YOLO26s summary: 260 layers, 9,948,638 parameters, 9,948,638 gradients, 22.7 GFLOPs
Transferred 696/708 items from pretrained weights
[34m[1mAMP: [0mrunning Automatic Mixed Precision (AMP) checks...
[34m[1mAMP: [0mchecks passed ✅
[34m[1mtrain: [0mFast image access ✅ (ping: 0.0±0.0 ms, read: 759.1±587.6 MB/s, size: 27.7 KB)
[K[34m[1mtrain: [0mScanning /content/dataset/train/labels... 1504 images, 0 backgrounds, 0 corrupt: 100% ━━━━━━━━━━━━ 1504/1504 1.7Kit/s 0.9s
[34m[1mtrain: [0mNew cache created: /content/dataset/train/labels.cache
WARNING ⚠️ cache='ram' may produce non-deterministic training results. Consider cache='disk' as a deterministic alternative if your disk space allows.
[K[34m[1mtrain: [0mCaching images (1.7GB RAM): 100% ━━━━━━━━━━━━ 1504/1504 287.5it/s 5.2s
[34m[1malbumentations: [0mBlur(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))
[34m[1mval: [0mFast image access ✅ (ping: 0.0±0.0 ms, read: 445.8±418.0 MB/s, size: 19.2 KB)
[K[34m[1mval: [0mScanning /content/dataset/valid/labels... 144 images, 0 backgrounds, 0 corrupt: 100% ━━━━━━━━━━━━ 144/144 2.1Kit/s 0.1s
[34m[1mval: [0mNew cache created: /content/dataset/valid/labels.cache
WARNING ⚠️ cache='ram' may produce non-deterministic training results. Consider cache='disk' as a deterministic alternative if your disk space allows.
[K[34m[1mval: [0mCaching images (0.2GB RAM): 100% ━━━━━━━━━━━━ 144/144 385.3it/s 0.4s
[34m[1moptimizer:[0m 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/runs/marker_yolo/labels.jpg...
Using 1504 train, 144 val images for fraction=1.0 at imgsz=640
Using 2 dataloader workers
Logging results to [1m/content/runs/marker_yolo[0m
Starting training for 150 epochs...
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 1/150 4.75G 1.752 3.343 0.02651 44 640: 100% ━━━━━━━━━━━━ 94/94 2.9it/s 32.3s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 2.7it/s 1.8s
all 144 166 0.616 0.518 0.543 0.256
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 2/150 5.83G 1.685 1.875 0.02451 28 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.2it/s 1.2s
all 144 166 0.763 0.681 0.726 0.349
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 3/150 5.83G 1.708 1.856 0.02554 34 640: 100% ━━━━━━━━━━━━ 94/94 3.1it/s 30.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.1it/s 1.2s
all 144 166 0.739 0.631 0.673 0.282
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 4/150 5.83G 1.677 1.727 0.02525 35 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.7s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.9it/s 1.3s
all 144 166 0.76 0.801 0.771 0.374
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 5/150 5.83G 1.704 1.575 0.0256 32 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 28.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.8it/s 1.3s
all 144 166 0.804 0.838 0.825 0.387
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 6/150 5.83G 1.658 1.49 0.02534 33 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.0it/s 1.2s
all 144 166 0.858 0.801 0.862 0.464
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 7/150 5.83G 1.642 1.387 0.02421 33 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.4s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.2it/s 1.6s
all 144 166 0.846 0.727 0.812 0.436
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 8/150 5.83G 1.588 1.362 0.02302 36 640: 100% ━━━━━━━━━━━━ 94/94 3.5it/s 27.2s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 2.9it/s 1.7s
all 144 166 0.875 0.831 0.872 0.485
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 9/150 5.83G 1.595 1.336 0.02355 39 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.3s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.2it/s 1.2s
all 144 166 0.773 0.849 0.855 0.462
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 10/150 5.83G 1.57 1.339 0.02312 35 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.1s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.0it/s 1.2s
all 144 166 0.873 0.855 0.886 0.493
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 11/150 5.83G 1.536 1.273 0.02249 37 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.4s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.863 0.874 0.909 0.498
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 12/150 5.83G 1.524 1.217 0.0221 33 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.3s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.861 0.787 0.843 0.444
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 13/150 5.83G 1.526 1.202 0.02228 40 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.5s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.6it/s 1.4s
all 144 166 0.869 0.761 0.884 0.525
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 14/150 5.83G 1.508 1.198 0.02183 41 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 28.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.875 0.873 0.911 0.556
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 15/150 5.83G 1.514 1.157 0.02188 34 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.9s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.88 0.84 0.887 0.523
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 16/150 5.83G 1.439 1.138 0.02058 35 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.924 0.88 0.909 0.561
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 17/150 5.83G 1.467 1.06 0.02054 44 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.4s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.6it/s 1.4s
all 144 166 0.913 0.892 0.925 0.587
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 18/150 5.83G 1.468 1.114 0.02086 41 640: 100% ━━━━━━━━━━━━ 94/94 3.2it/s 29.2s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.2it/s 1.2s
all 144 166 0.889 0.898 0.931 0.514
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 19/150 5.83G 1.445 1.045 0.02027 34 640: 100% ━━━━━━━━━━━━ 94/94 3.2it/s 29.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.907 0.883 0.904 0.549
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 20/150 5.83G 1.444 1.028 0.02022 37 640: 100% ━━━━━━━━━━━━ 94/94 3.2it/s 29.1s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.894 0.914 0.93 0.557
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 21/150 5.83G 1.435 1.073 0.02001 40 640: 100% ━━━━━━━━━━━━ 94/94 3.2it/s 29.1s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.2it/s 1.2s
all 144 166 0.936 0.881 0.923 0.61
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 22/150 5.83G 1.401 1.036 0.01954 35 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.934 0.859 0.92 0.564
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 23/150 5.83G 1.427 0.9854 0.02012 43 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.2it/s 1.2s
all 144 166 0.923 0.944 0.951 0.591
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 24/150 5.83G 1.435 1.021 0.02022 32 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.5s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.93 0.873 0.922 0.556
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 25/150 5.83G 1.435 1.007 0.02015 35 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.899 0.908 0.913 0.534
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 26/150 5.83G 1.396 1.004 0.01916 31 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.941 0.928 0.949 0.622
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 27/150 5.83G 1.376 0.9907 0.01888 34 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.2it/s 1.2s
all 144 166 0.939 0.922 0.954 0.636
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 28/150 5.83G 1.36 0.944 0.01913 35 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.7s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.2it/s 1.2s
all 144 166 0.926 0.909 0.913 0.554
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 29/150 5.83G 1.379 0.9617 0.0191 36 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.9s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.932 0.904 0.932 0.568
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 30/150 5.83G 1.357 0.9582 0.01915 38 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.945 0.924 0.949 0.62
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 31/150 5.83G 1.357 0.943 0.01896 38 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.9s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.889 0.873 0.906 0.583
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 32/150 5.83G 1.369 0.9726 0.01867 43 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.902 0.94 0.96 0.625
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 33/150 5.83G 1.306 0.9487 0.0181 29 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.919 0.946 0.958 0.611
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 34/150 5.83G 1.326 0.9257 0.01818 38 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.2s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.95 0.934 0.954 0.61
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 35/150 5.83G 1.35 0.9211 0.0183 46 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.2s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.934 0.941 0.953 0.622
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 36/150 5.83G 1.319 0.8973 0.0184 35 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.2s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.946 0.949 0.949 0.595
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 37/150 5.83G 1.333 0.9264 0.01819 38 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.2s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.946 0.928 0.923 0.628
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 38/150 5.83G 1.301 0.9153 0.01764 36 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.9s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.5it/s 1.4s
all 144 166 0.948 0.934 0.938 0.655
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 39/150 5.83G 1.32 0.8956 0.01806 34 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.7s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.4it/s 1.5s
all 144 166 0.938 0.934 0.927 0.587
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 40/150 5.83G 1.32 0.8986 0.01776 36 640: 100% ━━━━━━━━━━━━ 94/94 3.5it/s 27.1s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.0it/s 1.7s
all 144 166 0.967 0.952 0.963 0.631
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 41/150 5.83G 1.309 0.8601 0.01766 29 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.3it/s 1.5s
all 144 166 0.931 0.934 0.953 0.632
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 42/150 5.83G 1.292 0.8545 0.01754 27 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.5s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.4it/s 1.5s
all 144 166 0.949 0.94 0.937 0.588
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 43/150 5.83G 1.287 0.8337 0.01728 43 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.3it/s 1.5s
all 144 166 0.969 0.933 0.945 0.636
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 44/150 5.83G 1.303 0.8329 0.01765 36 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.5s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.0it/s 1.6s
all 144 166 0.92 0.952 0.96 0.635
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 45/150 5.83G 1.281 0.845 0.01737 36 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.1it/s 1.6s
all 144 166 0.969 0.939 0.974 0.64
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 46/150 5.83G 1.293 0.8599 0.0174 36 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.4s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.2it/s 1.6s
all 144 166 0.975 0.938 0.946 0.645
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 47/150 5.83G 1.283 0.866 0.01728 42 640: 100% ━━━━━━━━━━━━ 94/94 3.5it/s 26.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.3it/s 1.5s
all 144 166 0.981 0.949 0.958 0.623
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 48/150 5.83G 1.257 0.8301 0.01709 32 640: 100% ━━━━━━━━━━━━ 94/94 3.5it/s 26.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.4it/s 1.5s
all 144 166 0.935 0.947 0.943 0.66
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 49/150 5.83G 1.243 0.8003 0.01683 37 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.3s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.961 0.934 0.954 0.657
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 50/150 5.83G 1.278 0.8003 0.01735 36 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 28.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.962 0.917 0.948 0.63
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 51/150 5.83G 1.262 0.7994 0.01709 27 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.2s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.5it/s 1.1s
all 144 166 0.956 0.928 0.93 0.622
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 52/150 5.83G 1.219 0.7758 0.01629 30 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.9s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.2it/s 1.2s
all 144 166 0.946 0.943 0.947 0.633
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 53/150 5.83G 1.226 0.7736 0.01631 36 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.2s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.952 0.963 0.963 0.652
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 54/150 5.83G 1.22 0.8182 0.01672 33 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.1s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.945 0.94 0.961 0.639
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 55/150 5.83G 1.218 0.7819 0.01626 42 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.7s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.7it/s 1.3s
all 144 166 0.928 0.934 0.951 0.666
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 56/150 5.83G 1.211 0.7831 0.01645 32 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.3s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.946 0.945 0.96 0.662
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 57/150 5.83G 1.218 0.8055 0.01629 50 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.9s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.952 0.946 0.94 0.631
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 58/150 5.83G 1.218 0.7644 0.01651 33 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 28.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.9it/s 1.3s
all 144 166 0.938 0.952 0.956 0.668
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 59/150 5.83G 1.192 0.7542 0.01635 34 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.5s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.957 0.936 0.949 0.653
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 60/150 5.83G 1.202 0.7482 0.01635 42 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.97 0.968 0.969 0.669
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 61/150 5.83G 1.194 0.7369 0.01597 31 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.9s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.958 0.952 0.946 0.645
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 62/150 5.83G 1.202 0.7219 0.01636 38 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.4s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.5it/s 1.4s
all 144 166 0.945 0.976 0.977 0.674
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 63/150 5.83G 1.203 0.7491 0.01645 38 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.2it/s 1.2s
all 144 166 0.974 0.946 0.949 0.642
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 64/150 5.83G 1.206 0.7532 0.01648 37 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.2s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.969 0.958 0.958 0.661
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 65/150 5.83G 1.197 0.7287 0.016 44 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 28.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.963 0.944 0.944 0.649
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 66/150 5.83G 1.17 0.715 0.01522 40 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 28.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.975 0.957 0.961 0.679
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 67/150 5.83G 1.174 0.6915 0.01569 35 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.4s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.968 0.946 0.964 0.671
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 68/150 5.83G 1.185 0.7104 0.01565 34 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.4s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.96 0.958 0.958 0.664
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 69/150 5.83G 1.139 0.6687 0.0151 38 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.4s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.953 0.958 0.963 0.646
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 70/150 5.83G 1.162 0.6971 0.01544 36 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.2s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.966 0.952 0.959 0.649
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 71/150 5.83G 1.141 0.6765 0.01523 36 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.4s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.951 0.952 0.944 0.648
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 72/150 5.83G 1.149 0.6723 0.01518 29 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.2s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.5it/s 1.1s
all 144 166 0.965 0.946 0.954 0.663
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 73/150 5.83G 1.141 0.7068 0.01526 29 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.1s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.2it/s 1.2s
all 144 166 0.954 0.964 0.966 0.675
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 74/150 5.83G 1.127 0.6935 0.01489 27 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 28.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.974 0.946 0.97 0.672
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 75/150 5.83G 1.133 0.6944 0.01505 40 640: 100% ━━━━━━━━━━━━ 94/94 3.3it/s 28.3s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.5it/s 1.1s
all 144 166 0.968 0.946 0.958 0.671
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 76/150 5.83G 1.1 0.6853 0.01437 33 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.7s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.951 0.934 0.954 0.672
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 77/150 5.83G 1.127 0.6842 0.01464 42 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.5s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.969 0.949 0.963 0.67
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 78/150 5.83G 1.097 0.6976 0.01421 35 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.933 0.958 0.954 0.684
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 79/150 5.83G 1.087 0.6334 0.01423 42 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.4s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.974 0.946 0.964 0.697
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 80/150 5.83G 1.075 0.6154 0.01426 45 640: 100% ━━━━━━━━━━━━ 94/94 3.5it/s 26.9s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.967 0.94 0.961 0.676
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 81/150 5.83G 1.089 0.6468 0.014 34 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.7s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.952 0.95 0.955 0.683
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 82/150 5.83G 1.083 0.6528 0.01417 30 640: 100% ━━━━━━━━━━━━ 94/94 3.5it/s 27.1s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.9it/s 1.3s
all 144 166 0.969 0.955 0.965 0.691
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 83/150 5.83G 1.086 0.6545 0.01414 44 640: 100% ━━━━━━━━━━━━ 94/94 3.5it/s 26.9s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.963 0.951 0.957 0.675
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 84/150 5.83G 1.075 0.6232 0.01405 31 640: 100% ━━━━━━━━━━━━ 94/94 3.6it/s 26.4s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.4it/s 1.5s
all 144 166 0.963 0.936 0.939 0.678
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 85/150 5.83G 1.085 0.6356 0.01427 34 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.5s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.9it/s 1.3s
all 144 166 0.955 0.946 0.954 0.668
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 86/150 5.83G 1.073 0.6162 0.01422 37 640: 100% ━━━━━━━━━━━━ 94/94 3.5it/s 26.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.2it/s 1.6s
all 144 166 0.975 0.945 0.965 0.693
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 87/150 5.83G 1.055 0.6214 0.01364 28 640: 100% ━━━━━━━━━━━━ 94/94 3.5it/s 26.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.5it/s 1.4s
all 144 166 0.982 0.962 0.959 0.664
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 88/150 5.83G 1.058 0.62 0.01376 37 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.964 0.958 0.957 0.663
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 89/150 5.83G 1.068 0.646 0.01372 40 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 28.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.975 0.958 0.967 0.687
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 90/150 5.83G 1.053 0.6299 0.01378 29 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.969 0.958 0.964 0.694
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 91/150 5.83G 1.07 0.6362 0.01422 24 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.967 0.934 0.948 0.682
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 92/150 5.83G 1.039 0.6091 0.0135 28 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.5it/s 1.1s
all 144 166 0.969 0.951 0.95 0.683
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 93/150 5.83G 1.046 0.6285 0.01358 30 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.9s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.975 0.952 0.957 0.678
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 94/150 5.83G 1.036 0.6097 0.0134 34 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.5s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.969 0.958 0.951 0.656
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 95/150 5.83G 1.024 0.5974 0.0132 32 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.5it/s 1.1s
all 144 166 0.969 0.945 0.947 0.661
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 96/150 5.83G 1.018 0.6132 0.01306 38 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.9s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.5it/s 1.1s
all 144 166 0.956 0.94 0.938 0.648
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 97/150 5.83G 1.018 0.5903 0.01298 35 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.5s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.975 0.95 0.949 0.661
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 98/150 5.83G 1.02 0.5831 0.01322 35 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.7s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.5it/s 1.1s
all 144 166 0.969 0.941 0.95 0.664
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 99/150 5.83G 1.022 0.5796 0.01333 31 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 28.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.969 0.938 0.959 0.686
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 100/150 5.83G 1.015 0.5842 0.01324 40 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 28.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.958 0.952 0.959 0.684
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 101/150 5.83G 0.9921 0.5912 0.01245 36 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.3s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.956 0.946 0.958 0.694
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 102/150 5.83G 0.9785 0.5679 0.01285 39 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.5it/s 1.1s
all 144 166 0.968 0.946 0.958 0.694
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 103/150 5.83G 1.015 0.5879 0.01326 31 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 28.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.975 0.958 0.96 0.682
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 104/150 5.83G 0.9866 0.5739 0.01255 29 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.95 0.952 0.947 0.667
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 105/150 5.83G 0.9888 0.5943 0.0129 42 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.957 0.94 0.948 0.677
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 106/150 5.83G 0.9566 0.5446 0.01222 37 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.7s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.981 0.958 0.959 0.689
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 107/150 5.83G 0.9899 0.5789 0.0127 31 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.9s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.968 0.946 0.95 0.698
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 108/150 5.83G 0.957 0.5398 0.01234 34 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.958 0.956 0.949 0.668
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 109/150 5.83G 0.9631 0.566 0.01221 34 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.7s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.6it/s 1.1s
all 144 166 0.975 0.956 0.962 0.693
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 110/150 5.83G 0.963 0.5766 0.01254 36 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.974 0.958 0.958 0.694
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 111/150 5.83G 0.9545 0.5493 0.01231 27 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.6s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.4it/s 1.1s
all 144 166 0.956 0.964 0.96 0.679
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 112/150 5.83G 0.9613 0.56 0.01207 46 640: 100% ━━━━━━━━━━━━ 94/94 3.4it/s 27.4s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 4.3it/s 1.2s
all 144 166 0.969 0.952 0.949 0.691
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 113/150 5.83G 0.9519 0.5611 0.01217 40 640: 100% ━━━━━━━━━━━━ 94/94 3.5it/s 27.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.3it/s 1.5s
all 144 166 0.968 0.958 0.967 0.69
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 114/150 5.83G 0.9382 0.5427 0.01206 30 640: 100% ━━━━━━━━━━━━ 94/94 3.6it/s 26.5s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.3it/s 1.5s
all 144 166 0.975 0.952 0.957 0.69
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 115/150 5.83G 0.9548 0.5461 0.01211 35 640: 100% ━━━━━━━━━━━━ 94/94 3.6it/s 26.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.5it/s 1.4s
all 144 166 0.976 0.968 0.965 0.696
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 116/150 5.83G 0.9401 0.5568 0.01223 39 640: 100% ━━━━━━━━━━━━ 94/94 3.6it/s 25.8s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 5/5 3.3it/s 1.5s
all 144 166 0.964 0.957 0.955 0.683
Epoch GPU_mem box_loss cls_loss l1_loss Instances Size
[K 117/150 5.83G 0.8631 0.425 0.01142 41 640: 0% ──────────── 0/94 0.3sIn [ ]:
In [ ]:
# Folder in Google Drive where the trained model will be saved.
SAVE_DIR = "/content/drive/MyDrive/marker_yolo_weights"
os.makedirs(SAVE_DIR, exist_ok=True)
# Copy the best model file to Google Drive.
shutil.copy(BEST_WEIGHTS, f"{SAVE_DIR}/marker_best.pt")
print(f"Model saved to: {SAVE_DIR}/marker_best.pt")
Model saved to: /content/drive/MyDrive/marker_yolo_weights/marker_best.pt
In [ ]:
# Load the best trained model.
trained_model = YOLO(BEST_WEIGHTS)
# Run validation and print the results.
metrics = trained_model.val(data=DATA_YAML_PATH, split="val", imgsz=IMG_SIZE, plots=True)
print(f"Precision: {metrics.box.mp:.4f}") # how many detections were correct
print(f"Recall: {metrics.box.mr:.4f}") # how many real markers were found
print(f"mAP50: {metrics.box.map50:.4f}") # overall accuracy score (easier measure)
print(f"mAP50-95: {metrics.box.map:.4f}") # overall accuracy score (stricter measure)
# Show the confusion matrix chart, if it was created.
cm_path = Path(metrics.save_dir) / "confusion_matrix_normalized.png"
if cm_path.exists():
img = plt.imread(str(cm_path))
plt.figure(figsize=(6, 6))
plt.imshow(img)
plt.axis("off")
plt.title("Confusion Matrix")
plt.show()
Ultralytics 8.4.155 🚀 Python-3.13.15 torch-2.11.0+cu128 CUDA:0 (Tesla T4, 14913MiB)
YOLO26s summary (fused): 120 layers, 9,465,567 parameters, 0 gradients, 20.8 GFLOPs
WARNING ⚠️ [34m[1mval: [0mSlow image access detected (ping: 0.0±0.0 ms, read: 11.6±7.9 MB/s, size: 17.9 KB). Use local storage instead of remote/mounted storage for better performance. See https://docs.ultralytics.com/guides/model-training-tips
[K[34m[1mval: [0mScanning /content/dataset/valid/labels.cache... 144 images, 0 backgrounds, 0 corrupt: 100% ━━━━━━━━━━━━ 144/144 30.2Mit/s 0.0s
[K Class Images Instances Box(P R mAP50 mAP50-95): 100% ━━━━━━━━━━━━ 9/9 2.5it/s 3.6s
all 144 166 0.968 0.946 0.95 0.7
Speed: 3.1ms preprocess, 10.5ms inference, 0.0ms loss, 1.7ms postprocess per image
Results saved to [1m/content/runs/detect/val[0m
Precision: 0.9677
Recall: 0.9458
mAP50: 0.9499
mAP50-95: 0.6995
In [ ]:
TEST_OUT_DIR = "/content/test_predictions"
os.makedirs(TEST_OUT_DIR, exist_ok=True)
# Find all test images.
IMAGE_EXTENSIONS = {".jpg", ".jpeg", ".png", ".bmp", ".tiff", ".tif", ".webp"}
test_images = [p for p in glob.glob(f"{RAW_ROOT}/{TEST_DIR}/images/*") if Path(p).suffix.lower() in IMAGE_EXTENSIONS]
# Run the model on the test images and save pictures with boxes drawn on them.
test_results = trained_model.predict(
source=test_images,
conf=0.4, # only show detections the model is at least 40% sure about
imgsz=IMG_SIZE,
save=True,
project=TEST_OUT_DIR,
name="run",
exist_ok=True,
)
print(f"Tested on {len(test_images)} images.")
print(f"Annotated result images saved in: {TEST_OUT_DIR}/run")
0: 640x640 1 item, 10.0ms 1: 640x640 1 item, 10.0ms 2: 640x640 1 item, 10.0ms 3: 640x640 1 item, 10.0ms 4: 640x640 1 item, 10.0ms 5: 640x640 1 item, 10.0ms 6: 640x640 1 item, 10.0ms 7: 640x640 1 item, 10.0ms 8: 640x640 1 item, 10.0ms 9: 640x640 1 item, 10.0ms 10: 640x640 1 item, 10.0ms 11: 640x640 1 item, 10.0ms 12: 640x640 1 item, 10.0ms 13: 640x640 1 item, 10.0ms 14: 640x640 1 item, 10.0ms 15: 640x640 1 item, 10.0ms 16: 640x640 1 item, 10.0ms 17: 640x640 1 item, 10.0ms 18: 640x640 1 item, 10.0ms 19: 640x640 1 item, 10.0ms 20: 640x640 1 item, 10.0ms 21: 640x640 1 item, 10.0ms 22: 640x640 1 item, 10.0ms 23: 640x640 1 item, 10.0ms 24: 640x640 1 item, 10.0ms 25: 640x640 1 item, 10.0ms 26: 640x640 1 item, 10.0ms 27: 640x640 1 item, 10.0ms 28: 640x640 2 items, 10.0ms 29: 640x640 1 item, 10.0ms 30: 640x640 1 item, 10.0ms 31: 640x640 2 items, 10.0ms 32: 640x640 1 item, 10.0ms 33: 640x640 1 item, 10.0ms 34: 640x640 1 item, 10.0ms 35: 640x640 1 item, 10.0ms 36: 640x640 1 item, 10.0ms 37: 640x640 1 item, 10.0ms 38: 640x640 1 item, 10.0ms 39: 640x640 1 item, 10.0ms 40: 640x640 3 items, 10.0ms 41: 640x640 1 item, 10.0ms 42: 640x640 2 items, 10.0ms 43: 640x640 1 item, 10.0ms 44: 640x640 1 item, 10.0ms 45: 640x640 1 item, 10.0ms 46: 640x640 2 items, 10.0ms 47: 640x640 1 item, 10.0ms 48: 640x640 1 item, 10.0ms 49: 640x640 1 item, 10.0ms 50: 640x640 1 item, 10.0ms 51: 640x640 1 item, 10.0ms 52: 640x640 1 item, 10.0ms 53: 640x640 1 item, 10.0ms 54: 640x640 1 item, 10.0ms 55: 640x640 1 item, 10.0ms 56: 640x640 1 item, 10.0ms 57: 640x640 1 item, 10.0ms 58: 640x640 1 item, 10.0ms 59: 640x640 1 item, 10.0ms 60: 640x640 1 item, 10.0ms 61: 640x640 2 items, 10.0ms 62: 640x640 1 item, 10.0ms 63: 640x640 1 item, 10.0ms 64: 640x640 1 item, 10.0ms 65: 640x640 1 item, 10.0ms 66: 640x640 1 item, 10.0ms 67: 640x640 1 item, 10.0ms 68: 640x640 1 item, 10.0ms 69: 640x640 1 item, 10.0ms 70: 640x640 1 item, 10.0ms 71: 640x640 1 item, 10.0ms Speed: 2.0ms preprocess, 10.0ms inference, 0.9ms postprocess per image at shape (1, 3, 640, 640) Results saved to [1m/content/test_predictions/run[0m Tested on 72 images. Annotated result images saved in: /content/test_predictions/run
In [ ]:
ARCHIVE_STAGING_DIR = "/content/run_artifacts"
if os.path.exists(ARCHIVE_STAGING_DIR):
shutil.rmtree(ARCHIVE_STAGING_DIR)
os.makedirs(ARCHIVE_STAGING_DIR)
# Copy the full training folder (model weights + charts).
shutil.copytree(results.save_dir, f"{ARCHIVE_STAGING_DIR}/training_output")
# Copy the test prediction images.
shutil.copytree(f"{TEST_OUT_DIR}/run", f"{ARCHIVE_STAGING_DIR}/test_predictions")
# Zip everything and save it to Google Drive.
ARCHIVE_BASE_NAME = "/content/drive/MyDrive/marker_yolo_run_results"
archive_path = shutil.make_archive(base_name=ARCHIVE_BASE_NAME, format="zip", root_dir=ARCHIVE_STAGING_DIR)
print(f"All results saved to: {archive_path}")
All results saved to: /content/drive/MyDrive/marker_yolo_run_results.zip