Line Counter¶
Version v2
¶
The LineCounter
is an analytics block designed to count objects passing the line.
The block requires detections to be tracked (i.e. each object must have unique tracker_id assigned,
which persists between frames)
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/line_counter@v2
to add the block as
as step in your workflow.
Properties¶
Name | Type | Description | Refs |
---|---|---|---|
name |
str |
The unique name of this step.. | ❌ |
line_segment |
List[Any] |
Line in the format [[x1, y1], [x2, y2]] consisting of exactly two points. For line [[0, 100], [100, 100]] line will count objects entering from the bottom as IN. | ✅ |
triggering_anchor |
str |
Point from the detection for triggering line crossing.. | ✅ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow
runtime. See Bindings for more info.
Available Connections¶
Check what blocks you can connect to Line Counter
in version v2
.
- inputs:
Detections Filter
,Detections Consensus
,VLM as Detector
,Path deviation
,Byte Tracker
,Google Gemini
,Path deviation
,Size Measurement
,Anthropic Claude
,Object Detection Model
,OpenAI
,Detections Transformation
,Perspective Correction
,Byte Tracker
,Detections Stitch
,Detection Offset
,Template Matching
,Clip Comparison
,Time in zone
,Detections Classes Replacement
,Florence-2 Model
,Dynamic Zone
,Time in zone
,YOLO-World Model
,Segment Anything 2 Model
,Instance Segmentation Model
,Dimension Collapse
,Bounding Rectangle
,Google Vision OCR
,Clip Comparison
- outputs:
Line Counter Visualization
The available connections depend on its binding kinds. Check what binding kinds
Line Counter
in version v2
has.
Bindings
-
input
image
(image
): not available.detections
(Union[object_detection_prediction
,instance_segmentation_prediction
]): Predictions.line_segment
(list_of_values
): Line in the format [[x1, y1], [x2, y2]] consisting of exactly two points. For line [[0, 100], [100, 100]] line will count objects entering from the bottom as IN.triggering_anchor
(string
): Point from the detection for triggering line crossing..
-
output
Example JSON definition of step Line Counter
in version v2
{
"name": "<your_step_name_here>",
"type": "roboflow_core/line_counter@v2",
"image": "<block_does_not_provide_example>",
"detections": "$steps.object_detection_model.predictions",
"line_segment": [
[
0,
50
],
[
500,
50
]
],
"triggering_anchor": "CENTER"
}
Version v1
¶
The LineCounter
is an analytics block designed to count objects passing the line.
The block requires detections to be tracked (i.e. each object must have unique tracker_id assigned,
which persists between frames)
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/line_counter@v1
to add the block as
as step in your workflow.
Properties¶
Name | Type | Description | Refs |
---|---|---|---|
name |
str |
The unique name of this step.. | ❌ |
line_segment |
List[Any] |
Line in the format [[x1, y1], [x2, y2]] consisting of exactly two points. For line [[0, 100], [100, 100]] line will count objects entering from the bottom as IN. | ✅ |
triggering_anchor |
str |
Point from the detection for triggering line crossing.. | ✅ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow
runtime. See Bindings for more info.
Available Connections¶
Check what blocks you can connect to Line Counter
in version v1
.
- inputs:
Detections Filter
,Detections Consensus
,VLM as Detector
,Path deviation
,Byte Tracker
,Google Gemini
,Path deviation
,Size Measurement
,Anthropic Claude
,Object Detection Model
,OpenAI
,Detections Transformation
,Perspective Correction
,Byte Tracker
,Detections Stitch
,Detection Offset
,Template Matching
,Clip Comparison
,Time in zone
,Detections Classes Replacement
,Florence-2 Model
,Dynamic Zone
,Time in zone
,YOLO-World Model
,Segment Anything 2 Model
,Instance Segmentation Model
,Dimension Collapse
,Bounding Rectangle
,Google Vision OCR
,Clip Comparison
- outputs:
Line Counter Visualization
The available connections depend on its binding kinds. Check what binding kinds
Line Counter
in version v1
has.
Bindings
-
input
metadata
(video_metadata
): not available.detections
(Union[object_detection_prediction
,instance_segmentation_prediction
]): Predictions.line_segment
(list_of_values
): Line in the format [[x1, y1], [x2, y2]] consisting of exactly two points. For line [[0, 100], [100, 100]] line will count objects entering from the bottom as IN.triggering_anchor
(string
): Point from the detection for triggering line crossing..
-
output
Example JSON definition of step Line Counter
in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/line_counter@v1",
"metadata": "<block_does_not_provide_example>",
"detections": "$steps.object_detection_model.predictions",
"line_segment": [
[
0,
50
],
[
500,
50
]
],
"triggering_anchor": "CENTER"
}