---
title: models.utils.loss API Reference
description: Explore detailed implementations of loss functions for DETR and RT-DETR models in Ultralytics.
keywords: ultralytics, YOLO, DETR, RT-DETR, loss functions, object detection, deep learning, focal loss, varifocal loss, Hungarian matcher
---

# Reference for `ultralytics/models/utils/loss.py`

!!! success "Improvements"

    This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/utils/loss.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/utils/loss.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing) — thank you! 🙏

<br>

## ::: ultralytics.models.utils.loss.DETRLoss

<br><br><hr><br>

## ::: ultralytics.models.utils.loss.RTDETRDetectionLoss

<br><br>
