Browse Source

adding `README` to `python-dataflow`

tags/v0.0.0-test.4
haixuanTao 3 years ago
parent
commit
fe25716fbc
1 changed files with 33 additions and 0 deletions
  1. +33
    -0
      examples/python-dataflow/REAMDE.md

+ 33
- 0
examples/python-dataflow/REAMDE.md View File

@@ -0,0 +1,33 @@
# Python Dataflow Example

This examples shows how to create and connect dora operators and custom nodes in Python.

## Overview

The [`dataflow.yml`](./dataflow.yml) defines a simple dataflow graph with the following three nodes:

- a webcam node, that connects to your webcam and feed the dataflow with webcam frame as jpeg compressed bytearray.
- an object detection node, that apply Yolo v5 on the webcam image. The model is imported from Pytorch Hub. The output is the bouding box of each object detected, the confidence and the class. You can have more info here: https://pytorch.org/hub/ultralytics_yolov5/
- a window plotting node, that will retrieve the webcam image and the Yolov5 bounding box and join the two together.

## Getting started

```bash
cargo run --example python-dataflow
```

## Installation

To install, you should run the `install.sh` script.

```bash
install.sh
```

## Run the dataflow as a standalone

- Start the `dora-coordinator`, passing the paths to the dataflow file and the `dora-runtime` as arguments:

```
../../target/release/dora-coordinator run dataflow.yml ../../target/release/dora-runtime
```

Loading…
Cancel
Save