Line Counter¶
v2¶
Class: LineCounterBlockV2
(there are multiple versions of this block)
Source: inference.core.workflows.core_steps.analytics.line_counter.v2.LineCounterBlockV2
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
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 |
Enter a unique identifier for this step.. | ❌ |
line_segment |
List[Any] |
Line consisting of exactly two points. For line [[0, 100], [100, 100]], objects entering from the bottom will count as IN.. | ✅ |
triggering_anchor |
str |
The point on the detection that must cross the line to be counted.. | ✅ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow
runtime. See Bindings for more info.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to Line Counter
in version v2
.
- inputs:
Keypoint Detection Model
,CogVLM
,Anthropic Claude
,OpenAI
,Google Vision OCR
,Detections Classes Replacement
,Florence-2 Model
,Detection Offset
,Dimension Collapse
,Single-Label Classification Model
,VLM as Detector
,OpenAI
,Moondream2
,YOLO-World Model
,Object Detection Model
,Overlap Filter
,VLM as Detector
,Path Deviation
,CSV Formatter
,LMM
,Segment Anything 2 Model
,Multi-Label Classification Model
,Twilio SMS Notification
,Google Gemini
,Byte Tracker
,Roboflow Custom Metadata
,Size Measurement
,Perspective Correction
,Slack Notification
,Detections Transformation
,Instance Segmentation Model
,VLM as Classifier
,Detections Merge
,Webhook Sink
,Detections Consensus
,LMM For Classification
,Detections Stitch
,Clip Comparison
,Line Counter
,Detections Filter
,Dynamic Zone
,Instance Segmentation Model
,Florence-2 Model
,Detections Stabilizer
,Model Monitoring Inference Aggregator
,Stitch OCR Detections
,Template Matching
,Bounding Rectangle
,Roboflow Dataset Upload
,Roboflow Dataset Upload
,Time in Zone
,Email Notification
,Path Deviation
,Object Detection Model
,Llama 3.2 Vision
,Byte Tracker
,ONVIF Control
,Byte Tracker
,Clip Comparison
,Time in Zone
,Buffer
,Dynamic Crop
,OpenAI
,Velocity
,OCR Model
,Local File Sink
- outputs:
Keypoint Detection Model
,Anthropic Claude
,Detections Classes Replacement
,Florence-2 Model
,Detection Offset
,Distance Measurement
,Pixelate Visualization
,SIFT Comparison
,Object Detection Model
,Mask Visualization
,Image Slicer
,Overlap Filter
,Triangle Visualization
,Path Deviation
,Model Comparison Visualization
,Crop Visualization
,Classification Label Visualization
,Segment Anything 2 Model
,Keypoint Detection Model
,Reference Path Visualization
,Twilio SMS Notification
,Line Counter
,Bounding Box Visualization
,Image Contours
,Byte Tracker
,Roboflow Custom Metadata
,Size Measurement
,Circle Visualization
,Perspective Correction
,Slack Notification
,Pixel Color Count
,Polygon Visualization
,Detections Transformation
,Instance Segmentation Model
,Trace Visualization
,Detections Merge
,Webhook Sink
,Color Visualization
,Identify Changes
,Detections Consensus
,Image Threshold
,Detections Stitch
,SIFT Comparison
,Absolute Static Crop
,Stitch Images
,Line Counter Visualization
,Line Counter
,Dot Visualization
,Detections Filter
,Identify Outliers
,Dynamic Zone
,Instance Segmentation Model
,Background Color Visualization
,Florence-2 Model
,Detections Stabilizer
,Stitch OCR Detections
,Model Monitoring Inference Aggregator
,Image Slicer
,Bounding Rectangle
,Roboflow Dataset Upload
,Roboflow Dataset Upload
,Image Blur
,Time in Zone
,Email Notification
,Grid Visualization
,Path Deviation
,Object Detection Model
,Blur Visualization
,Label Visualization
,Stability AI Inpainting
,Image Preprocessing
,Byte Tracker
,Ellipse Visualization
,ONVIF Control
,Byte Tracker
,Halo Visualization
,Corner Visualization
,Time in Zone
,Dynamic Crop
,Keypoint Visualization
,Velocity
,Dominant Color
Input and Output Bindings¶
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[instance_segmentation_prediction
,object_detection_prediction
]): Model predictions to count line crossings for..line_segment
(list_of_values
): Line consisting of exactly two points. For line [[0, 100], [100, 100]], objects entering from the bottom will count as IN..triggering_anchor
(string
): The point on the detection that must cross the line to be counted..
-
output
count_in
(integer
): Integer value.count_out
(integer
): Integer value.detections_in
(Union[object_detection_prediction
,instance_segmentation_prediction
]): Prediction with detected bounding boxes in form of sv.Detections(...) object ifobject_detection_prediction
or Prediction with detected bounding boxes and segmentation masks in form of sv.Detections(...) object ifinstance_segmentation_prediction
.detections_out
(Union[object_detection_prediction
,instance_segmentation_prediction
]): Prediction with detected bounding boxes in form of sv.Detections(...) object ifobject_detection_prediction
or Prediction with detected bounding boxes and segmentation masks in form of sv.Detections(...) object ifinstance_segmentation_prediction
.
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"
}
v1¶
Class: LineCounterBlockV1
(there are multiple versions of this block)
Source: inference.core.workflows.core_steps.analytics.line_counter.v1.LineCounterBlockV1
Warning: This block has multiple versions. Please refer to the specific version for details. You can learn more about how versions work here: Versioning
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 |
Enter a unique identifier for this step.. | ❌ |
line_segment |
List[Any] |
Line consisting of exactly two points. For line [[0, 100], [100, 100]], objects entering from the bottom will count as IN.. | ✅ |
triggering_anchor |
str |
The point on the detection that must cross the line to be counted.. | ✅ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow
runtime. See Bindings for more info.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to Line Counter
in version v1
.
- inputs:
Keypoint Detection Model
,CogVLM
,Anthropic Claude
,OpenAI
,Google Vision OCR
,Detections Classes Replacement
,Florence-2 Model
,Detection Offset
,Dimension Collapse
,Single-Label Classification Model
,VLM as Detector
,OpenAI
,Moondream2
,YOLO-World Model
,Object Detection Model
,Overlap Filter
,VLM as Detector
,Path Deviation
,CSV Formatter
,LMM
,Segment Anything 2 Model
,Multi-Label Classification Model
,Twilio SMS Notification
,Google Gemini
,Byte Tracker
,Roboflow Custom Metadata
,Size Measurement
,Perspective Correction
,Slack Notification
,Detections Transformation
,Instance Segmentation Model
,VLM as Classifier
,Detections Merge
,Webhook Sink
,Detections Consensus
,LMM For Classification
,Detections Stitch
,Clip Comparison
,Line Counter
,Detections Filter
,Dynamic Zone
,Instance Segmentation Model
,Florence-2 Model
,Detections Stabilizer
,Model Monitoring Inference Aggregator
,Stitch OCR Detections
,Template Matching
,Bounding Rectangle
,Roboflow Dataset Upload
,Roboflow Dataset Upload
,Time in Zone
,Email Notification
,Path Deviation
,Object Detection Model
,Llama 3.2 Vision
,Byte Tracker
,ONVIF Control
,Byte Tracker
,Clip Comparison
,Time in Zone
,Buffer
,Dynamic Crop
,OpenAI
,Velocity
,OCR Model
,Local File Sink
- outputs:
Keypoint Detection Model
,Anthropic Claude
,Detections Classes Replacement
,Detection Offset
,Pixelate Visualization
,SIFT Comparison
,Object Detection Model
,Mask Visualization
,Image Slicer
,Triangle Visualization
,Crop Visualization
,Classification Label Visualization
,Keypoint Detection Model
,Reference Path Visualization
,Twilio SMS Notification
,Bounding Box Visualization
,Image Contours
,Byte Tracker
,Circle Visualization
,Perspective Correction
,Slack Notification
,Pixel Color Count
,Polygon Visualization
,Instance Segmentation Model
,Trace Visualization
,Webhook Sink
,Color Visualization
,Identify Changes
,Detections Consensus
,Image Threshold
,SIFT Comparison
,Absolute Static Crop
,Stitch Images
,Line Counter Visualization
,Dot Visualization
,Identify Outliers
,Dynamic Zone
,Instance Segmentation Model
,Detections Stabilizer
,Stitch OCR Detections
,Image Slicer
,Image Blur
,Email Notification
,Grid Visualization
,Object Detection Model
,Blur Visualization
,Label Visualization
,Image Preprocessing
,Byte Tracker
,Ellipse Visualization
,ONVIF Control
,Byte Tracker
,Halo Visualization
,Corner Visualization
,Keypoint Visualization
,Dominant Color
Input and Output Bindings¶
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[instance_segmentation_prediction
,object_detection_prediction
]): Predictions.line_segment
(list_of_values
): Line consisting of exactly two points. For line [[0, 100], [100, 100]], objects entering from the bottom will count as IN..triggering_anchor
(string
): The point on the detection that must cross the line to be counted..
-
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"
}