Skip to content

VehicleAnalytics Examples

See the VehicleAnalytics pipeline reference 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:

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

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.

./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 run -it --rm \
-v /data:/data -e SIO_DATA_DIR=/data \
us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:r240409 \
/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.json

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:

./bin/runPipeline \
./share/pipelines/VehicleAnalytics/VehicleAnalyticsRTSP.yaml \
VIDEO_IN='rtsp://user:pass@10.0.0.1:554/stream_path'
docker run -it --rm \
-v /data:/data -e SIO_DATA_DIR=/data \
us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:r240409 \
/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.json

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.

./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 run -it --rm \
-v /data:/data -e SIO_DATA_DIR=/data \
us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:r240409 \
/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.json