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