# YOLOv11 uses multiple heads(classification+segmentation) during training

**URL:** <https://community.ultralytics.com/t/yolov11-uses-multiple-heads-classification-segmentation-during-training/1692>\
**Category:** Discussion\
**Tags:** question, code, yolo\
**Created:** [December 11, 2025, 9:20am UTC](https://community.ultralytics.com/t/yolov11-uses-multiple-heads-classification-segmentation-during-training/1692 "2025-12-11T09:20:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanieh\_mosaali](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/hanieh_mosaali/32/1193_2.png) [@hanieh\_mosaali](https://community.ultralytics.com/u/hanieh_mosaali)\
**Post date:** [December 11, 2025, 9:20am UTC](https://community.ultralytics.com/t/yolov11-uses-multiple-heads-classification-segmentation-during-training/1692/1 "2025-12-11T09:20:33Z")

</div>

I want to train YOLOv11 on my dataset in a **multi-head** setup, so that during training it learns both **classification** and **segmentation**.  
Specifically, when it learns segmentation, it should also learn the **class of the segmented region**.

I also have another task where I want it to learn **classification and object detection simultaneously**.

What changes do I need to make in the code to achieve this?

---

<div class="post-metadata">

**Author:** ![Toxite](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/toxite/32/123_2.png) [@Toxite](https://community.ultralytics.com/u/Toxite)\
**Post date:** [December 11, 2025, 10:46am UTC](https://community.ultralytics.com/t/yolov11-uses-multiple-heads-classification-segmentation-during-training/1692/2 "2025-12-11T10:46:44Z")

</div>

Instance segmentation model already learns both the segmentation mask and the class.

> **[Instance Segmentation](https://docs.ultralytics.com/tasks/segment/)**
>
> Master instance segmentation using YOLO11. Learn how to detect, segment and outline objects in images with detailed guides and examples.
