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