Skip to content

Commit 44eb354

Browse files
committed
Update README
1 parent ba44c36 commit 44eb354

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Video object detection example
1+
# Video object detection demo for IoTeX
22

3-
This example combines and integrates two simpler examples, the video decoder and the [deep learning server](https://github.com/veracruz-project/veracruz-examples/tree/main/deep-learning-server).
4-
The video decoder uses [`openh264`](https://github.com/veracruz-project/openh264) to decode an H264 video into individual frames, which are converted to RGB and made palatable to an object detector built on top of the [Darknet neural network framework](https://github.com/veracruz-project/darknet). The output is a list of detected objects, associated with their detection probability, and an optional prediction image showing each detected object in a bounding box.
3+
This program combines and integrates two simpler examples, the video decoder and the [deep learning server](https://github.com/veracruz-project/veracruz-examples/tree/main/deep-learning-server).
4+
The video decoder uses [`Mbed TLS`](https://github.com/veracruz-project/mbedtls/) to decrypt an H264 video, then uses [`openh264`](https://github.com/veracruz-project/openh264) to decode the video into individual frames, which are converted to RGB and made palatable to an object detector built on top of the [Darknet neural network framework](https://github.com/veracruz-project/darknet). The output is a list of detected objects, associated with their detection probability, and an optional prediction image showing each detected object in a bounding box.
55

66
## Build
77
* Install [`wasi sdk 14`](https://github.com/WebAssembly/wasi-sdk) and set `WASI_SDK_ROOT` to point to its installation directory
@@ -27,6 +27,13 @@ The video decoder uses [`openh264`](https://github.com/veracruz-project/openh264
2727
ffmpeg -i in.mp4 -map 0:0 -vcodec copy -an -f h264 in.h264
2828
```
2929

30+
## Encrypt the video and export the keying material
31+
* Go to `aes-ctr-enc-dec/` and run the encryption program (it gets automatically built):
32+
```
33+
cargo run <path to H264 video> <path to encrypted video> <key path> <iv path> -e
34+
```
35+
* The video gets encrypted with the freshly generated keying material (key, IV)
36+
3037
## File tree
3138
* The program is expecting the following file tree:
3239
```
@@ -37,8 +44,12 @@ The video decoder uses [`openh264`](https://github.com/veracruz-project/openh264
3744
+---- *.png
3845
+-- yolov3.cfg (configuration)
3946
+-- yolov3.weights (model)
40-
+ video_input/
41-
+-- in.h264 (H264 video)
47+
+ program_internal/ (directory used internally by the program)
48+
+ s3_app_input/
49+
+-- in_enc.h264 (encrypted H264 video)
50+
+ user_input/ (keying material to decrypt the video)
51+
+-- iv
52+
+-- key
4253
```
4354

4455
## Execution outside Veracruz
@@ -65,7 +76,7 @@ There are several ways to do that. In any case the [file tree](#file-tree) must
6576
### As a WebAssembly binary in the [`freestanding execution engine`](https://github.com/veracruz-project/veracruz/tree/main/sdk/freestanding-execution-engine)
6677
* Run:
6778
```
68-
RUST_LOG=info RUST_BACKTRACE=1 freestanding-execution-engine -i video_input program program_data -o output -p program/detector.wasm -x jit -c -d -e
79+
RUST_LOG=info RUST_BACKTRACE=1 freestanding-execution-engine -i program program_data program_internal s3_app_input user_input -o output program_internal -p program/detector.wasm -x jit -c -d -e
6980
```
7081

7182
## End-to-end Veracruz deployment
@@ -74,3 +85,6 @@ The crux of an end-to-end deployment is to get the policy file right. To that en
7485
* [Build Veracruz](https://github.com/veracruz-project/veracruz/blob/main/BUILD_INSTRUCTIONS.markdown)
7586
* Depending on your environment, run `./deploy_vod_big_linux.sh` or `./deploy_vod_big_nitro.sh` to generate the policy, deploy the Veracruz components and run the computation
7687
* The prediction images can be found in the executing directory
88+
89+
## IoTeX demo
90+
* Cf. [i-poc](https://github.com/alexandref75/veracruz-examples/tree/i-poc/i-poc)'s README

0 commit comments

Comments
 (0)