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