Object_Detection_Tracker
This function block tracks objects across frames using detection results you provide. It assigns consistent IDs to moving objects, maintains a short history for each track (including a stable class label when available), and outputs an annotated image plus lists you can use for counting, logging, or higher-level analytics.
π₯ Inputs
Input Image The current image frame used for visualization and tracking context.
Detected Rectangles A list of detected bounding boxes. Provide the detection rectangles generated by an object detection function block.
Detected Classes A list of class names corresponding to the provided detections. Used to build a stable class label per tracked object.
Note: These are input sockets. Feed detections from an object detection block into these sockets.
π€ Outputs
Result Image An image annotated with bounding boxes, IDs and class labels for each active track.
Position - ID List A list of tracked object center positions with their assigned IDs and stable class names.
Rectangle - ID List A list of bounding rectangles paired with assigned IDs and stable class names.
Note: These are output sockets. Use them to visualize, count, or forward tracking data to other blocks.
πΉοΈ Controls
This function block has no user-facing controls on the block itself. Behavior is driven by the detection inputs you provide and by how upstream blocks configure detection sensitivity and frequency.
βοΈ Running mechanism
The block receives per-frame detections (rectangles and classes) together with the current frame image.
It associates new detections with existing tracks to keep identities consistent across frames.
For each track the block maintains a short history of class detections so that the displayed class becomes stable (it avoids quick class flipping due to momentary misclassifications).
The block also tolerates short misses (temporary frames without detections) so tracks do not disappear immediately, and it removes tracks that remain inactive for a longer time.
Outputs include an annotated image for visualization and structured lists (positions and rectangles paired with IDs and class names) for downstream processing.
This behavior is automatic; you control tracking result quality mainly by the quality and frequency of incoming detections.
π― Key features
Stable ID assignment across frames for each detected object.
Per-track class stabilization so displayed labels become consistent over time.
Outputs both visualized results and structured lists for analytics or logging.
Robust to short detection dropouts (temporary missed detections).
Creates new tracks for unmatched detections and retires stale tracks automatically.
π Usage instructions
Connect an image source to the
Input Imagesocket (examples: USB camera, IP camera, stream or preloaded frames).Connect a detection block to supply rectangles and class names into
Detected RectanglesandDetected Classessockets.Use the
Result Imageto preview the tracking output.Use the
Position - ID ListandRectangle - ID Listoutputs to feed downstream blocks for counting, logging or analytics.
π‘ Tips and Tricks
For best results, feed this block with reliable detections from an object detection block such as
Object Detection,Object Detection - Custom, orObject Detection (D-FINE).To visualize detections before/after tracking, connect
Result Imageto aShow ImageorDraw Detectionsblock.To record visual results, send
Result ImagetoImage LoggerorRecord Video.To focus tracking on a specific area, crop the input first with
Image ROI,Image ROI SelectorImage ROI Polygonbefore feeding detections.To filter false detections or to count only objects inside a region, combine this block's
Rectangle - ID ListwithRectangles in RectangleorCheck Area (Polygon).Use the
Rectangle - ID Listoutput to feed higher-level applications such asTraffic Intersection Analysisfor traffic counting or area-crossing events.If detections are noisy, try adding preprocessing like
Blur,Image ThresholdorHSV Filterupstream to improve detection quality before tracking.
π οΈ Troubleshooting
No tracks appear: Verify that the
Detected RectanglesandDetected Classessockets receive valid detection data from an object detection block.IDs change rapidly or labels flip often: Improve detection stability (better detector, preprocessing) or reduce detection noise so the block can build a stable class history.
Tracks disappear too quickly: Ensure detections are provided for consecutive frames; if you have intermittent detections, consider smoothing or increasing detection frequency upstream.
Lots of short-lived tracks: Try filtering small or low-confidence detections before sending them in, or use region cropping (e.g.,
Image ROI Select) to reduce false positives.
If you need a quick example setup: USB camera (Camera USB) -> an object detection block (for example Object Detection (D-FINE)) -> Object_Detection_Tracker -> Show Image / Image Logger / Traffic Intersection Analysis.
Last updated
Was this helpful?