This repository provides guidance for working with custom AI models on the Factbird EDGE, including AWS Kinesis Video Streams consumption and IoT Core deployment workflows.
fbedge-examples/
├── examples.ipynb # Main Jupyter notebook with complete workflow
├── video_capture.py # KVS stream consumption and data capture
├── iot_deployment.py # AWS IoT job creation for edge deployment
├── requirements.txt # Python package dependencies
├── pyproject.toml # Python packaging configuration
├── setup.py # Package setup
└── README.md # This file
# Clone the repository
git clone https://github.com/FactbirdHQ/fbedge-examples.git
cd fbedge-examples
# Install dependencies
pip install -r requirements.txt
# Or install as package with optional extras
pip install -e . # Core dependencies
pip install -e .[jupyter] # Jupyter notebook support
pip install -e .[dev] # Development toolsConfigure your AWS credentials for Kinesis Video Streams and IoT Core access. Use temporary credentials from AWS SSO or STS:
# Get temporary credentials
aws sts get-session-token --duration-seconds 3600Add credentials to your notebook or script as shown in examples.ipynb.
jupyter notebook examples.ipynbThe notebook walks through:
- AWS credential setup and testing
- Kinesis Video Streams consumption
- Data capture and organization
- IoT deployment job creation
from video_capture import test_aws_connection, setup_kvs_stream, KVSStreamConsumer
# Test AWS connection
aws_connected, aws_session = test_aws_connection(AWS_CONFIG)
# Setup KVS stream
kvs_config = setup_kvs_stream(aws_session, "your_stream_id", AWS_CONFIG)
# Consume video data from edge device
consumer = KVSStreamConsumer(aws_session, kvs_config)
success = consumer.consume_stream(session_dir, stream_config)from iot_deployment import check_iot_thing_exists, create_deployment_job
# Check if IoT thing exists
thing_exists, thing_info = check_iot_thing_exists(aws_session, "thing_id")
# Create download job for edge device
job_created, job_id, job_arn = create_deployment_job(
aws_session,
thing_info['thingArn'],
"https://your-download-url.com/model.hef"
)AWS Kinesis Video Streams integration for consuming video data from Factbird EDGE devices.
Key Functions:
test_aws_connection()- Test AWS credentials and connectivitysetup_kvs_stream()- Configure KVS stream connectionsKVSStreamConsumer- Consume video streams and extract frames
AWS IoT Core integration for deploying files to Factbird EDGE devices.
Key Functions:
check_iot_thing_exists()- Verify IoT thing registrationcreate_deployment_job()- Create download jobs for edge devicescheck_job_status()- Monitor deployment job progress
data/
└── raw/
└── {stream_id}/
└── {YYYYMMDD_HHMMSS}/
├── frame_001.jpg
├── frame_002.jpg
└── session_metadata.json
- Setup - Configure AWS credentials (temporary credentials recommended)
- Data Capture - Consume video streams from Factbird EDGE via Kinesis Video Streams
- Data Annotation - Annotate captured frames using your preferred tool
- Model Training - Train custom models (outside scope of this repo)
- Deployment - Use IoT jobs to deploy models to Factbird EDGE devices
- Check your AWS credentials are current (temporary tokens expire)
- Verify IAM permissions for KVS, IoT Core, and STS
- Test with
test_aws_connection()function
- Ensure Factbird EDGE device is actively streaming to KVS
- Check stream exists with correct Stream ID
- Verify stream is in ACTIVE status
- Verify IoT thing is registered in AWS IoT Core
- Check thing ARN matches your device
- Ensure deployment URL is publicly accessible
For questions or issues, please create an issue in this repository.