Skip to main content
QUICK REVIEW

[Paper Review] RF-DETR Object Detection vs YOLOv12 : A Study of Transformer-based and CNN-based Architectures for Single-Class and Multi-Class Greenfruit Detection in Complex Orchard Environments Under Label Ambiguity

Ranjan Sapkota, Rahul Harsha Cheppally|ArXiv.org|Apr 17, 2025
Smart Agriculture and AIAgricultural and Biological Sciences3 citations
TL;DR

This study directly compares RF-DETR (transformer-based) and YOLOv12 (CNN-based) for greenfruit detection in complex orchards, evaluating single-class and multi-class (occluded vs non-occluded) scenarios under label ambiguity. RF-DETR dominates in accuracy, while YOLOv12 offers edge-lean efficiency.

ABSTRACT

This study conducts a detailed comparison of RF-DETR object detection base model and YOLOv12 object detection model configurations for detecting greenfruits in a complex orchard environment marked by label ambiguity, occlusions, and background blending. A custom dataset was developed featuring both single-class (greenfruit) and multi-class (occluded and non-occluded greenfruits) annotations to assess model performance under dynamic real-world conditions. RF-DETR object detection model, utilizing a DINOv2 backbone and deformable attention, excelled in global context modeling, effectively identifying partially occluded or ambiguous greenfruits. In contrast, YOLOv12 leveraged CNN-based attention for enhanced local feature extraction, optimizing it for computational efficiency and edge deployment. RF-DETR achieved the highest mean Average Precision (mAP50) of 0.9464 in single-class detection, proving its superior ability to localize greenfruits in cluttered scenes. Although YOLOv12N recorded the highest mAP@50:95 of 0.7620, RF-DETR consistently outperformed in complex spatial scenarios. For multi-class detection, RF-DETR led with an mAP@50 of 0.8298, showing its capability to differentiate between occluded and non-occluded fruits, while YOLOv12L scored highest in mAP@50:95 with 0.6622, indicating better classification in detailed occlusion contexts. Training dynamics analysis highlighted RF-DETR's swift convergence, particularly in single-class settings where it plateaued within 10 epochs, demonstrating the efficiency of transformer-based architectures in adapting to dynamic visual data. These findings validate RF-DETR's effectiveness for precision agricultural applications, with YOLOv12 suited for fast-response scenarios. >Index Terms: RF-DETR object detection, YOLOv12, YOLOv13, YOLOv14, YOLOv15, YOLOE, YOLO World, YOLO, You Only Look Once, Roboflow, Detection Transformers, CNNs

Motivation & Objective

  • Assess detection accuracy of RF-DETR and YOLOv12 on a custom greenfruit dataset with single-class and multi-class labels.
  • Evaluate model performance under occlusion, camouflage, and background clutter in real orchard conditions.
  • Analyze convergence behavior and inference efficiency to guide deployment decisions in precision agriculture.

Proposed method

  • Use identical datasets, training protocols, and epochs for RF-DETR and YOLOv12.
  • RF-DETR with a DINOv2 backbone and deformable attention; no anchor boxes or NMS; single-scale features.
  • YOLOv12 with R-ELAN backbone and area-attention; multi-task heads for detection, oriented bounding boxes, and instance segmentation.
  • Standardize input resolution to 640x640; train on FP32 with batch size ~16 on an RTX A5000.
  • Evaluate with precision, recall, F1, mAP@50 and mAP@50:95, plus mIoU; assess inference speed.
Figure 1: Classification of object detection methodologies: Top features state-of-the-art CNN-based and Transformer-based methods, widely adopted; Vision Language Models are emerging. Also includes Hybrid, Sparse Coding, and Traditional Feature-based approaches.
Figure 1: Classification of object detection methodologies: Top features state-of-the-art CNN-based and Transformer-based methods, widely adopted; Vision Language Models are emerging. Also includes Hybrid, Sparse Coding, and Traditional Feature-based approaches.

Experimental results

Research questions

  • RQ1How does RF-DETR compare to YOLOv12 in single-class greenfruit detection under label ambiguity?
  • RQ2How do the two models perform in multi-class detection distinguishing occluded vs non-occluded fruits?
  • RQ3What are the convergence dynamics and training efficiency of transformer-based vs CNN-based detectors in this agricultural context?
  • RQ4What are the relative inference speeds and edge deployment suitability of RF-DETR and YOLOv12?

Key findings

  • RF-DETR achieves mAP@50 of 0.9464 in single-class detection.
  • YOLOv12N achieves the highest mAP@50:95 of 0.7620 in single-class scenarios.
  • In multi-class detection, RF-DETR attains mAP@50 of 0.8298.
  • YOLOv12L leads mAP@50:95 with 0.6622 in multi-class conditions.
  • RF-DETR shows rapid convergence, plateauing in under 10-20 epochs depending on task, highlighting efficient training dynamics.
Figure 2: CNN vs Transformer-based model performance comparison focusing on YOLOv12 (CNN-based) and RF-DETR (Transformer-based) architectures: (a) RF-DETR object detection model benchmark evaluation with YOLO11, YOLOv8 and other DETR-based object detection models ; (b)RF-DETR evaluation on the RF100
Figure 2: CNN vs Transformer-based model performance comparison focusing on YOLOv12 (CNN-based) and RF-DETR (Transformer-based) architectures: (a) RF-DETR object detection model benchmark evaluation with YOLO11, YOLOv8 and other DETR-based object detection models ; (b)RF-DETR evaluation on the RF100

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.