# New Release: Ultralytics v8.4.40

**URL:** <https://community.ultralytics.com/t/new-release-ultralytics-v8-4-40/1940>\
**Category:** Discussion\
**Tags:** ultralytics-official, releases, announcements\
**Created:** [April 20, 2026, 1:35pm UTC](https://community.ultralytics.com/t/new-release-ultralytics-v8-4-40/1940 "2026-04-20T13:35:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![glenn-jocher](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/glenn-jocher/32/83_2.png) [@glenn-jocher](https://community.ultralytics.com/u/glenn-jocher)\
**Post date:** [April 20, 2026, 1:35pm UTC](https://community.ultralytics.com/t/new-release-ultralytics-v8-4-40/1940/1 "2026-04-20T13:35:29Z")

</div>

# Ultralytics v8.4.40 is here 🚀

## Summary

Ultralytics `v8.4.40` adds a highly practical upgrade to **Ultralytics YOLO** validation: **per-image precision, recall, F1, TP, FP, and FN tracking**. This makes it much easier to identify exactly which images your model handles well and which ones need attention. 📈🖼

This release is especially useful for debugging, dataset cleanup, and iterative model improvement, and it works cleanly in both single-GPU and distributed validation workflows.

## New Features ✨

### Per-image validation metrics

With `v8.4.40`, validation now records image-level metrics including:

- `precision`
- `recall`
- `f1`
- `tp`
- `fp`
- `fn`

These are exposed through `metrics.box.image_metrics`, and also apply to segmentation and pose metrics where supported. ✅

This is a big step forward for anyone who wants more than just dataset-wide averages. Instead of only seeing overall mAP and aggregate scores, you can now inspect performance image by image and quickly spot weak samples. 🎯

### Better visibility for error analysis

Per-image metrics help you:

- find hard or mislabeled images faster
- identify false-positive-heavy samples
- discover images with missed detections
- make better decisions about relabeling, augmentation, and dataset balancing

For teams working with **[Ultralytics Platform](https://platform.ultralytics.com)** or validating newer models like **[YOLO26](https://platform.ultralytics.com/ultralytics/yolo26)**, this brings much more actionable insight into model quality. 🧠

## Improvements 🔧

### Validation pipeline updates

The detection validation pipeline was updated to:

- store image names
- compute image-level stats consistently with validation matching logic
- keep results aligned with how validation already determines matches

### Distributed validation support

Multi-GPU validation now correctly gathers and merges `image_metrics` across ranks, so image-level results remain complete even in larger distributed runs. ⚙

### Metrics class enhancements

The metrics classes now include:

- `image_metrics` storage
- update helpers
- clear/reset helpers

These changes help prevent stale metrics from carrying over between runs and make the new functionality easier to use programmatically.

## Documentation Updates 📚

The docs were also updated to show how to access and use these new metrics across task guides, including:

- detect
- segment
- pose
- OBB
- insights
- custom trainer workflows

## Why this matters 💡

This release makes validation much more actionable:

- **Faster debugging:** pinpoint weak images directly
- **Better dataset curation:** identify samples causing FP/FN spikes
- **Improved evaluation:** move beyond averages to image-level insight
- **Reliable at scale:** works in distributed validation too

For many users, especially those training and validating YOLO26 models, this should make iteration cycles noticeably faster. 🔁

## What changed

- Per-image precision/recall/F1 support landed in **[PR #24089](https://github.com/ultralytics/ultralytics/pull/24089)** by **[@Laughing-q](https://github.com/Laughing-q)** 🙌

## Quick example

Here’s a simple example of how to access validation metrics in Python:

```python
from ultralytics import YOLO

model = YOLO("yolo26n.pt")
metrics = model.val(data="coco8.yaml")

print(metrics.box.image_metrics[:3])

```

## Try it out 🧪

You can upgrade with:

```bash
pip install -U ultralytics

```

If you’d like to explore everything included in this release, check out the **[v8.4.40 release page](https://github.com/ultralytics/ultralytics/releases/tag/v8.4.40)** or browse the **[full changelog from v8.4.39 to v8.4.40](https://github.com/ultralytics/ultralytics/compare/v8.4.39...v8.4.40)**.

Please give `v8.4.40` a try and let us know how the new per-image metrics fit into your validation workflow. Feedback, edge cases, and suggestions are always welcome! 🤝
