Skip to content

Commit

Permalink
v1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 21, 2023
1 parent fa52df3 commit e977f66
Show file tree
Hide file tree
Showing 73 changed files with 5,044 additions and 392 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ If you need to test SIO analytics service and don't have an available RTSP sourc
Next, copy your test video file to the live555 mount path:
```bash
mkdir -p "${SH_BASE}"/services/live555/test-data
mkdir -p "${SH_BASE}"/media/input/video/live555
# cp or scp
cp <my-video> "${SH_BASE}"/services/live555/test-data/my-video.mp4
cp <my-video> "${SH_BASE}"/media/input/video/live555/my-video.mp4
```
You can also execute this by running:
Expand Down
9 changes: 9 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Release Notes

## v1.5.3
- Add Aqueduct API and UI examples
- Refine Aqueduct runner example
- Add fakeRTSP example configuration
- Update live555
- Update MCP to 1.3.2
- Update SIO to r231120
- Fix samples' compatibility with DNNCam/DNNNode
- Allow samples to define SIO image version via SIO_RELEASE define


## v1.5.2
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.5.2
v1.5.3
13 changes: 13 additions & 0 deletions configurations/fakeRTSP.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
select_live555_video
disable amqp-stats
remove_orphans
enable live555
enable mcp
enable rabbitmq
enable sio
select_example sio live555
up live555
up rabbitmq
up mcp
test_rtsp_stream rtsp://localhost:7554/data/my-video.mkv 5
restart sio
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"
services:

analytics:
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:r230828
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:${SIO_RELEASE-r231120}${SIO_DOCKER_TAG_VARIANT}
restart: unless-stopped
environment:
# Location where SIO will place generated model engine files
Expand Down
21 changes: 19 additions & 2 deletions deployment-examples/StandaloneSIOWithExtension/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Standalone Folder Watcher Deployment of SIO
# Standalone SIO sample

In this example, SIO is deployed in a stand-alone manner, without a RabbitMQ broker or client processing the results.
Instead, a pipeline extension is used to process and report the pipeline output.

