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