|  | 6 роки тому | |
|---|---|---|
| .github | 6 роки тому | |
| config | 6 роки тому | |
| frigate | 6 роки тому | |
| .dockerignore | 6 роки тому | |
| .gitignore | 6 роки тому | |
| Dockerfile | 6 роки тому | |
| LICENSE | 6 роки тому | |
| README.md | 6 роки тому | |
| detect_objects.py | 6 роки тому | |
| diagram.png | 6 роки тому | 
Note: This version requires the use of a Google Coral USB Accelerator
Uses OpenCV and Tensorflow to perform realtime object detection locally for RTSP cameras. Designed for integration with HomeAssistant or others via MQTT.
You see multiple bounding boxes because it draws bounding boxes from all frames in the past 1 second where a person was detected. Not all of the bounding boxes were from the current frame.

Build the container with
docker build -t frigate .
The mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite model is included and used by default. You can use your own model and labels by mounting files in the container at /frozen_inference_graph.pb and /label_map.pbtext. Models must be compatible with the Coral according to this.
Run the container with
docker run --rm \
--privileged \
-v /dev/bus/usb:/dev/bus/usb \
-v <path_to_config_dir>:/config:ro \
-p 5000:5000 \
-e RTSP_PASSWORD='password' \
frigate:latest
Example docker-compose:
  frigate:
    container_name: frigate
    restart: unless-stopped
    privileged: true
    image: frigate:latest
    volumes:
      - /dev/bus/usb:/dev/bus/usb
      - <path_to_config>:/config
    ports:
      - "5000:5000"
    environment:
      RTSP_PASSWORD: "password"
A config.yml file must exist in the config directory. See example here.
Access the mjpeg stream at http://localhost:5000/<camera_name> and the best person snapshot at http://localhost:5000/<camera_name>/best_person.jpg
camera:
  - name: Camera Last Person
    platform: generic
    still_image_url: http://<ip>:5000/<camera_name>/best_person.jpg
binary_sensor:
  - name: Camera Person
    platform: mqtt
    state_topic: "frigate/<camera_name>/objects"
    value_template: '{{ value_json.person }}'
    device_class: motion
    availability_topic: "frigate/available"