-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] Add Zone support from Frigate #31
Comments
Hey! Definitely seems possible, I could add another environment variable you could pass in to specify which cameras and zones you want to watch. Maybe something like |
Yea that sounds an easy enough environment to specify. That way when Frigate detects a person entering the zone, the image gets sent to Deepstack. |
exactly, Id like to set up a notification/TTS for when a match is found for my frigate zone 'front_porch' |
Publish matches by camera name and add support to specify Frigate zones - #31
@wills106 @deputyd0ng, I pushed a new beta build to include the changes we talked about. The README shows the new options that can be passed to the container. Match results are also now published to MQTT in this format: Let me know what you think of these changes and if there's anything you'd like to see changed. |
Just wanted to let you know that configuration with zones is working fine. Not done anything with MQTT yet, but the topics look ok and make sense. |
Working on this now. Im trying to make a node-red entity, similar to the example that was created, I have the node just called "front door face" I am using essentially the same node from the example, but ti doesnt seem to be working, what would be the best way to parse out any match from double-take/cameras/front_door topic? I thought just using the parsed JSON object would work, but it aint. And thanks again! If I was more competent with this stuff Im sure It would be even more useful for me. |
@deputyd0ng Yes, try to set the QOS to 0. I'd also put a debug node after the topic to make sure you're getting the data. The data for the camera topic is an array, the entity node you have above I believe will only work if you subscribe to just the notifications for a specific person. If you only care about the first face of the results you can probably just replace I dropped |
@deputyd0ng I added better documentation and some samples for HA + Node-Red |
Hi @jakowenko, i am using the beta docker build and a config.yml file trying to configure multiple zones per frigate camera....the docs show the following format;
This for me results in -> zones: [ [Object] ] Adding this way;
Results in -> zones: [ 'homeparkingfull0:zone_drive' ] in the log :) Adding;
Appears to populate the zones correctly in the log, but goes against the docs. I wondered what the correct way (if supported) is of stipulating multiples zones per camera. Thanks |
Hey @mannp, the docs should be correct even though the logs show Object. I'll work on correcting this so it's readable. Maybe I'll just move it to a page on the UI. The issue right now is that it's too nested for the logs to show the values. But if you follow the docs it should work. Let me know if you are still running into issues and I'll let you know when I correct the output to show the value. |
Thanks for that @jakowenko :) So multiple zones per camera is multiple name: zone.x lines under the camera definition? |
Multiple zones for the same camera should look like this. I'm on mobile, sorry if formatting is off.
|
Hi @jakowenko I have that setup now, although nothing showing in doubletake as yet. It seems frigate crashes alot with doubletake for some reason.
Level of work permitting this would be great, for a noob, it is hard to tell if doubletake has what it needs to work and all connections are okay etc. There are no errors in the log, but nothing showing up in doubletakes gui right now. Had a few frigate events but nothing showing in the doubletake log that the event is being processed....will give it some more time to see if things imrpove. |
@mannp can you post your config and I can see if everything looks right. There does seem to be some issues around Frigate snapshot images. There were some open issues on Frigate's repo around connections not being closed. You should try setting You can also hit the API directly to force an image to show up in the GUI to make sure everything seems like it's working. I have it documented here. |
@jakowenko this is my current config, but getting errors in the log around the zone definition, see below. Thanks for any insight as to my issues 👍🏻 See last log where doubletake is picking up camera definitions as zones? Edit: Ignore the yi-1 duplicate in the first log, as that was my error and should have been hv-1
Initial log with deepstack enabled and my error in the zone definition
Second log with deepstack disabled and the zone definition corrected...I am still seeing zone errors though, will check them again...
|
@mannp the config looks ok. I did just push a new beta build that includes a config route you can hit via the API until I add it to the UI. I also fixed the logs to show the full config object. In terms of the logs you posted, it appears DeepStack is having issues, or is not sending back the expected response. It's related to this error, Try hitting the API manually to see if you can get an image to show up on the UI. curl -X GET "http://localhost:3000/api/recognize?url=https://jakowenko.com/img/david.92f395c6.jpg" \
-H "Content-type: application/json" I'm also curious what you think about the frigate:
url: http://192.168.1.2:4000
cameras:
- name: backyard
zones:
- deck
- yard
- name: driveway Same idea, slightly different format. frigate:
url: http://192.168.1.2:4000
cameras:
backyard:
zones:
- deck
- yard
driveway: I think either of these are better than what I currently have. What do you think? |
@jakowenko the new beta worked better for me, with the same config I got pictures and attempts at matches in the doubletake gui.... some car hub caps recognised as faces, but at least some progress thanks :) Edit: After a full day of activity in the log I have no more activity in the gui....seems hit and miss for me, not sure why or how to fix it... :-/ My log now shows the following;
Personally the log would make more sense if 'name' was replaced by 'zone' and so I am leaning more towards the latter config format, just keeping things simple (obviously 'driveway' needs to be indented to the left one, just a github formatting think i guess). Happy to create another issue, rather than post here, but re deepstack, its log is as follows;
The IP is correct for an api call from doubletake, so no issues there, but perhaps newer versions of deepstack return slightly different responses or the api call changed? Isn't there supposed to be a file url in the POST call..
Also the new config api call also works for me :) |
Further testing and using a previous face image from frigate, the logs seem better but still nothing further in the gui.
|
@mannp you do have vision face and detection setup for your DeepStack container, right? It should look something like this. deepstack:
container_name: deepstack
image: deepquestai/deepstack
restart: unless-stopped
environment:
VISION-FACE: 'True'
VISION-DETECTION: 'True' |
@jakowenko I am not using any env variables, since I have only starting setting up with the config.yml file using the beta. Oops for deepstack, let me check... Edit: So that explains the deepstack issue, as I now have this is the deepstack log Edit: Facepalm .. apologies for that noise...
The manual recognize doesn't get added to the gui though. Not sure what has changed since the flurry of images in the gui first thing today... |
Did the Feel free to message me on Discord if that's easier, my name should be Jako#4153. |
No the error hasn't gone away unfortunately :) but I haven't had it enabled for 99% of the testing above, so its really a nice to have for me. I have been using facebox most of the time alone.
Done and thanks :) |
Would it be possible to only pass images to Deepstack when the motion from Frigate is within a Zone?
Use Case:
I have a camera looking down my drive.
I have a Motion mask on the road as I am not bothered about cars / people in the road.
I then have a zone this side (drive) of the footpath / sidewalk.
I have a zone defined as:
drive_zone_0
under "drive" camera
I am not bothered / interested in Face Detection of people walking up and down the street. But I would like to run Face Detection on people who walk down my drive towards the house. ( drive_zone_0 )
The text was updated successfully, but these errors were encountered: