Docs /Templates/ sinapsis-fast-alpr

ObjectSpeedCalculation

sinapsis-fast-alprcommunity

Python template · sinapsis_fast_alpr.templates.speed_calculation

Overview

Template that takes oriented bounding boxes of detections and approximates a speed based on the attributes

Example agent:

agent: name: my_test_agent templates: - template_name: InputTemplate class_name: InputTemplate attributes: {} - template_name: ObjectSpeedCalculation class_name: ObjectSpeedCalculation template_input: InputTemplate attributes: fps: '`replace_me:<class ''int''>`' meters_per_pixel: '`replace_me:<class ''float''>`' speed_limit: '`replace_me:<class ''int''>`'

Capabilities

Capabilities: not set

Installation

Install the published package using pip or uv.

Terminalbash
pip install sinapsis-fast-alpr==1.0.0
uv pip install sinapsis-fast-alpr==1.0.0
uv add sinapsis-fast-alpr==1.0.0

Configuration

Effective fields from the inspector schema, including nested Pydantic model fields.

fpsRequired

frames per second of the video

int
Required
Default: null
metadata
sinapsis_core.template_base.base_models.TemplateMetadata | None
Optional
Default: null
speed_limitRequired

speed limit to set for identifying detections going over

int
Required
Default: null
meters_per_pixelRequired

value of approximate meters per pixel in the image

float
Required
Default: null

Configuration example

Generated from documented defaults. Replace any placeholders and complete required nested settings before running.

yaml
templates:
  - template_name: "ObjectSpeedCalculation"
    class_name: "ObjectSpeedCalculation"
    attributes:
      fps: "<required>"
      speed_limit: "<required>"
      meters_per_pixel: "<required>"

Inheritance

Immediate parent: sinapsis_core.template_base.template.Template

Environment variables

Environment definitions belong to their canonical Python modules.

No directly related environment variables listed.