Skip to content

Instantly share code, notes, and snippets.

@muka
Last active August 11, 2020 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muka/8221e733ab9ba9c37d8580ded5697f0c to your computer and use it in GitHub Desktop.
Save muka/8221e733ab9ba9c37d8580ded5697f0c to your computer and use it in GitHub Desktop.
example config
######################################
# Ambianic main configuration file #
######################################
version: '1.2.4'
# path to the data directory
data_dir: ./data
# Set logging level to one of DEBUG, INFO, WARNING, ERROR
logging:
file: ./data/ambianic-log.txt
level: DEBUG
# Pipeline event timeline configuration
timeline:
event_log: ./data/timeline-event-log.yaml
# Cameras and other input data sources
sources:
picamera:
uri: /dev/video0
type: video
live: true
ai_models:
image_detection:
model:
tflite: /opt/ambianic-edge/ai_models/mobilenet_ssd_v2_coco_quant_postprocess.tflite
edgetpu: /opt/ambianic-edge/ai_models/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite
labels: /opt/ambianic-edge/ai_models/coco_labels.txt
face_detection:
model:
tflite: /opt/ambianic-edge/ai_models/mobilenet_ssd_v2_face_quant_postprocess.tflite
edgetpu: /opt/ambianic-edge/ai_models/mobilenet_ssd_v2_face_quant_postprocess_edgetpu.tflite
labels: /opt/ambianic-edge/ai_models/coco_labels.txt
top_k: 2
# A named pipeline defines an ordered sequence of operations
# such as reading from a data source, AI model inference, saving samples and others.
pipelines:
# sequence of piped operations for use in daytime front door watch
front_door_watch:
- source: picamera
- detect_objects: # run ai inference on the input data
ai_model: image_detection
confidence_threshold: 0.6
- save_detections: # save samples from the inference results
positive_interval: 2 # how often (in seconds) to save samples with ANY results above the confidence threshold
idle_interval: 6000 # how often (in seconds) to save samples with NO results above the confidence threshold
- detect_faces: # run ai inference on the samples from the previous element output
ai_model: face_detection
confidence_threshold: 0.6
- save_detections: # save samples from the inference results
positive_interval: 2
idle_interval: 600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment