|
|
|
@@ -1,25 +1,25 @@ |
|
|
|
# Python Dataflow Example |
|
|
|
|
|
|
|
This examples shows how to create and connect dora operators and custom nodes in Python. |
|
|
|
This examples shows how to create and connect dora to rerun. |
|
|
|
|
|
|
|
## Overview |
|
|
|
This nodes is still experimental and format for passing Images, Bounding boxes, and text are probably going to change in the future. |
|
|
|
|
|
|
|
The [`dataflow.yml`](./dataflow.yml) defines a simple dataflow graph with the following three nodes: |
|
|
|
## Getting Started |
|
|
|
|
|
|
|
- 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. |
|
|
|
```bash |
|
|
|
cargo install --force rerun-cli@0.15.1 |
|
|
|
|
|
|
|
## Getting started |
|
|
|
## To install this package |
|
|
|
git clone git@github.com:dora-rs/dora.git |
|
|
|
cargo install --git https://github.com/dora-rs/dora dora-rerun |
|
|
|
|
|
|
|
```bash |
|
|
|
cargo run --example python-dataflow |
|
|
|
dora start dataflow.yml --attach |
|
|
|
``` |
|
|
|
|
|
|
|
## Run the dataflow as a standalone |
|
|
|
You will see two visualizations. One from matplotlib and one from rerun for comparaison. |
|
|
|
|
|
|
|
- Start the `dora-daemon`: |
|
|
|
## CI/CD |
|
|
|
|
|
|
|
``` |
|
|
|
../../target/release/dora-daemon --run-dataflow dataflow.yml |
|
|
|
``` |
|
|
|
This example is not tested on the CI/CD as visualization is not really testable. |
|
|
|
|
|
|
|
Please reach out in case of issues at: https://github.com/dora-rs/dora/issues |