Skip to content

Commit

Permalink
docs: EVAM inference results into Edgex (#190)
Browse files Browse the repository at this point in the history
* docs: added docs for viewing inference results in edgex

Signed-off-by: preethi-satishcandra <[email protected]>
  • Loading branch information
presatish authored Apr 10, 2023
1 parent 44cbba6 commit 8bc93bd
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
33 changes: 29 additions & 4 deletions application-services/custom/camera-management/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Camera Management Example App Service
Use the Camera Management Example application service to auto discover and connect to nearby ONVIF and USB based cameras. This application will also control cameras via commands, create inference pipelines for the camera video streams and publish inference results to MQTT broker.

This app uses [EdgeX compose][edgex-compose], [Edgex Onvif Camera device service][device-onvif-camera], [Edgex USB Camera device service][device-usb-camera] and [Edge Video Analytics Microservice][evam].
This app uses [EdgeX compose][edgex-compose], [Edgex Onvif Camera device service][device-onvif-camera],
[Edgex USB Camera device service][device-usb-camera], [Edgex MQTT device service][device-mqtt] and [Edge Video Analytics Microservice][evam].

A brief video demonstration of building and using the example app service can be found [here](https://www.youtube.com/watch?v=vZqd3j2Zn2Y).

Expand Down Expand Up @@ -107,13 +108,25 @@ sudo apt install build-essential
b. Under the `ports` section, find the entry for port 8554 and change the host_ip from `127.0.0.1` to either `0.0.0.0` or the ip address you put in the previous step.

6. Run the following `make` command to run the edgex core services along with the Onvif and Usb device services.
6. Run the following `make` command to generate the edgex core services along with MQTT, Onvif and Usb device services.

> **Note**: The `ds-onvif-camera` parameter can be omitted if no Onvif cameras are present, or the `ds-usb-camera` parameter can be omitted if no usb cameras are present.
```shell
make run no-secty ds-onvif-camera ds-usb-camera
make gen no-secty ds-mqtt mqtt-broker ds-onvif-camera ds-usb-camera
```

7. Configure [device-mqtt] service to send [Edge Video Analytics Microservice][evam] inference results into Edgex via MQTT

a. Copy the entire [evam-mqtt-edgex](edge-video-analytics/evam-mqtt-edgex) folder into `edgex-compose/compose-builder` directory.

b. Copy and paste [docker-compose.override.yml](edge-video-analytics/evam-mqtt-edgex/docker-compose.override.yml) from the above copied folder into edgex-compose/compose-builder directory.
Insert full path of `edgex-compose/compose-builder` directory under volumes in this `docker-compose.override.yml`.
> **Note**: Please note that both the services in this file need the full path to be inserted for their volumes.

8. Run the following command to start all the Edgex services.
```shell
docker compose -f docker-compose.yml -f docker-compose.override.yml up -d
```

### 2. Start [Edge Video Analytics Microservice][evam] running for inference.

Expand Down Expand Up @@ -142,7 +155,7 @@ make run-edge-video-analytics
> **Note**: This step is only required if you have Onvif cameras. Currently, this example app is limited to supporting
> only 1 username/password combination for all Onvif cameras.

> **Note:** Please follow the instructions for the [Edgex Onvif Camera device service][device-onvif-camera] in order to connect your Onvif cameras to EdgeX.
> **Note**: Please follow the instructions for the [Edgex Onvif Camera device service][device-onvif-manage] in order to connect your Onvif cameras to EdgeX.

Option 1: Modify the [res/configuration.toml](res/configuration.toml) file

Expand Down Expand Up @@ -256,6 +269,16 @@ The API log shows the status of the 5 most recent calls and commands that the ma

![inference events](./images/inference-events.png)

### Inference results in Edgex

To view inference results in Edgex, open Edgex UI [http://localhost:4000](http://localhost:4000), click on the `DataCenter`
tab and view data streaming under `Event Data Stream`by clicking on the `Start` button.

![inference events](./images/inference-edgex.png)

### Next steps
A custom app service can be used to analyze this inference data and take action based on the analysis.

## Additional Development

> **Warning**: The following steps are only useful for developers who wish to make modifications to the code
Expand All @@ -281,5 +304,7 @@ Open your browser to [http://localhost:4200](http://localhost:4200)

[edgex-compose]: https://github.com/edgexfoundry/edgex-compose
[device-onvif-camera]: https://github.com/edgexfoundry/device-onvif-camera
[device-onvif-manage]: https://github.com/edgexfoundry/device-onvif-camera/blob/levski/doc/guides/SimpleStartupGuide.md#manage-devices
[device-usb-camera]: https://github.com/edgexfoundry/device-usb-camera
[evam]: https://www.intel.com/content/www/us/en/developer/articles/technical/video-analytics-service.html
[device-mqtt]: https://github.com/edgexfoundry/device-mqtt-go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ services:

mqtt-broker:
volumes:
# example: - /home/github.com/edgexfoundry/edgex-compose/compose-builder/evam-mqtt-edgex:/evam-mqtt-edgex
- <add-full-path-of-your-edgex-compose-builder-here>/evam-mqtt-edgex/mosquitto.conf:/mosquitto-no-auth.conf:ro
ports:
- "59001:9001"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8bc93bd

Please sign in to comment.