FacePlatform is a powerful tool designed to enhance your home security system by utilizing your home cameras. It captures snapshots, tags faces, and sends pictures along with identification information. With FacePlatform, you can keep track of who is coming and going in real-time.
Ensure you have the following prerequisites before installing FacePlatform:
streams:
camera: rtsp://127.0.0.1/token
apt install ffmpeg
Clone the repository:
git clone https://github.com/yourusername/faceplatform.git
cd faceplatform
Install the required dependencies:
poetry install
cameras.json
[
{
"type": "mqtt_trigger",
"mqtt_host": "127.0.0.1",
"mqtt_port": 1883,
"mqtt_user": "user",
"mqtt_password": "password",
"cameras": [
{
"name": "camera1",
"topic": "camera_topic",
"stream_protocol": "rtsp",
"stream_url": "rtsp://127.0.0.1/aa"
}
]
},
{
"type": "unifi", // required
"host": "192.168.1.1", // required
"user": "myUnifiUser", // required
"password": "myPassword", // required
"image_quality": "HIGH", // optional, default: LOW
"skip_ssl_check": false, // optional, default: true
"exclude_cameras": ["kitchen"] // optional, default: []
}
]
docker build . -t faceplatform
python -m "src.main"
services:
faceplatform:
image: nivg1992/faceplatform
ports:
- 5000:5000
environment:
- PF_DATA_FOLDER=/data
volumes:
- ./cameras.json:/app/cameras.json
- ./data:/data
Create input file: add an input file at src/inputs
Subclass Input: Begin by subclassing the Input
abstract class to define your custom input source. Implement the required methods for initialization, configuration, stream management, event handling, and data capture.
Utilize Events Management: Use the events_manager property inherited from Input to manage events and start/stop data capture from specific topics or cameras using start_capture_topic
and stop_capture_topic
.
Add to input_manager: After defining your input source, add it to the input_manager
of FacePlatform using the add_input
function. This step ensures that your input source is registered and can be accessed and controlled centrally within the application.
Testing and Integration: Test your input source thoroughly to ensure compatibility and seamless integration with FacePlatform’s existing components. Refer to provided examples and documentation for assistance.
This project is licensed under the Apache License - see the LICENSE file for details.