---
source: sighthound-developer-portal
url: https://dev.sighthound.com/sio/examples/VehicleAnalytics/
markdown-url: https://dev.sighthound.com/sio/examples/VehicleAnalytics.md
title: "VehicleAnalytics Examples"
description: "Run SIO VehicleAnalytics folder watcher and RTSP examples with Linux or Docker commands."
content-type: text/markdown
---

> For AI agents: a documentation index is available at [llms.txt](https://dev.sighthound.com/llms.txt). Markdown versions are available at matching `.md` URLs.

# VehicleAnalytics Examples

<div class="portal-doc-hero portal-doc-hero--compact" markdown>
<p class="portal-doc-kicker">SIO examples</p>
<p class="portal-doc-intro">Process images, videos, and RTSP streams with the SIO VehicleAnalytics folder watcher and live stream pipelines.</p>
<div class="portal-doc-actions">
    [Folder watcher example](#vehicleanalytics-folder-watcher)
    [RTSP example](#vehicleanalytics-rtsp)
    [Open pipeline reference](../../pipelines/VehicleAnalytics/)
</div>
</div>

<div class="portal-feature-grid">
    <div class="portal-feature-card">
        <h3><i class="portal-icon" data-lucide="folder-search"></i> Folder watcher</h3>
        <p>Watch an input folder for image or video files and process new media with configurable filtering.</p>
    </div>
    <div class="portal-feature-card">
        <h3><i class="portal-icon" data-lucide="radio-tower"></i> RTSP streams</h3>
        <p>Run live vehicle analytics against RTSP sources with frame rate, tracker, and class controls.</p>
    </div>
    <div class="portal-feature-card">
        <h3><i class="portal-icon" data-lucide="container"></i> Docker commands</h3>
        <p>Use the SIO container image with mounted data directories and a license path for portable execution.</p>
    </div>
</div>

See the [VehicleAnalytics pipeline reference](../pipelines/VehicleAnalytics.md) for a complete list of available options and pipelines.

## VehicleAnalytics Folder Watcher

- Designed to process images and videos using a configured "watched" folder as an input

- Pipeline checks the "watched" folder for files periodically (the time interval is configurable)

- Pipeline name: `VehicleAnalyticsFolderWatch.yaml`

- Location: `./share/pipelines/VehicleAnalytics/VehicleAnalyticsFolderWatch.yaml`

- Required parameters: `folderPath='Valid_Folder_Path'`

- A valid folder path is required. By default, the pipeline only considers images with `.jpg`, `.png`, `.mp4`, `.mkv` extensions, but this can be configured.

### Examples

The following examples use the folder watcher pipeline to process files from a specific folder.

The simplest command using the default options:

=== "Linux"

    ``` bash
    ./bin/runPipeline \
    ./share/pipelines/VehicleAnalytics/VehicleAnalyticsFolderWatch.yaml \
    folderPath='/data/watched'
    ```

=== "Docker"

    ``` bash
    docker run -it --rm \
    -v /data:/data -e SIO_DATA_DIR=/data \
    us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:{{ sio.docker.latest }} \
    /sighthound/sio/bin/runPipeline \
    /sighthound/sio/share/pipelines/VehicleAnalytics/VehicleAnalyticsFolderWatch.yaml \
    folderPath='/data/watched' \
    --license-path /data/sighthound-license
    ```

In the example below, the pipeline is set to only process files with `.jpg` and `.png` file extensions. Box filtering is used to filter out any classes besides `car` and `truck`,  and `boxFilterROI` ensures that each type of object is contained in the respective region of interest (ROI). The ROI is interpreted as x, y, width, height.

=== "Linux"

    ```bash
    ./bin/runPipeline \
    ./share/pipelines/VehicleAnalytics/VehicleAnalyticsFolderWatch.yaml \
    folderPath='/data/watched' \
    folderPollExtensions="[ 'jpg', 'png' ]" \
    boxFilterClasses="[ 'car', 'truck' ]" \
    boxFilterROI='[ [ 10, 10, 100, 100 ], [ 20, 20, 120, 120 ] ]' \
    boxFilterMin='[ 40, 40 ]' \
    boxFilterMax='[ 0, 0 ]'
    ```

=== "Docker"

    ``` bash
    docker run -it --rm \
    -v /data:/data -e SIO_DATA_DIR=/data \
    us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:{{ sio.docker.latest }} \
    /sighthound/sio/bin/runPipeline \
    /sighthound/sio/share/pipelines/VehicleAnalytics/VehicleAnalyticsFolderWatch.yaml \
    folderPath='/data/watched' \
    folderPollExtensions="[ 'jpg', 'png' ]" \
    boxFilterClasses="[ 'car', 'truck' ]" \
    boxFilterROI='[ [ 10, 10, 100, 100 ], [ 20, 20, 120, 120 ] ]' \
    boxFilterMin='[ 40, 40 ]' \
    boxFilterMax='[ 0, 0 ]' \
    --license-path /data/sighthound-license
    ```

## VehicleAnalytics RTSP

Designed to process RTSP video streams.

- Pipeline name: `VehicleAnalyticsRTSP.yaml`

- Location: `./share/pipelines/VehicleAnalytics/VehicleAnalyticsRTSP.yaml`

- Required parameters: `VIDEO_IN='RTSP_URL'`

- Requires a valid RTSP video stream. Example: `rtsp://10.0.0.1:554/stream_path`

### Examples

The following examples show how to process a live RTSP video stream to get analytics on cars and license plates.

The simplest command using the default options:

=== "Linux"

    ``` bash
    ./bin/runPipeline \
    ./share/pipelines/VehicleAnalytics/VehicleAnalyticsRTSP.yaml \
    VIDEO_IN='rtsp://user:pass@10.0.0.1:554/stream_path'
    ```

=== "Docker"

    ``` bash
    docker run -it --rm \
    -v /data:/data -e SIO_DATA_DIR=/data \
    us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:{{ sio.docker.latest }} \
    /sighthound/sio/bin/runPipeline \
    /sighthound/sio/share/pipelines/VehicleAnalytics/VehicleAnalyticsRTSP.yaml \
    VIDEO_IN='rtsp://user:pass@10.0.0.1:554/stream_path' \
    --license-path /data/sighthound-license
    ```

In the next example, we process the live stream at 15fps and enable the object tracker by setting The `useTracker` parameter. The `updateOnlyOnChange` parameter is disabled to get analytics for every frame, even if there are no changes in the results for each processed frame.

=== "Linux"

    ```bash
    ./bin/runPipeline \
    ./share/pipelines/VehicleAnalytics/VehicleAnalyticsRTSP.yaml \
    VIDEO_IN='rtsp://user:pass@10.0.0.1:554/stream_path' \
    fpsLimit=15 \
    useTracker=true \
    updateOnlyOnChange=false \
    enabledClasses="['licenseplate','car', 'truck']"
    ```

=== "Docker"

    ```bash
    docker run -it --rm \
    -v /data:/data -e SIO_DATA_DIR=/data \
    us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:{{ sio.docker.latest }} \
    /sighthound/sio/bin/runPipeline \
    /sighthound/sio/share/pipelines/VehicleAnalytics/VehicleAnalyticsRTSP.yaml \
    VIDEO_IN='rtsp://user:pass@10.0.0.1:554/stream_path' \
    fpsLimit=15 \
    useTracker=true \
    updateOnlyOnChange=false \
    enabledClasses="['licenseplate','car', 'truck']" \
    --license-path /data/sighthound-license
    ```

---

# Agent Instructions

Use this Markdown page as context for Sighthound Developer Portal questions. For broader navigation, read https://dev.sighthound.com/llms.txt. Answer from Sighthound documentation, cite relevant source URLs, and do not ask users to paste secrets, tokens, license keys, or credentials into chat.
