Facial recognition & room presence using Double Take & Frigate

The native addon makes sense, it definitely provides an easier entrypoint for users to get setup who aren’t as experienced. Once I release this version I can start to explore what’s involved in creating an addon.

I’ll get some sample docker-compose files added to the README as well to show what a more complete setup looks like.

Thank you for the suggestions! Keep them coming :slightly_smiling_face:

1 Like

HI, I was hoping someone could help me with some troubleshooting. I’ge googled around and searched the forum topic and I don’t see sililar issues. I am trying to run the docker container on a seporate rpi4 and this is the error I keep getting whether I use docker or docker-compose:

Creating double-take ... done
Attaching to double-take
double-take    | /double-take/api/node_modules/sharp/lib/constructor.js:32
double-take    |   throw new Error(error);
double-take    |   ^
double-take    | 
double-take    | Error: 
double-take    | Something went wrong installing the "sharp" module
double-take    | 
double-take    | Error relocating /usr/lib/libvips.so.42: __ctime64: symbol not found
double-take    | 
double-take    | - Remove the "node_modules/sharp" directory then run
double-take    |   "npm install --ignore-scripts=false --verbose sharp" and look for errors
double-take    | - Consult the installation documentation at https://sharp.pixelplumbing.com/install
double-take    | - Search for this error at https://github.com/lovell/sharp/issues
double-take    | 
double-take    |     at Object.<anonymous> (/double-take/api/node_modules/sharp/lib/constructor.js:32:9)
double-take    |     at Module._compile (internal/modules/cjs/loader.js:1072:14)
double-take    |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
double-take    |     at Module.load (internal/modules/cjs/loader.js:937:32)
double-take    |     at Function.Module._load (internal/modules/cjs/loader.js:778:12)
double-take    |     at Module.require (internal/modules/cjs/loader.js:961:19)
double-take    |     at require (internal/modules/cjs/helpers.js:92:18)
double-take    |     at Object.<anonymous> (/double-take/api/node_modules/sharp/lib/index.js:3:15)
double-take    |     at Module._compile (internal/modules/cjs/loader.js:1072:14)
double-take    |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)


Hey, there is a issue right now with the Pi Docker images due to that sharp dependency. Do you mind opening up an issue on Github and we can track it from there. I have a pi at home I can do some debugging on. The amd arch builds should work fine though.

1.0.0 is officially out with support for web sockets, pagination, updated filtering, and more!

The configuration section of the README is also updated with better examples.

Thank you to everyone who has used and help test Double Take over the past few months and for all the awesome feature suggestions. Keep them coming!

5 Likes

Theming is now supported in the beta build! The UI and editor both have options now to change from the default theme.

ui:
  theme: bootstrap4-dark-blue

  editor:
    theme: nord_dark

UI Themes
Editor Themes

3 Likes

v1.2.0 is hot off the shelf.

  • Themes can now be set via dropdowns on the config page
  • New log page allows viewing of container logs via the UI
  • MQTT status icon

2021-09-30 02.57.06
Screen Shot 2021-09-30 at 10.06.08 AM

4 Likes

You are doing a great job David!
Decided to give your docker a shot today. Been a while since I tried and man… this have evolved a lot!

However… Have an issue
The images taken from Frigate is kinda small. I’ve set image height to 500 but the BOX is always a lite bit tiny for my confidence…
How to improve this?

Thank you! Let me know if you have any feature requests.

For those MQTT images you need to change the size from the Frigate config.yml file. You can always change the default min_area if you want to include smaller box sizes.

cameras:
  front-door:
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      height: 1000

Hi,
Any news about the template for unRAID?
PS - does Double-Take include the detectors?
If not - were you able to install CompreFace on unRAID?

Thanks

@Jako
Double take featured in LTT along with Frigate

congrats!!

3 Likes

if you use docker compose, which is now a plugin in unraid you can install the lot without a template

Thank you! I couldn’t believe it. It’s such an honor to be featured in the video.

1 Like

I have set up Double Take and trained on my familys faces so that most of the detections in the Double Take web-ui is successfull for all persons.
I have also created sensors as the instructions in this thread like:

 - platform: mqtt
    name: Cliff
    icon: mdi:account
    state_topic: "double-take/matches/cliff"
    json_attributes_topic: "double-take/matches/cliff"
    value_template: "{{ value_json.camera }}"
    availability_topic: 'double-take/available'

And tried using the automation template from the github-page:

