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:
Local File Sink
,Path Deviation
,LMM
,VLM as Detector
,Google Vision OCR
,OpenAI
,Size Measurement
,Stitch OCR Detections
,LMM For Classification
,Clip Comparison
,CSV Formatter
,Instance Segmentation Model
,Multi-Label Classification Model
,CogVLM
,Byte Tracker
,Roboflow Dataset Upload
,Twilio SMS Notification
,Object Detection Model
,Byte Tracker
,Detections Filter
,Florence-2 Model
,Byte Tracker
,OpenAI
,Path Deviation
,Clip Comparison
,Google Gemini
,Single-Label Classification Model
,Detections Stabilizer
,OCR Model
,Dimension Collapse
,Roboflow Dataset Upload
,Detections Stitch
,Template Matching
,Llama 3.2 Vision
,Slack Notification
,Object Detection Model
,Velocity
,VLM as Classifier
,Moondream2
,Bounding Rectangle
,Detections Consensus
,Roboflow Custom Metadata
,Anthropic Claude
,Webhook Sink
,Detections Merge
,Dynamic Zone
,YOLO-World Model
,Detection Offset
,Buffer
,Overlap Filter
,Instance Segmentation Model
,Segment Anything 2 Model
,Time in Zone
,Model Monitoring Inference Aggregator
,Keypoint Detection Model
,Perspective Correction
,Dynamic Crop
,Detections Transformation
,Detections Classes Replacement
,Time in Zone
,VLM as Detector
,Email Notification
,Line Counter
,Florence-2 Model
- outputs:
Classification Label Visualization
,Stitch OCR Detections
,Line Counter
,Instance Segmentation Model
,Stitch Images
,Byte Tracker
,Image Slicer
,Roboflow Dataset Upload
,Absolute Static Crop
,Twilio SMS Notification
,Distance Measurement
,Object Detection Model
,SIFT Comparison
,Florence-2 Model
,Byte Tracker
,Label Visualization
,Path Deviation
,Roboflow Dataset Upload
,Detections Stitch
,Bounding Box Visualization
,Pixel Color Count
,Slack Notification
,Object Detection Model
,Model Comparison Visualization
,Bounding Rectangle
,Detections Consensus
,Grid Visualization
,Detections Merge
,Dynamic Zone
,Detection Offset
,Halo Visualization
,Overlap Filter
,Triangle Visualization
,Keypoint Detection Model
,Time in Zone
,Model Monitoring Inference Aggregator
,Reference Path Visualization
,Perspective Correction
,Detections Classes Replacement
,Dynamic Crop
,Time in Zone
,Identify Changes
,Detections Transformation
,Florence-2 Model
,Path Deviation
,Ellipse Visualization
,Size Measurement
,Blur Visualization
,Dot Visualization
,Image Blur
,Circle Visualization
,Background Color Visualization
,Color Visualization
,Byte Tracker
,Detections Filter
,Pixelate Visualization
,Dominant Color
,Identify Outliers
,Keypoint Detection Model
,Stability AI Inpainting
,Detections Stabilizer
,Keypoint Visualization
,Mask Visualization
,Velocity
,Image Preprocessing
,Line Counter Visualization
,Roboflow Custom Metadata
,Anthropic Claude
,Webhook Sink
,SIFT Comparison
,Trace Visualization
,Instance Segmentation Model
,Corner Visualization
,Polygon Visualization
,Segment Anything 2 Model
,Crop Visualization
,Email Notification
,Image Contours
,Image Slicer
,Line Counter
,Image Threshold
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[object_detection_prediction
,instance_segmentation_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:
Local File Sink
,Path Deviation
,LMM
,VLM as Detector
,Google Vision OCR
,OpenAI
,Size Measurement
,Stitch OCR Detections
,LMM For Classification
,Clip Comparison
,CSV Formatter
,Instance Segmentation Model
,Multi-Label Classification Model
,CogVLM
,Byte Tracker
,Roboflow Dataset Upload
,Twilio SMS Notification
,Object Detection Model
,Byte Tracker
,Detections Filter
,Florence-2 Model
,Byte Tracker
,OpenAI
,Path Deviation
,Clip Comparison
,Google Gemini
,Single-Label Classification Model
,Detections Stabilizer
,OCR Model
,Dimension Collapse
,Roboflow Dataset Upload
,Detections Stitch
,Template Matching
,Llama 3.2 Vision
,Slack Notification
,Object Detection Model
,Velocity
,VLM as Classifier
,Moondream2
,Bounding Rectangle
,Detections Consensus
,Roboflow Custom Metadata
,Anthropic Claude
,Webhook Sink
,Detections Merge
,Dynamic Zone
,YOLO-World Model
,Detection Offset
,Buffer
,Overlap Filter
,Instance Segmentation Model
,Segment Anything 2 Model
,Time in Zone
,Model Monitoring Inference Aggregator
,Keypoint Detection Model
,Perspective Correction
,Dynamic Crop
,Detections Transformation
,Detections Classes Replacement
,Time in Zone
,VLM as Detector
,Email Notification
,Line Counter
,Florence-2 Model
- outputs:
Classification Label Visualization
,Stitch OCR Detections
,Instance Segmentation Model
,Stitch Images
,Byte Tracker
,Image Slicer
,Absolute Static Crop
,Twilio SMS Notification
,Object Detection Model
,SIFT Comparison
,Byte Tracker
,Label Visualization
,Bounding Box Visualization
,Pixel Color Count
,Slack Notification
,Object Detection Model
,Detections Consensus
,Grid Visualization
,Dynamic Zone
,Detection Offset
,Halo Visualization
,Triangle Visualization
,Keypoint Detection Model
,Reference Path Visualization
,Perspective Correction
,Identify Changes
,Ellipse Visualization
,Blur Visualization
,Dot Visualization
,Image Blur
,Circle Visualization
,Color Visualization
,Byte Tracker
,Pixelate Visualization
,Dominant Color
,Identify Outliers
,Keypoint Detection Model
,Detections Stabilizer
,Keypoint Visualization
,Mask Visualization
,Image Preprocessing
,Line Counter Visualization
,Anthropic Claude
,Webhook Sink
,SIFT Comparison
,Trace Visualization
,Instance Segmentation Model
,Corner Visualization
,Polygon Visualization
,Crop Visualization
,Email Notification
,Image Contours
,Image Slicer
,Image Threshold
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[object_detection_prediction
,instance_segmentation_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"
}