Build with RF-DETR
Build a Package Counting App Free with RF-DETR
Count every box and package moving down a conveyor, each one exactly once. Label footage, train RF-DETR free, and deploy it as a workflow.
- No credit card
- No ML team required
- Edge, on-prem or API

Build a Package Counting App with Roboflow’s Free RF-DETR
In short
A package counting app uses computer vision to detect boxes and parcels in camera video and count each one once as it passes a set point on a conveyor or dock, without anyone scanning each label. RF-DETR (opens in a new tab), Roboflow's open-source real-time detection model, finds the packages in each frame, ByteTrack (opens in a new tab) gives each one an ID, and a line counter (opens in a new tab) counts it once as it crosses, so the same package is not counted again on every frame. With Roboflow you label your footage, train RF-DETR for free, and deploy it as a workflow that returns a running count, annotated frames, and tracked detections.
How it works
The workflow behind the package counting app
Use this Package Counting with RF-DETR workflow: each frame goes to an RF-DETR model that finds boxes and packages, then through a confidence filter to a ByteTrack tracker that gives every package an ID. A line counter counts each tracked package once as it crosses, and the boxes, IDs and running count are drawn onto the frame. Every block is editable in the low-code builder, and the Roboflow Agent can build it from a description.
- output_image
- package_count
- tracked_packages
How to build a package counting app with RF-DETR
Open the workflow and add your footage
Click "Use this free template" to copy the workflow into your Roboflow workspace. Upload frames from the camera over your conveyor, with the lighting, package mix, and belt speed you run. No footage yet? Start from a public package dataset on Roboflow Universe (opens in a new tab).
Label packages and train RF-DETR
Start with the package model already in the detect_packages block to try the workflow on your footage right away. To fit your own package mix, use Auto Label (opens in a new tab) to draw boxes for box and package, review and correct them, then train an RF-DETR model and select it in detect_packages. RF-DETR fine-tunes well on small custom datasets, so you can start with the footage you have.
Set the counting line and thresholds
Move the line in count_packages to the point where packages pass your camera. The line counter counts each tracked package once and keeps count_in and count_out separately, so one camera at a dock door can count packages arriving and leaving. Adjust the thresholds in filter_by_confidence for your package mix, and to count a still photo of a pallet, cart, or delivery instead of video, use the number of detections from detect_packages and leave out the tracker and line counter.
Check the count against a hand count
Record a short clip from your camera and count the packages in it by hand. Run the workflow on the clip and compare its total with yours, then move the line or adjust the thresholds until the two match before you rely on the count.
Deploy and connect it to your operation
Deploy the workflow as a Serverless Cloud API (opens in a new tab), or on your own hardware through Inference (opens in a new tab), to run on live camera streams, or call it from a phone or web app that uploads a photo or clip. Save each session's count with a timestamp and batch name, or add a Data Aggregator block with an 8 hour interval to get one total per shift, and compare totals with scanned counts where packages are also barcoded. Prefer code? The open-source Supervision library's LineZone (opens in a new tab) counts tracked packages in Python and reports in_count and out_count.
Roboflow MCP
Build it from your AI assistant with the Roboflow MCP
Connect the Roboflow MCP Server to Claude, Cursor, or any MCP-compatible assistant and build the whole package counting app in natural language, without leaving your editor.
Ask an assistant such as Claude or ChatGPT to search Roboflow Universe for package datasets, upload and auto-label your conveyor footage, and train an RF-DETR model on box and package classes. It can then create and run the package counting workflow on test frames and deploy it to your devices.
Paste it into your coding agent and it walks you through the rest. Setting up by hand? The server is https://mcp.roboflow.com/mcp.
Open the Roboflow listing, select Connect, then sign in to Roboflow. Available on desktop, web and mobile.
Run these commands in your terminal, then sign in to Roboflow. Claude Code CLI has no documented browser install link.
Opens the Roboflow plugin listing. Sign in if prompted and confirm the install on Cursor to add MCP and skills.
Opens the Roboflow plugin listing. Install the plugin and sign in to Roboflow when prompted to connect your account.
Opens the Roboflow plugin listing shared by ChatGPT and Codex. Install the plugin and sign in to Roboflow when prompted to connect your account.
Then run /mcp auth roboflow in Gemini CLI to sign in. Gemini CLI has no documented browser install link.
What your package counting app can do
Trained on your footage, an RF-DETR model handles the specific, hard-to-catch cases that matter on your dock:
- Count packages that touch or overlap on the belt as separate items
- Count each package once, even if it pauses, backs up, or wobbles on the line
- Count packages whose labels are missing, damaged, or facing away from a scanner
- Count a full pallet or stack of packages in a single photo
- Handle boxes, poly mailers, and envelopes, ignoring labels, tape, and shadows that look like edges
- Keep counting through changing light at dock doors
- Keep pace with fast-moving sortation lines
- Show operators every counted package on the annotated video so they can check the total
Want to customize your package counting app?
Describe the package counting app you want in plain English: the camera view, what you are counting, and where to count it. The Roboflow Agent finds the data, trains an RF-DETR model, and assembles the workflow for you.
Open source
Roboflow’s RF-DETR is open source, Apache-2.0, and free to use
RF-DETR is an open-source, Apache-2.0 licensed real-time object detection model developed by Roboflow. The rfdetr Python package and most RF-DETR models are free to use, including in commercial products, and you can train and run everything on your own hardware. No account or lock-in required.
Apache-2.0 and free
The rfdetr package, Nano to Large detection, every segmentation size and Keypoint are Apache-2.0 licensed and free to use, including commercially.
Install and train locally
pip install rfdetr on Python 3.10+. Fine-tune on your own data in a few lines and run it entirely on your machine.
State of the art on COCO
RF-DETR is a real-time detector that is SOTA on COCO. RF-DETR-Large reaches 56.5 AP at 6.8 ms on an NVIDIA T4, and uses a DINOv2 backbone.
Deploy anywhere
Export to ONNX or TensorRT and run on GPU, CPU, or NVIDIA Jetson at the edge, or serve it through the Roboflow hosted API.
| Models | Licence |
|---|---|
| Detection: Nano, Small, Medium, Large | Apache-2.0 |
| Segmentation: every size, Nano to 2XLarge | Apache-2.0 |
| Keypoint (preview) | Apache-2.0 |
| Detection: Atto, Femto, Pico, XL, 2XL (rfdetr[plus]) | PML 1.0: commercial use included on Roboflow; commercial self-hosting needs the Enterprise add-on |
RF-DETR vs. other free detectors
A package counting app has to detect every package on every frame, fast enough to keep up with a moving belt. Here is how RF-DETR, fine-tuned on your own conveyor footage, compares for real-time counting.
| Model | Tasks | Best for | License |
|---|---|---|---|
| RF-DETR | Detection, segmentation (keypoints in preview) | Real-time detection you fine-tune on your own data, one model across tasks | Apache-2.0 (Nano to Large, all segmentation); PML 1.0 (Atto, Femto, Pico, XL, 2XL) |
| D-FINE | Detection | Precision localization when you do not need to fine-tune | Apache-2.0 |
| YOLO | Detection, segmentation, pose | Fast CNN-based detection with a large ecosystem | AGPL-3.0 (commercial license required for closed-source use) |
| GroundingDINO | Open-vocabulary detection | Finding objects by text prompt with no training, not real-time | Apache-2.0 |
| SAM 2 / SAM 3 | Segmentation | Pixel-precise masks; SAM 3 adds text-prompted segmentation | Apache-2.0 (SAM 2), SAM License (SAM 3) |
| Florence-2 | Vision-language | Reading, captioning, and OCR on images | MIT |
The takeaway for this app: RF-DETR runs in real time, so it keeps pace with a moving conveyor and gives the tracker clean detections on every frame. It fine-tunes well on small custom datasets and is open source, so you can train on your own packages and run the model wherever your cameras are.
Build your package counting app free today
Label, train, and deploy your package counting app in one place.