class_docstr: RT-DETR Object Detection model, as described in https://arxiv.org/abs/2304.08069.
class_docstr_tok: ["RT-DETR","Object","Detection","model",",","as","described","in","https",":","\/\/arxiv.org\/abs\/2304.08069","."]
docstr: Detect objects in an image.
  
  Args:
      images: images to be detected. Shape :math:`(N, C, H, W)`.
  
  Returns:
      - **logits** - Tensor of shape :math:`(N, Q, K)`, where :math:`Q` is the number of queries,
        :math:`K` is the number of classes.
      - **boxes** - Tensor of shape :math:`(N, Q, 4)`, where :math:`Q` is the number of queries.
docstr_tok: ["Detect","objects","in","an","image",".","Args",":","images",":","images","to","be","detected",".","Shape",":","math",":","`","(","N",",","C",",","H",",","W",")","`",".","Returns",":","-","*","*","logits","*","*","-","Tensor","of","shape",":","math",":","`","(","N",",","Q",",","K",")","`",",","where",":","math",":","`","Q","`","is","the","number","of","queries",",",":","math",":","`","K","`","is","the","number","of","classes",".","-","*","*","boxes","*","*","-","Tensor","of","shape",":","math",":","`","(","N",",","Q",",","4",")","`",",","where",":","math",":","`","Q","`","is","the","number","of","queries","."]
code: def forward(self, images: Tensor) -> tuple[Tensor, Tensor]:
      """Detect objects in an image.
  
      Args:
          images: images to be detected. Shape :math:`(N, C, H, W)`.
  
      Returns:
          - **logits** - Tensor of shape :math:`(N, Q, K)`, where :math:`Q` is the number of queries,
            :math:`K` is the number of classes.
          - **boxes** - Tensor of shape :math:`(N, Q, 4)`, where :math:`Q` is the number of queries.
      """
      if self.training:
          raise RuntimeError(
              "Only evaluation mode is supported. Please call model.eval()."
          )
  
      feats = self.backbone(images)
      feats_buf = self.neck(feats)
      logits, boxes = self.head(feats_buf)
      return logits, boxes
  
file_path: kornia/kornia/contrib/models/rt_detr/model.py
imports: from __future__ import annotations
  from dataclasses import dataclass
  from enum import Enum
  from typing import Optional
  from kornia.contrib.models.base import ModelBase
  from kornia.contrib.models.rt_detr.architecture.hgnetv2 import PPHGNetV2
  from kornia.contrib.models.rt_detr.architecture.hybrid_encoder import HybridEncoder
  from kornia.contrib.models.rt_detr.architecture.resnet_d import ResNetD
  from kornia.contrib.models.rt_detr.architecture.rtdetr_head import RTDETRHead
  from kornia.core import Tensor
label_desc: Use image node_id 3 for calling the RTDETR obj's underlying member method code with example usage: obj.forward(images) and returns: logits,  boxes