Skip to main content

Capture code for rapspi cameras

Project description

Camera-node

All software needed for a camera node in an environment. Includes pieces for both capture and delivery as well as proxy node that handles centralized processing of video, upload, and queuing in case of slow or down connectivity.

Proxy

Flask service that receives data from all other camera nodes and feeds and internal queue and that sends data to honeycomb and optionally processes videos to pull out frames that are also sent to honeycomb.

Capture

Service that runs on nodes that have cameras. Captures video clips in short segments and sends them to their internal queue where workers send the to the proxy.

Workers

Celery service that performs tasks from the internal queue. Capture work is processed and sent to the proxy, unless it is a the proxy-node in which case it forwards the work to another task. Video segments are processes and sent to honeycomb. Processing includes tagging etc. Once uploaded the next set of processing happens, key frames are extracted at those are sent to honeycomb as child datapoint objects of the video.

If running on more capable hardware the keyframes could be evaluated for things like pose detection or object tracking. This is not planned yet but isn't out of scope specifically.

Radio-Monitor

A python service that connects to a network of DWM1001 modules over BLE to collect data. That data is queued to be sent to honeycomb. It is expected that this service runs on the proxy node.

CUWB-Stream

Leverages fluentd to move Ciholas sensor data to S3

Before deploying the service, update the Ciholas network config as follows:

IP Port Interface
Config 239.255.76.67 7671 0.0.0.0
Input 239.255.76.67 7667 0.0.0.0
Output 0.0.0.0 32222 0.0.0.0

PS: In order to resolve an issue with the anchors disconnecting and not reconnecting, you may need to set the interface IPs of the Config and Input rows to the ethernet device's IP (Use ifconfig)

Build and push service

make build-cuwb-stream

Deploy streaming service to k8

# Install envsubtr, on MacOS install through the gettext pkg
brew install gettext
brew link --force gettext 

# Create a config and secrets file with S3 and AWS ENV keys
kubectl apply -f ./k8s/kube-logging.yml
kubectl apply -f ./private/aws-s3-write-auth-config.yml
kubectl apply -f ./private/aws-s3-write-auth-secret.yml
kubectl apply -f ./k8s/fluentd.yml
kubectl apply -f ./k8s/fluentd-s3-config.yml
kubectl apply -f ./k8s/fluentd-s3.yml

TIMEZONE=US/Pacific envsubst < ./k8s/fluentd-s3-scheduler.yml | kubectl apply -f -

kubectl apply -f ./k8s/cuwb-service.yml 

Setup cluster with Docker Hub robot

First login and then copy creds into the cluster:

docker login
# Provide username and PAT (personal access token)

kubectl create secret generic regcred --from-file=.dockerconfigjson=/home/wildflowertech/.docker/config.json --type=kubernetes.io/dockerconfigjson

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wf-camera-capture-1.0.3.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

wf_camera_capture-1.0.3-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file wf-camera-capture-1.0.3.tar.gz.

File metadata

  • Download URL: wf-camera-capture-1.0.3.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.2 Darwin/21.6.0

File hashes

Hashes for wf-camera-capture-1.0.3.tar.gz
Algorithm Hash digest
SHA256 924e7a5856f7b64bedbeee1dc810f51c943dedea6296aba10302b89a62d0ef9c
MD5 b006ef42347a8858199e33aaf9b128ec
BLAKE2b-256 27140300c74c627323bb03a4e32a8ab020b42c3347571bd3a26c4ae3cdd6b80d

See more details on using hashes here.

File details

Details for the file wf_camera_capture-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for wf_camera_capture-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7a40556bba68a1a91548e361ac62c9dc749eabdeaa390a886b3ddf55c29258fc
MD5 9c07cadc0edc66784269beeb2b2845f8
BLAKE2b-256 938a4f4f75b45362f8fbd9bbc7c07431b1f29cb71874543968688541a63a08cb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page