Add RTDetrForSegmentation
Author: ranykamelCreated Jun 12, 2026Updated Oct 1, 2026
LabelsFeature request
Feature request
Add an RTDetrForSegmentation and RTDetrV2ForSegmentation class that extends the object detection model class with a mask prediction head, similar to DetrForSegmentation.
Motivation
RT-DETR in the transformers library currently only supports bounding box predictions through RTDetrForObjectDetection and RTDetrV2ForObjectDetection, with no segmentation counterpart unlike DETR.
Adding this would also allow a more complete comparison of both RT-DETR and DETR models, as benchmarking on segmentation tasks is currently not possible within the library.
Your contribution
I'll look into adding this and attempt to create a PR. This would be my first contribution to the repository.
Source: huggingface/transformers