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