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.
- Snapshot Capture: Takes snapshots from your home cameras automatically.
- Face Tagging: Detects and tags faces in the snapshots.
- Notification System: Sends a picture of the face along with identification details.
Ensure you have the following prerequisites before installing FacePlatform:
- Python 3.10+
- go2rtc server An easy way to get started is by pulling the Docker image and running it with a configuration like this:
streams: camera: rtsp://127.0.0.1/token
- cmake Download and install the relevant binary
- ffmpeg
apt install ffmpeg
- node22
-
Clone the repository:
git clone https://github.com/yourusername/faceplatform.git cd faceplatform
-
Install the required dependencies:
poetry install
-
Configure your camera settings and identification details in
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
andstop_capture_topic
. -
Add to input_manager: After defining your input source, add it to the
input_manager
of FacePlatform using theadd_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.