Install any skill in seconds. Free to start, no credit card required.
Get Started Free →YOLO detection, segmentation, classification, and pose estimation setup, training workflow, evaluation metrics, and XAI verification
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 212% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 78% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 39% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 111% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 47% | 0% |
What output do you need?
├── "What objects are here and WHERE?" (bounding boxes)
│ └── ✅ Detection — model('img.jpg') with yolov8n.pt
│
├── "Exact pixel-level shape of each object"
│ └── ✅ Segmentation — model('img.jpg') with yolov8n-seg.pt
│
├── "What IS this image overall?" (single label)
│ └── ✅ Classification — model('img.jpg') with yolov8n-cls.pt
│
├── "What pose is this person in?" (17 keypoints)
│ └── ✅ Pose Estimation — model('img.jpg') with yolov8n-pose.pt
│
└── "Rotated/angled objects" (ships, aircraft)
└── ✅ Oriented Bounding Boxes (OBB) — yolov8n-obb.pt| Type | Question | Output | Can Count Individuals? | |------|----------|--------|------------------------| | Semantic | "What’s in the scene?" | One color per class | ❌ No (5 sheep = one green blob) | | Instance (YOLO) | "Which objects where?" | Unique ID per object | ✅ Yes (5 sheep = 5 different colors) |
> YOLO does Instance Segmentation — each object gets its own mask and identity.
| Dataset | Source | Classes | Typical Use | |---------|--------|---------|-------------| | COCO | Microsoft | 80 | General object detection | | ImageNet | Stanford | 1000 | Image classification | | DOTAv1 | Wuhan Univ. | 15 | Aerial/satellite OBB |
| Condition | Classic CV | YOLO/DL | |-----------|-----------|----------| | High contrast, uniform light | ✅ Works | Overkill | | Shadows, uneven lighting | ❌ Fails | ✅ Robust | | Touching/overlapping objects | ❌ Fails | ✅ Handles | | Diverse viewpoints | ❌ Unreliable | ✅ Generalizes | | Need to detect 80+ classes | ❌ Impractical | ✅ Built-in |
[center_x, center_y, width, height] (normalized 0-1).txt per image): [class_index] [center_x] [center_y] [width] [height] Example: 1 0.45 0.60 0.30 0.40 All coordinates normalized to 0-1 range.
dataset/ ├── train/ │ ├── COVID/ ← folder name = class label │ └── Normal/ └── val/ ├── COVID/ └── Normal/
| Parameter | What It Controls | Guidance | |-----------|-----------------|----------| | Learning Rate | Step size for weight updates | Too high = overshoots, too low = slow convergence | | Epochs | Full passes through dataset | More is not always better (overfitting risk) | | Batch Size | Images per training step | Limited by GPU memory. 16-32 typical | | imgsz | Input image resolution | 640 default. Higher = better accuracy, slower |
Don't train from scratch. Use pre-trained weights:
pythonfrom ultralytics import YOLO model = YOLO('yolov8n.pt') # Pre-trained on COCO model.train(data='my_data.yaml', epochs=100, imgsz=640)
> Transfer Learning = standing on giants' shoulders. The model already knows edges, textures, shapes from millions of images. You only retrain the final layers for your specific task.
| File | Contains | Use For | |------|----------|--------| | best.pt | Weights at best validation accuracy | ✅ Production / inference | | last.pt | Weights at final epoch | Resume interrupted training only |
> Always use best.pt for inference. last.pt may have started overfitting.
| | Predicted Positive | Predicted Negative | |---|---|---| | Actually Positive | TP (correct detection) | FN (missed detection — WORST in medical) | | Actually Negative | FP (false alarm) | TN (not used in object detection) |
> TN is not used in object detection systems — "correctly identifying nothing" is not meaningful.
IoU = Area of Overlap / Area of Union| Metric | Threshold | Strictness | |--------|-----------|------------| | mAP@0.50 | 50% overlap required | Standard | | mAP@0.50:0.95 | Average across 50%-95% | Very strict, comprehensive |
Precision = TP / (TP + FP) — "Of all detections, how many are correct?"
Recall = TP / (TP + FN) — "Of all real objects, how many did we find?"
F1 = 2 × (P × R) / (P + R) — Harmonic meanIf training loss keeps dropping but validation loss plateaus or rises → overfitting. Solutions:
DL models are black boxes — they give answers but don't explain why.
| Heatmap Color | Meaning | |---------------|--------| | 🔴 Hot (Red/Yellow) | Model's decision focus — high attention | | 🔵 Cold (Blue/Purple) | Irrelevant to model's decision |
Why it matters in medicine:
pythonfrom ultralytics import YOLO model = YOLO('yolov8n.pt') results = model( source='image.jpg', # or '0' for webcam, or video path show=True, # display results save=True, # save to disk conf=0.25, # minimum confidence threshold )
| Light Type | Setup | Best For | |-----------|-------|----------| | Array/Screen | Front-facing flat | Surface defects | | Ring Light | Around camera lens | Small parts, uniform light | | Back Light | Behind object | Silhouette, hole detection | | Bar Light | Angled beam | Directional surface inspection | | Dome Light | Surrounds object | Eliminating reflections on metal/shiny surfaces |
Other measured skills in the registry, with their headline benchmark lift.