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