Forgive my ignorance. I’m having trouble composing the container in Portainer. I don’t understand the volume designation, ${PWD}/.storage:/.storage I’m getting an disallowed character error. Can anyone explain this to me?
Hey @omayhemo, thanks for checking this project out. PWD
is just the path to the working directory. If that’s not working in Portainer, you can just define the full path on your host machine you want the folder to be mounted at.
Anyone know which DockHub image I should use for CompreFace?
compreface-core
compreface-core-base
compreface-api
compreface-admin
Thus far, DeepStack is pretty useless, but at least it was easy to setup.
I just got this setup and was trying to figure it out as well. Essentially you need them all. On their GitHub site there is a docker compose and env file that I loaded into portainer which deployed all the containers needed. Works much better than deepstack.
Edit: I was affected by this - Question: Compreface RED vs GREEN? · Issue #90 · jakowenko/double-take (github.com)
I’ve noticed a strange problem which may have been happening for some time, not sure.
I just setup CompreFace, it’s so much better than DeepStack, processing is much quicker and accuracy is well above that of DeepStack, as such I’m planning to moving a lot of my automation over to use it.
However Double Take is not creating a sensor for each person it detects, it is only creating sensors for my camera’s and Unknown people. Using MQTT explorer I can see something that looks strange:
{
"id": "1630993857.295246-8x7yey",
"duration": 4.47,
"timestamp": "9/7/2021, 3:51:02 PM",
"attempts": 6,
"camera": "front_gate",
"zones": [],
"misses": [
{
"name": "bob",
"confidence": 97.1,
"match": false,
"box": {
"top": 122,
"left": 634,
"width": 36,
"height": 40
},
"type": "latest",
"duration": 1.05,
"detector": "compreface",
"filename": "/tmp/double-take/1630993857.295246-8x7yey-latest-c547e8d0-6115-4b37-ad4e-22a3af353be8.jpg"
}
],
"matches": [],
"personCount": 0
}
My confidence level in the double take config is set too:
confidence:
match: 70
unknown: 60
As such the MQTT packet should have “match” = true not false.
Any suggestions?
Heh, as yet unexplored part of Portainer for me. That’s super convenient, thanks for the clue.
Can someone tell me how to increase the MQTT snapshot size? Here is my frigate config, which I think should have increased the size - but it hasn’t. Have I done this wrong?
That looks right to me, I don’t know off hand what the default size is for Frigate MQTT snapshots. Try increasing the height: 500
to something larger and see if that has any effect.
For anyone running the beta. I made some updates to the config and added a new detect
object for some of the global settings with the ability to override them at the camera level too!
More info and better examples here.
# global detect settings (default: shown below)
detect:
match:
# save match images
save: true
# include base64 encoded string in api results and mqtt messages
# options: true, false, box
base64: false
# minimum confidence needed to consider a result a match
confidence: 60
# hours to keep match images until they are deleted
purge: 168
# minimum area in pixels to consider a result a match
min_area: 10000
unknown:
# save unknown images
save: true
# include base64 encoded string in api results and mqtt messages
# options: true, false, box
base64: false
# minimum confidence needed before classifying a name as unknown
confidence: 40
# hours to keep unknown images until they are deleted
purge: 8
# minimum area in pixels to keep an unknown result
min_area: 0
And then the new per camera overrides.
# camera settings (default: shown below)
cameras:
front-door:
# apply masks before processing image
# masks:
# # list of x,y coordinates to define the polygon of the zone
# coordinates:
# - 1920,0,1920,328,1638,305,1646,0
# # show the mask on the final saved image (helpful for debugging)
# visible: false
# # size of camera stream used in resizing masks
# size: 1920x1080
# override global detect variables per camera
# detect:
# match:
# # save match images
# save: true
# # include base64 encoded string in api results and mqtt messages
# # options: true, false, box
# base64: false
# # minimum confidence needed to consider a result a match
# confidence: 60
# # minimum area in pixels to consider a result a match
# min_area: 10000
# unknown:
# # save unknown images
# save: true
# # include base64 encoded string in api results and mqtt messages
# # options: true, false, box
# base64: false
# # minimum confidence needed before classifying a match name as unknown
# confidence: 40
# # minimum area in pixels to keep an unknown result
# min_area: 0
# snapshot:
# # process any jpeg encoded mqtt topic for facial recognition
# topic:
# # process any http image for facial recognition
# url:
@Jako, Double Take looks exactly what I was looking for in order to finally have my doorbell+frigate being able to do more advanced things. Before starting the installation&configuration process, I was trying to decide which FR framework is the best, and reading this thread I think CompreFace is the one I’ll use.
I was really hoping to have an HA native addon for Double Take, are you working on that too? It would be awesome. Meanwhile, did you think about building a container or setup that would install Double Take + Compreface or Double Take + DeepStack so that we could simply feed a compose file to portainer and we have everything up and running on HA? I’m using HassOS on an Intel NUC with Frigate and a Coral USB working fine.
I prefer to have everything clear from the installation point of view before starting the installation and configuration, I don’t like to do much trial&error when using these kind of addons.
Thanks for any advice and I hope to be able to put Double Take in production as soon as possible.
Alessandro
@Jako, I managed to install Compreface and Double Take via Portainer. You do everything via the Stacks function of Portainer, very very easy.
Only issue I had was with port 3000 of Double Take, it was already used by Grafana. I changed Grafana’s port and then the container came up.
I configured everything, and started uploading pics of me and my wife for training. Seems to be working ok, the only problem is that for frigate detection stream I’m using the substream that is 384x512 resolution, very low, so the box in which the face is captured is really really small, and often it gets unmatch because the box doesn’t fit the minimum requirements. I’ll have to think about this…
The first error I found was that if I press sync or untrain buttons in the train tab, I always get this error:
Another problem I have is that in HA I only see the sensors for the camera (citofono) and the one for my wife, even if there are two folders configured in Train: one for me (alex) and the other for my wife (luana). Recognition is working for me too, but I don’t see my sensor in HA, only the one for my wife.
I tried restarting DT but the problem is always there. I’m using v1.0.0-713be92:beta.
Hey @alexdelprete, thanks for checking out Double Take. Happy to hear it will help with your Frigate and doorbell setup.
I haven’t looked at a native HA addon yet, but once I release 1.0.0, I may start to look into that. Is there something specific you were hoping an addon can do that isn’t currently supported?
I’m not sure it would be possible to put Double Take and CompreFace into a single container since CompreFace currently runs on multiple. I could provide some Docker compose files that show a complete setup including one for each detector. That may help users at least when first getting started.
Thank you again for the kind words. If you run into any issues or have any feature requests, let me know!
I haven’t seen that specific error before on the sync/untrain API call. Are you running behind a reserve proxy or anything fancy? Or are you just browsing the UI on localhost:3000
?
When you get that error, can you go to the container logs and send me the output from there? That should help pinpoint where it’s coming from.
In terms of the HA sensors, those only get created when the MQTT topic is published for the camera or match. Has only your wife been detected so far from CompreFace? That would explain why her entity was created and yours isn’t yet.
Feel free to message me on Discord too. I can help you trouble shoot that error more on there as well.
Thanks again for your interest in Double Take!
In preparation of releasing 1.0.0 officially, I’ve added two new features to the beta build.
- Match results are now paginated and filtering works across all the results. Previously only the last 100 results would be returned and the filtering occurred only on those 100. Now it works across all the records.
- The live reload feature was replaced with sockets. This means the match page will auto update when new results come in.
Someone maybe creates some youtube how install and integrate this process?
For now, I install Frigate and its works great. Also I successfully get a notification to mobile with a screenshot and person detected in addition Deepstack working great on docker
I need the last piece to integrate all
I reinstalled Double Take because I noticed that the docker-compose was not working with Portainer and HA, it was a problem with the data path, the PWD variable under portainer points to a wrong temp location, on restart all data is scratched unfortunately. This is the working version:
version: '3.7'
volumes:
double-take-data:
services:
double-take:
container_name: double-take
image: jakowenko/double-take:beta
restart: unless-stopped
volumes:
- double-take-data:/.storage
ports:
- 3000:3000
Now with latest beta version, and the data location fixed, I don’t see the problem anymore.
I had to wait for the first positive match to see the sensor. Thanks for the explanation.
I will keep using it to understand better how it works before reporting other issues that might be to my lack of understanding of Double Take.
Thanks for your work and support.
A native addon allows a new unexperienced user to install and manage the product much more easily. I can assure you that in order to integrate these apps, install them, manage them, is not for beginners. And it’s a pity, because once it’s integrated you can do a lot of things that with simple detection was not possible. So I highly hope that you can create the native addon if you want Double Take to be used by a lot of people.
That’s exactly what I meant: create a compose file that pulls all the images and configures the containers. Using Portainer, I created a Stack for Double Take and one for CompreFace, but I think a single stack can be created for both containers.
Thank you.
This is a very nice improvement. Working well.