{"slug": "how-rf-detr-atto-detects-objects-in-1-ms-on-an-nvidia-t4", "title": "How RF-DETR Atto Detects Objects in 1 ms on an NVIDIA T4", "summary": "Roboflow's RF-DETR Atto, the smallest model in its RF-DETR detector family, ran at a median 1.0 ms per image at batch size one on an NVIDIA T4 GPU while scoring 30.5 COCO mAP@50:95, the company reported. RF-DETR Femto adds 7.3 COCO points for about 0.4 ms more latency (1.4 ms, 37.8 AP), and RF-DETR Pico reaches 41.6 AP at 1.7 ms, beating YOLO26-N's 40.3 AP at the same 1.7 ms. All three models use Meta's PE-Core-T image encoder and range from 7.4 million to 8.4 million parameters at inference, versus 30.5 million for RF-DETR Nano.", "body_md": "If you need object detection with very low latency, start with RF-DETR’s small models. Atto runs in 1 ms per image on an NVIDIA T4, Femto adds 7.3 COCO AP for 0.4 ms more, and Pico reaches 41.6 AP at 1.7 ms, which beats YOLO26-N at the same speed. Pick the size that fits your latency budget, fine-tune it on your own images with a few lines of Python, and export it to TensorRT to deploy.\n\nRF-DETR Atto (opens in a new tab), our smallest detector, had a median inference latency of 1 ms per image at batch size one on an NVIDIA T4 GPU. Atto scored 30.5 AP on COCO, which measures average precision for everyday objects like people, cars and cats.\n\nExample applications include counting parked cars, checking whether a truck occupies a loading bay, and counting cattle at a watering point.\n\nAtto, Femto and Pico range from 7.4 to 8.4 million parameters at inference, compared with 30.5 million for RF-DETR Nano. They share the same encoder design. What changes is how finely they divide the image, which patches can exchange information, and how much work they spend on each possible detection.\n\nAll three models use Meta’s PE-Core-T image encoder. It reads an image in square patches. An adapter combines the features from encoder layers 3, 6, 9 and 12 into one map with a position for each patch. The detector uses that map to propose boxes and score the possible classes. Daniel Bolya et al., Perception Encoder: The best visual embeddings are not at the output of the network (opens in a new tab), NeurIPS 2025.\n\nRF-DETR resizes each photo to a square. A higher input resolution can preserve detail that would disappear when you shrink the photo. Patch size sets how finely the encoder reads that image. For the same input, smaller patches give a distant cyclist more positions on the grid. Either change gives the encoder more patches to process and usually costs time.\n\nAttention lets each patch draw on information from other patches. Atto uses the whole grid in all 12 encoder layers. Femto and Pico repeat a three-layer pattern four times. The first two layers split the grid into four windows (two across and two down), so each patch looks only within its own window. The third looks across the whole grid. That makes layers 3, 6, 9 and 12 the global ones.\n\nThe detector ranks possible objects on the adapter’s map. Atto returns the top 300 candidates directly. Femto and Pico keep 200 and use a decoder to refine them. Each decoder layer lets the candidates share information and sample the image features again before the model predicts the final boxes and labels. These candidate slots are what the configuration calls queries.\n\nWe used neural architecture search to try different combinations of these settings and chose the three below based on COCO accuracy and inference time on the T4.\n\nModel\n\nInput (pixels)\n\nPatch (pixels)\n\nPatch grid\n\nWindows in local layers\n\nDecoder layers\n\nQueries\n\nAtto\n\n380 × 380\n\n20 × 20\n\n19 × 19\n\nWhole image throughout\n\n0\n\n300\n\nFemto\n\n384 × 384\n\n16 × 16\n\n24 × 24\n\n2 × 2\n\n2\n\n200\n\nPico\n\n560 × 560\n\n20 × 20\n\n28 × 28\n\n2 × 2\n\n3\n\n200\n\nAccuracy and speed on the T4\n\nModel\n\nT4 engine latency\n\nParameters\n\nCOCO mAP@50:95\n\nRF100-VL mAP@50:95\n\nRF-DETR Atto\n\n1.0 ms\n\n7.4 M\n\n30.5\n\n48.3\n\nRF-DETR Femto\n\n1.4 ms\n\n7.9 M\n\n37.8\n\n53.8\n\nRF-DETR Pico\n\n1.7 ms\n\n8.4 M\n\n41.6\n\n56.0\n\nDEIMv2 Atto\n\n1.1 ms\n\n0.5 M\n\n23.8\n\n38.9\n\nDEIMv2 Femto\n\n1.4 ms\n\n1.0 M\n\n31.0\n\n46.7\n\nDEIMv2 Pico\n\n1.9 ms\n\n1.5 M\n\n38.5\n\n52.9\n\nYOLO26-N\n\n1.7 ms\n\n2.6 M\n\n40.3\n\n52.0\n\nBoth accuracy columns report box mean average precision (mAP) at overlap thresholds from 50% to 95%. We set the evaluation limit (maxDets) to 100 on COCO and 500 on RF100-VL. The table rounds latency to the nearest 0.1 ms.\n\nFemto takes about 0.4 ms longer per image than Atto and scores 7.3 points higher on COCO. Pico takes another 0.3 ms and adds 3.8 points.\n\nCOCO tells us how well the pretrained models recognize familiar objects. To see how they learn a new task, like finding cattle in an aerial photo, we used Roboflow’s RF100-VL benchmark (opens in a new tab). For RF-DETR and DEIMv2, we fine-tuned each model separately on each of the 100 datasets for 100 epochs, with 16 images per batch. For each dataset, we picked the checkpoint with the best validation score and scored the PyTorch checkpoint on the test images. We then averaged the 100 test scores.\n\nRF-DETR Femto scored 53.8 AP across the 100 datasets, up from 48.3 for Atto. Pico reached 56.0. The same order held for DEIMv2. One detail matters for datasets with small objects. The DEIMv2 training recipes discard boxes below a minimum size, which excluded many training examples on datasets such as aerial cattle.\n\nHow we benchmarked the models\n\nWe used Single Artifact Benchmarking (SAB) (opens in a new tab) for RF-DETR, DEIMv2 and YOLO26-N. We measured COCO accuracy and latency with the same engine for each model, using TensorRT 10.4 in 16-bit floating point (FP16). We used the COCO validation images and an NVIDIA T4 GPU. We ran one image at a time, paused between images and report the median engine time. For RF-DETR and DEIMv2, final detection selection happens after the timer stops. The FPS figure is the reciprocal of median engine time.\n\nRun RF-DETR on your own images\n\nThis example runs on an NVIDIA GPU with a CUDA build of PyTorch. For each detection above the 0.5 confidence threshold, the script prints the label, score and box coordinates. It saves the photo with the boxes drawn on it as detections.jpg. To try Atto or Femto, replace RFDETRPico in the import and the model constructor with RFDETRAtto or RFDETRFemto. RF-DETR on GitHub (opens in a new tab)\n\n```\npip install \"rfdetr[plus]\"\npython\nfrom PIL import Image, ImageOps\nimport supervision as sv\nfrom rfdetr import RFDETRPico\nfrom rfdetr.assets.coco_classes import COCO_CLASSES\n\nimage = ImageOps.exif_transpose(Image.open(\"image.jpg\")).convert(\"RGB\")\nmodel = RFDETRPico(device=\"cuda\")\ndetections = model.predict(image, threshold=0.5)\n\nlabels = []\nfor box, score, class_id in zip(detections.xyxy, detections.confidence, detections.class_id):\n    label = f\"{COCO_CLASSES[int(class_id)]} {score:.2f}\"\n    print(label, box.round().astype(int).tolist())\n    labels.append(label)\n\nresult = sv.BoxAnnotator(thickness=6).annotate(image.copy(), detections)\nresult = sv.LabelAnnotator(text_scale=1.2).annotate(result, detections, labels)\nresult.save(\"detections.jpg\", quality=95)\n```\n\nFor fine-tuning, install the training packages.\n\n```\npip install \"rfdetr[plus,train]\"\n```\n\nReplace path/to/dataset with the folder containing your labeled images and annotations. This runs one epoch, or one pass through the training set. Increase epochs to train longer.\n\n```\nmodel.train(dataset_dir=\"path/to/dataset\", epochs=1)\n```\n\nExport Pico for an NVIDIA GPU\n\nBuild the TensorRT engine on the GPU you plan to use. On our T4 with CUDA 12, we installed these packages.\n\n```\npip install \"rfdetr[plus,onnx]\" \"tensorrt-cu12==10.16.1.11\" polygraphy\n```\n\nExport the pretrained Pico model and print the path to the FP16 engine.\n\n``` python\nfrom rfdetr import RFDETRPicomodel = RFDETRPico(device=\"cuda\")engine_path = model.export(format=\"tensorrt\", fp16=True, output_dir=\"exported\")print(engine_path)\n```\n\nKeep the .trt file and its .trt.rfdetr.json metadata file in the same folder. Load the engine and run the same photo through it to see which objects it detects.\n\n``` python\nfrom rfdetr import RFDETRInferencefrom rfdetr.assets.coco_classes import COCO_CLASSESpredictor = RFDETRInference(engine_path, device=\"cuda\")detections = predictor.predict(\"image.jpg\", threshold=0.5)print([COCO_CLASSES[int(i)] for i in detections.class_id])\n```\n\nAtto, Femto and Pico are available under the Roboflow Platform Model License 1.0. The license covers commercial deployment on Roboflow. Commercial self-hosting requires the Enterprise add-on.", "url": "https://wpnews.pro/news/how-rf-detr-atto-detects-objects-in-1-ms-on-an-nvidia-t4", "canonical_source": "https://roboflow.com/blog/rf-detr-atto-detects-objects", "published_at": "2026-11-20 00:22:49+00:00", "updated_at": "2026-11-20 00:42:14.032028+00:00", "lang": "en", "topics": ["computer-vision", "machine-learning", "ai-research", "ai-tools"], "entities": ["Roboflow", "RF-DETR Atto", "RF-DETR Femto", "RF-DETR Pico", "NVIDIA T4", "Meta", "PE-Core-T", "YOLO26-N"], "also_reported_by": [], "takeaway": "RF-DETR Atto hits 30.5 COCO AP at 1.0 ms on a T4, while Femto buys 7.3 AP for 0.4 ms more and Pico reaches 41.6 AP at 1.7 ms, edging YOLO26-N's 40.3 AP at the same latency.", "recommendation": {"advice": "Pick the RF-DETR size against your latency budget — Atto at 1.0 ms, Femto at 1.4 ms, Pico at 1.7 ms on a T4 — then export to TensorRT for deployment.", "playbook": "inference-serving", "playbook_url": "https://wpnews.pro/playbooks/inference-serving"}, "alternates": {"html": "https://wpnews.pro/news/how-rf-detr-atto-detects-objects-in-1-ms-on-an-nvidia-t4", "markdown": "https://wpnews.pro/news/how-rf-detr-atto-detects-objects-in-1-ms-on-an-nvidia-t4.md", "text": "https://wpnews.pro/news/how-rf-detr-atto-detects-objects-in-1-ms-on-an-nvidia-t4.txt", "jsonld": "https://wpnews.pro/news/how-rf-detr-atto-detects-objects-in-1-ms-on-an-nvidia-t4.jsonld"}}