alias: Notify
trigger:
  - platform: state
    entity_id: sensor.double_take_cliff
  - platform: state
    entity_id: sensor.double_take_unknown
condition:
  - condition: template
    value_template: '{{ trigger.to_state.state != trigger.from_state.state }}'
action:
  - service: notify.mobile_app
    data:
      message: |-
        {% if trigger.to_state.attributes.match is defined %}
          {{trigger.to_state.attributes.friendly_name}} is near the {{trigger.to_state.state}} @ {{trigger.to_state.attributes.match.confidence}}% by {{trigger.to_state.attributes.match.detector}}:{{trigger.to_state.attributes.match.type}} taking {{trigger.to_state.attributes.attempts}} attempt(s) @ {{trigger.to_state.attributes.duration}} sec
        {% elif trigger.to_state.attributes.unknown is defined %}
          unknown is near the {{trigger.to_state.state}} @ {{trigger.to_state.attributes.unknown.confidence}}% by {{trigger.to_state.attributes.unknown.detector}}:{{trigger.to_state.attributes.unknown.type}} taking {{trigger.to_state.attributes.attempts}} attempt(s) @ {{trigger.to_state.attributes.duration}} sec
        {% endif %}
      data:
        attachment:
          url: |-
            {% if trigger.to_state.attributes.match is defined %}
              http://192.168.0.5:3000/api/storage/matches/{{trigger.to_state.attributes.match.filename}}?box=true&token={{trigger.to_state.attributes.token}}
            {% elif trigger.to_state.attributes.unknown is defined %}
               http://192.168.0.5:3000/api/storage/matches/{{trigger.to_state.attributes.unknown.filename}}?box=true&token={{trigger.to_state.attributes.token}}
            {% endif %}
        actions:
          - action: URI
            title: View Image
            uri: |-
              {% if trigger.to_state.attributes.match is defined %}
                http://192.168.0.5:3000/api/storage/matches/{{trigger.to_state.attributes.match.filename}}?box=true&token={{trigger.to_state.attributes.token}}
              {% elif trigger.to_state.attributes.unknown is defined %}
                 http://192.168.0.5:3000/api/storage/matches/{{trigger.to_state.attributes.unknown.filename}}?box=true&token={{trigger.to_state.attributes.token}}
              {% endif %}
mode: parallel
max: 10

But nothing triggers. Do I need to do some additional configuration ?

Hi …
Having some issues with zones.
This is a snap from my yaml.
But the zone from camera: frigate_parkering is not used. It takes persons even from the street.
When people passing by the street it tryies to facematch even them…

  cameras:
    - frigate_dlink
    - frigate_parkering
    - frigate_entren
    - frigate_lillstugan
    - frigate_baksida
    - frigate_inne_garage
    - frigate_pathway
    - frigate_pryttelverkstad
    - frigate_tomten
  # only process images from specific zones
  zones:
    - camera: frigate_entren
      zone: entre_area
    - camera: frigate_parkering
      zone: parking_area

Defined zone in frigate:
image
Facematch from zone street:

Hey @Minglarn,

Try removing frigate_parkering from the cameras section. Because it’s defined in the zones you don’t need to have it in cameras. I believe this is the reason all zones are being processed for that camera. I can add in some additional logic in the next release to address this.

FYI - You also don’t need to define any cameras if you want to include all of them.

1 Like

Thanks! Will try and see what happens!

Edit: Works like a charm! Thanks!

1 Like

If anyone has been waiting to try this with a Raspberry Pi, then today is the day!

I got the beta image working for arm/v7.

docker pull jakowenko/double-take:beta

1 Like

v1.4.0

Bug Fixes

  • api: validate mime type and result of database.get.fileByFilename
  • api: catch facebox error before normalizing data
  • api: delete orphaned db records when deleting training folder / files
  • ui: fix multiselect dropdowns when open and scrolling
  • ui: theme wouldn’t load if setting to same theme

Features

  • support for ARMv7 architecture
  • api: api/latest/<name>.jpg
  • api: use camera name when using custom mqtt topic
  • ui: enable/disable sockets on matches page
4 Likes

I just used docker compose to set it up, but I’m getting this error 502 gateway

Anyone else getting the same error or does compreface needs extra ram (my device has 4gb ram)

Thanks for a great project :slight_smile:
What’s the recommendation for multiple detectors? any benefit of multple vs single?
Is the “Match” calculated from a single detector or only if all of them detect?

Thanks