This example demonstrates video processing pipelines using Taskinity DSL, including frame capture, object detection, and video streaming capabilities.
- Python 3.8 or higher
- OpenCV (
pip install opencv-python) - Taskinity DSL installed
- Docker (for containerized processing)
- Webcam or video file for input
camera_routes.yaml- Main configuration filedocker-compose.yml- Processing servicesmodels/- Pre-trained modelsscripts/- Processing scripts
# Start the camera processing pipeline
make run-example EXAMPLE=camera
# View the processed video stream
make view-camera
# Stop the example
make stop-example EXAMPLE=camera-
Start the processing services:
docker-compose -f examples/docker-compose.yml up -d
-
Start the router:
python -m src.camel_router.cli --config examples/camera_routes.yaml
routes:
# Capture frames from camera
- from:
uri: "direct:camera"
steps:
- process:
ref: "frameCapture"
- to: "direct:objectDetection"
# Process frames with object detection
- from:
uri: "direct:objectDetection"
steps:
- process:
ref: "objectDetector"
- to: "direct:display"- The example will access your default camera (usually /dev/video0)
- Processed frames will be displayed in a window
- Detected objects will be highlighted with bounding boxes
- Processing resolution impacts performance
- Consider frame skipping for better performance
- Use hardware acceleration when available (CUDA, OpenCL)
- Add support for multiple cameras
- Implement motion detection
- Add video recording capabilities
- Integrate with cloud storage for processed videos