visionai
visionai copied to clipboard
Implement support for `pipeline`
Motivation
Pipelines are a natural extension of what we are doing right now. We are directly managing scenarios & cameras currently. We can apply a scenario to a camera. We can apply multiple scenarios to a camera. However, there seems to be a missing logical abstraction here. People tend to think in terms of pipelines nowadays - and I think it is a great way to make our solution much more usable.
Example
Following sequence of steps indicate how one might enable running pipelines.
visionai pipeline create --name pipe1
visionai pipeline add-camera --pipeline pipe1 --camera OFFICE-01
visionai pipeline add-camera --pipeline pipe1 --camera OFFICE-02
visionai pipeline add-scenario --piepeline pipe1 --scenario smoke-and-fire-detection
events = [minimal]/[all]? [all]
duration = [always]/[schedule]? [always]
focus_area = [full-frame]/[bounding-box] [full-frame]
visionai pipeline test pipe1 # validate pipeline on usb-camera
visionai pipeline start pipe1 # start command
visionai pipeline start-daemon pipe1 # start in background
visionai pipeline stop pipe1 # stop
visionai pipeline disable pipe1 # disable a pipeline
visionai pipeline enable pipe1 # enable a pipeline
Architecture
- Maintain pipeline definitions along with other dynamic JSON files in the same folder.
- Right now the pipelines can be within JSON files. Later we can think about adding some DB support.
- Implement each of the commands above - by following the CLI layout we have put forth.