Skip to content
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] UI filters for camera name and event type #106

Open
Sylvain-Laine opened this issue Sep 21, 2021 · 12 comments
Open

[FR] UI filters for camera name and event type #106

Sylvain-Laine opened this issue Sep 21, 2021 · 12 comments
Labels
enhancement New feature or request

Comments

@Sylvain-Laine
Copy link

First, apologies for my english, and my first time on github !

Just to preface my case and my tests, my need is:
I've got cameras that dont work well with frigate for their main_stream, they work well for the sub_stream and the person detection work as intended
For the face detection with double take, i need to use an overide of the snapshot to process the detectors at max resolution

I did a lot of trial and error and have some errors and requests:

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: 3600

  • min_area not taken into acount: the base value of 10000 is applied on detectors (compreface and deepstack)

frigate:
url: http://[ip]:5000

#object labels that are allowed for facial recognition
labels:
- person

attempts:
# number of times double take will request a frigate latest.jpg for facial recognition
latest: 0
# number of times double take will request a frigate snapshot.jpg for facial recognition
snapshot: 0
# process frigate images from frigate/+/person/snapshot topics
mqtt: false
# add a delay expressed in seconds between each detection loop
delay: 0

Even with this config, the default mqtt topics are processed, latest and snapshot are not (as intended).

cameras:
reolink_cam_01:
snapshot:
# # process any jpeg encoded mqtt topic for facial recognition
# topic:
# # process any http image for facial recognition
url: http://[ip]:8123/local/test.jpg

  • url: http://[ip]:8123/local/test.jpg works but not with a refresh from the ui only after a hard reboot and not consistently, sometimes it takes many reboot/refresh for being taken into account

  • in the matches part of the ui, when the snapshot is processed, it's not listed under the cam entity but under "manual", to me the parameter is supposed to be an overide of the frigate snapshot.jpg

  • The url is processed only one time, for me if no match is found, the default attempts config for snapshot should be applied, and the overiden snapshot refreshed. with snapshot: 10 or 0 in the frigate - attempts config their is no differences

  • I tried to use a dynamiq url generated by an Api (in my case a reolink one : http://[ip]/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=[user]&password=[pass] ) but this is not taken into acount, I tried to send the same url via the double take api (curl --location --request GET 'url') but it was not processed either.

Request:
On the Macthes UI:
Beeing able to filter by camera entity
Beeing able to filter by trigered media (latest,snapshot,mqtt,...)

@jakowenko
Copy link
Owner

Hey @Sylvain-Laine, those config examples you posted are for the current beta build. I'm working on releasing 1.0.0 today as well which will include that.

I'll take a look at your other requests in a bit, but that should be the reason for the config inconsistencies.

@Sylvain-Laine
Copy link
Author

Ok, thank you for the repply, i will update this issue, after the 1.0.0 release,
I toyed with the config in the past days, updated it today with the information available, but i already had the same problems before.
I hope i'll come back with good news :)

@jakowenko
Copy link
Owner

jakowenko commented Sep 21, 2021

1.0.0 is released now. So the config you have above should work.

I will work on adding in support for filtering based off the camera and triggered media like you suggested. I think those make sense to add in!

@jakowenko jakowenko changed the title Config inconstistencies with v0.10.2-de4360d [FR] UI filters for camera name and event type Sep 21, 2021
@jakowenko jakowenko added the enhancement New feature or request label Sep 21, 2021
@Sylvain-Laine
Copy link
Author

Everything works thank you !
I didn't quite understand the configuration section for "camerar / [cam] / snapshot / url" I thought (falsly) that it was an override of the frigate snapshot, but this point is addressed in the issue #110

The support for filtering based off the camera and triggered media will be a great improvement for the ui !
Thank you

@jakowenko
Copy link
Owner

Hey @Sylvain-Laine, I got the new filters added to the beta build, docker pull jakowenko/double-take:beta. Let me know what you think!

Screen Shot 2021-09-22 at 11 45 41 PM

@Sylvain-Laine
Copy link
Author

Perfect ! Thanks

@Sylvain-Laine
Copy link
Author

Juste a quick update, the filters do work great, but they are reset after a delete operation, this is just for quality of use.

This may need another [FR], but i was thinking of another filter which may be great for debugging, not so important for normal use: The ability to filter by frigate event (even the events with no return from detectors).

@jakowenko
Copy link
Owner

jakowenko commented Sep 23, 2021

Glad they are working! I can work on the filter resetting logic and make it better. It's a little tricky because if no matches are in the database, then there's no filters, but as soon as one comes in I need to update all the filters so it shows on the page, this is when the "reset" of the filters happens.

I'll update it though so they don't reset after the delete operation. Only when the WebSocket receives new matches.

How did you think the other debug filter would work? No images would be saved for these events, so I'm not sure what to display. I guess I could start saving 1 image for maybe each Frigate event that doesn't find any faces. I just don't want to save too many or it would get out of control. Then you could see an image for each Frigate event that triggered Double Take.

Everything is written to a messages.log file, so you could always look through there for debugging the Frigate events too. Though not as clean as being on the UI.

@Sylvain-Laine
Copy link
Author

Maybe a filter logic based on both trained folders / entry in the configuration instead of matches in database, it's a little more tricky because you still need to be able to shows matches in db that are no longer in the configuration after a change...
But as i said, this is juste quality of use, the filters are fine ! And the difference between v1.0.0 and the current beta build is perfect ! Great Job !

For the frigate event filter, im still thinking about it, i'll come back to you after having some time to formulate the use case in the details.

jakowenko added a commit that referenced this issue Sep 25, 2021
# [1.1.0](v1.0.0...v1.1.0) (2021-09-25)

### Bug Fixes

* call for new matches on paginated page after loading is set to false ([231ac12](231ac12))
* don't reset filters when all results on page are deleted ([#106](#106)) ([bf5ebac](bf5ebac))
* pass camera name when reprocessing image ([cbe7a57](cbe7a57))
* replace image-size with probe-image-size ([5b7816a](5b7816a))

### Features

* ability to override frigate options per camera ([#110](#110)) ([e2f93e6](e2f93e6))
* **ui:** camera and event type filters ([#106](#106)) ([c914308](c914308))
@ozett
Copy link

ozett commented Sep 26, 2021

Hey @Sylvain-Laine, I got the new filters added to the beta build, docker pull jakowenko/double-take:beta. Let me know what you think!

Screen Shot 2021-09-22 at 11 45 41 PM

can you do such a selection-filter accordingly also for the train-page?

@jakowenko
Copy link
Owner

@ozett the training page already filters images when you select a name from the dropdown. I don't see a lot of other value added by adding more filters. What else were you hoping to filter by?

@ozett
Copy link

ozett commented Oct 1, 2021

i have now 5 page of faces.
i dont want to filter by person, i want to images regardless of the person-category
to improve quality i would check from time to time if images have a too low box-area.
or to sort out images that matched, but had not been trained on again
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants