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