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