Contact [[email protected]](mailto:[email protected]) with any questions, and visit our [Developer Portal](https://dev.sighthound.com) for more information.


## Running the sample
## General

Before getting started, you must copy your `sighthound-license.json` into the `./StandaloneSIOWithExtension/config/` folder. If you do not have a license, please contact [[email protected]](mailto:[email protected]).

## Running the folder watcher sample

Ensure `./StandaloneSIOWithExtension/data/input` exists prior to starting the service.

Next, open a terminal, `cd` into the `./StandaloneSIOWithExtension/` folder, and run the following command to start the services:
Expand All @@ -26,3 +28,18 @@ SIO_DOCKER_RUNTIME=nvidia docker compose up -d

You can then deposit images and videos into `./StandaloneSIOWithExtension/data/input` and watch the output being printed as those are being procesed.

## Running the RTSP sample

RTSP sample will consume the video feed via specified URL. The sample is packaged with a video file streamed from `live555` service container.
You can remove that service from `docker-compose-rtsp` if pointing the configuration in `config/analytics/pipelines-rtsp.json` to a different RTSP URL.

You start the sample in a manner similar to folder watcher sample, using `docker compose -f docker-compose-rtsp.yml up -d` command to start the service.

This configuration also demonstrates how to adapt the pipeline to a particular camera view. In this case, we see cars driving on the street,
cars making the right turn from the right lane and cars making the left turn from the left lane.
For the cars on the street we almost never see their license plates; thus it makes most sense to exclude those entirely. This is done by setting `lptSkipCarsWithoutLPs`
to `true`. The cars in the left lane may be seen or not, depending on whether there are cars in the right lane to occlude them. We expect that no one would want a
camera deployed in such non-deterministic way - thus assuming that monitoring the right turn lane is the purpose of this camera. Setting filters in `boxFilter-rtsp.json`
ensures we're not going to analyze objects outside of the bottom right quadrant ROI (`lp_roiFilter` accomplishes that), and won't analyze objects below size threshold (`vehicle_SizeFilter`
and `lp_SizeFilter` filters accomplish that).

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[
{
"name": "lp_roiFilter",
"type" : "roi",
"region" : [ 0.5, 0.5, 0.99999, 0.99999 ],
"behavior": "boxInRoi",
"classes": ["licenseplate"],
"debug": false
},
{
"name": "lp_SizeFilter",
"type": "size",
"subtype": "dimension",
"max": 0,
"min": 30,
"classes": ["licenseplate", "motorbike"],
"debug": false
},
{
"name": "vehicle_SizeFilter",
"type": "size",
"subtype": "dimension",
"max": 0,
"min": 40,
"classes": ["car", "bus", "truck"],
"debug": false
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"unifiedEU-US" : {
"pipeline" : "./share/pipelines/VehicleAnalytics/VehicleAnalyticsRTSP.yaml",
"restartPolicy" : "restart",
"parameters" : {
"VIDEO_IN" : "rtsp://live555_svc:554/Turn-02.mkv",
"boxFilterConfig" : "/config/analytics/boxFilter-rtsp.json",
"detectionModel" : "gen6es",
"lptFilter" : "['us']",
"mmcFilter" : "['us']",
"lptMinConfidence" : "0.5",
"sourceId" : "fw-1",
"lptPreferAccuracyToSpeed" : "true",
"extensionModules" : "/config/analytics/extension.py",
"extensionConfigurations" : "/config/analytics/extensionConfig1.json",
"useTracker" : "true",
"updateOnlyOnChange" : "true",
"lptStabilizationDelay" : "5",
"updateOnImprovedScore" : "true",
"debugSettings" : "log,json",
"lptSkipCarsWithoutLPs" : "true"
},
"disabledParameters" : {
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: "2.3"
services:

# By default pipelines.json will point to streams served by this container.
# If you point to your own cameras or streams, this container has no other
# function and can be disabled.
live555_svc:
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/live555:2.0.4-examples
container_name: sample-live555
restart: unless-stopped
ports:
- "8554:554"


analytics:
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:${SIO_RELEASE-r231120}${SIO_DOCKER_TAG_VARIANT}
restart: unless-stopped
environment:
# Location where SIO will place generated model engine files
- SIO_DATA_DIR=/data/sio-cache
# We need this to see output from Python extension module
- PYTHONUNBUFFERED=1
# Container runtime defaults to `runc` if SIO_DOCKER_RUNTIME not set. Use `nvidia` if GPU is installed.
runtime: ${SIO_DOCKER_RUNTIME-runc}
volumes:
# Read-only shared folder for data exchange with host / other containers.
# We'll use it for license, config files, etc.
- ./config:/config:ro
# Writable shared folder for data exchange with host
# We'll use it for storing the generated model files, data exchange folder, etc.
- ./data:/data
entrypoint:
- /sighthound/sio/bin/runPipelineSet
# Pipeline configuration file
- /config/analytics/pipelines-rtsp.json
# License at the path accessible in the container
- --license-path=/config/sighthound-license.json
# Log level (info, debug, trace)
- --log=${SIO_LOG_LEVEL-info}
depends_on:
# This dependency can be removed with live555 if no longer necessary.
- live555_svc

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: "3"
version: "2.3"
services:

analytics:
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:r231024
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:${SIO_RELEASE-r231120}${SIO_DOCKER_TAG_VARIANT}
restart: unless-stopped
environment:
# Location where SIO will place generated model engine files
Expand Down
6 changes: 6 additions & 0 deletions deployment-examples/VideoStreamsConsumer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ If you have an NVIDIA GPU installed and properly configured, you can run the fol
SIO_DOCKER_RUNTIME=nvidia docker compose up -d
```

Or if you have an NVIDIA Tegra device properly configured (e/g DNNcam), you can run the following command instead to enable GPU acceleration:

```bash
SIO_DOCKER_RUNTIME=nvidia SIO_DOCKER_TAG_VARIANT="-r32.7.3-arm64v8" docker-compose up -d
```

## Running the client sample

Once the services are up and running, start the client sample with a `docker compose up` command while inside the relevant sample's folder in `./clients/python/`.
Expand Down
6 changes: 3 additions & 3 deletions deployment-examples/VideoStreamsConsumer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: "3"
version: "2.3"
services:

# By default pipelines.json will point to streams served by this container.
# If you point to your own cameras or streams, this container has no other
# function and can be disabled.
live555_svc:
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/live555:latest
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/live555:2.0.4-examples
container_name: sample-live555
restart: unless-stopped
ports:
Expand All @@ -31,7 +31,7 @@ services:

# The SIO analytics container, consuming the streams and analyzing them
analytics_svc:
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:r230908
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:${SIO_RELEASE-r231120}${SIO_DOCKER_TAG_VARIANT}
container_name: sample-sio
restart: unless-stopped
environment:
Expand Down
4 changes: 2 additions & 2 deletions deployment-examples/VideoStreamsRecorder/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
# If you point to your own cameras or streams, this container has no other
# function and can be disabled.
live555_svc:
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/live555:2.0.3-examples
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/live555:2.0.4-examples
container_name: sample-live555
restart: unless-stopped
ports:
Expand Down Expand Up @@ -52,7 +52,7 @@ services:

# The SIO analytics container, consuming the streams and analyzing them
analytics_svc:
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:r230908${SIO_DOCKER_TAG_VARIANT}
image: us-central1-docker.pkg.dev/ext-edge-analytics/docker/sio:${SIO_RELEASE-r231120}${SIO_DOCKER_TAG_VARIANT}
container_name: sample-sio
restart: unless-stopped
environment:
Expand Down
2 changes: 1 addition & 1 deletion docs/schemas/anypipe/anypipe.html

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions examples/AqueductAPI/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use an official Python runtime as a parent image
FROM python:3.8-slim-buster

# Working directory
WORKDIR /app

# Install dependencies
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt

# Copy the application into the container
# COPY ../lib/ /app/lib
COPY ./src/ /app/

# Make port 5000 available
EXPOSE 5000
ENV PYTHONPATH=${PYTHONPATH}:/app/:/app/lib/
# TERM environment variable not set.
ENV TERM=xterm-256color

# Run app.py when the container launches
CMD ["python", "app.py"]
32 changes: 32 additions & 0 deletions examples/AqueductAPI/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Aqueduct API

This is a Flask-based API to manage video analytics pipelines. The API provides functionalities to start, stop, delete, and fetch the status of pipelines.

## Features
- Start Pipeline: Initialize a new pipeline with specified parameters.
- Stop Pipeline: Terminate an existing pipeline.
- Delete Pipeline: Remove an existing pipeline.
- Fetch Status: Retrieve the status of all pipelines or a single pipeline.

## How to run
First start all the dependencies:
```bash
./scripts sh-services apply ./examples/AqueductAPI/aqueduct.conf
cd ./examples/AqueductAPI
```

And then build and run the Docker Compose:
```bash
docker compose build
docker compose up
```

Your API should now be accessible at http://localhost:8888.

## API Endpoints
- POST `/pipelines/start`: Starts a new pipeline.
- POST `/pipelines/stop`: Stops an existing pipeline.
- POST `/pipelines/delete`: Deletes an existing pipeline.
- GET `/pipelines/status`: Gets the status of all pipelines.
- GET `/pipelines/status/<string:sourceId>`: Gets the status of a specific pipeline.
- GET `/health`: Health check.
13 changes: 13 additions & 0 deletions examples/AqueductAPI/aqueduct.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
select_live555_video
disable amqp-stats
remove_orphans
enable live555
enable mcp
enable rabbitmq
enable sio
select_example sio aqueduct
up live555
up rabbitmq
up mcp
test_rtsp_stream rtsp://localhost:7554/data/my-video.mkv 5
restart sio
20 changes: 20 additions & 0 deletions examples/AqueductAPI/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: "2"

services:
aqueduct-api:
build: .
restart: unless-stopped
volumes:
- ../lib:/app/lib
- ../../..:/data/sighthound
- ./src:/app
ports:
- "8888:8888"
networks:
core_sighthound:
aliases:
- aqueduct-api

networks:
core_sighthound:
external: true
9 changes: 9 additions & 0 deletions examples/AqueductAPI/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Flask==1.1.2
flask-restx==1.1.0
flask-cors==3.0.10
pika==1.2.0
jinja2==2.11.2
markupsafe==1.1.1
itsdangerous==1.1.0
werkzeug==2.0.3
tabulate==0.8.9
Loading

0 comments on commit e977f66

Please sign in to comment.