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