jakowenko / double-take

Unified UI and API for processing and training images for facial recognition.
https://hub.docker.com/r/jakowenko/double-take
MIT License
1.23k stars 98 forks source link

DT not using Snapshot URL #275

Open Iceman248 opened 1 year ago

Iceman248 commented 1 year ago

Describe the bug IIRC, this worked on a previous Dahua camera, but it's been awhile, so unsure. I have the Amcrest AD140 (Dahua rebrand) doorbell camera and when using the Snapshot URL which works fine in my browser, DT never has used it with many tries, only the Frigate and MQTT ones which are all lower resolution. The snapshot URL doesn't have the timestamp either, so very easy to tell it is not being used at a glance.

Version of Double Take 1.13.1-8e2728d

Expected behavior The higher res snapshot URL image to show up for better face detection.

Screenshots If applicable, add screenshots to help explain your problem.

Hardware

Additional context CompreFace is used.

Iceman248 commented 1 year ago

Trying this again with Reolink camera. I used go2rtc for a snapshot stream. The following also provides an image in my browser when I test, no login required, but no matter whether I put in snapshot URL, under Frigate events, it never picks it up. I actually tried https://jakowenko.com/img/david.92f395c6.jpg and it worked, I think the only time it ever has. Why is nothing else working for me?

http://IP:1984/api/frame.jpeg?src=my_camera

AlexanderSch90 commented 1 year ago

I have the same situation as you. Both with the request and with the error. I use a link to display JPEG for my Reolink camera. This is described here: https://support.reolink.com/hc/en-us/articles/360007011233-How-to-Capture-Live-JPEG-Image-of-Reolink-Cameras-via-Web-Browsers

Example link: http://192.168.2.119/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=admin&password=123456

This also does not work.

EDIT: https://github.com/jakowenko/double-take/issues/110 it should actually work...

Maybe the developer here has an idea how to use double-face even with such a link.

EDIT2: It works for me now. You only have to set the delay to 2 or 3 seconds.

Iceman248 commented 1 year ago

I actually discovered that myself, forgot to post about it here. It does work for me, been in place for a few weeks. Now if only I could get the Dahua ones to work.

My delay was on 1 second. Did you not get it to work at 1 second delay?

HopePAPA commented 1 year ago

Hi, how do I set the delay on this to make it work?

RutgerDiehard commented 9 months ago

I've got the same issue, snapshot URL specified and it's not being used. I've even mangled the URL (e.g. htp://....) to see if it's being processed but there is no error in the logs. I've tried the correct URL in a browser and it works fine. I've also tried https://jakowenko.com/img/david.92f395c6.jpg and that does nothing.

What else could this be? This worked fine before attempting to use the main stream from a Reolink camera.

robertvorthman commented 8 months ago

I have the same issue. No matter what, Double Take will use the low resolution stream from Frigate which produces poor face recognition results. I don't understand why it is so hard to provide a high quality face image to Double Take.

This is the image being sent to Double Take.

Screenshot 2024-02-25 at 12 20 41 PM

This is what I want to send to my camera by using a snapshot url of the main stream.

Screenshot 2024-02-25 at 12 21 24 PM

I am using version 1.13.1 of the Home Assistant Add-On. Here is my config. I tried a static image but the live image is still used.

frigate:
  url: http://192.168.1.42
  update_sub_labels: true
  stop_on_match: false
  cameras:
    - Doorbell

  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: 10
    # process frigate images from frigate/+/person/snapshot topics
    mqtt: false
    delay: 2
  image:
    # height of frigate image passed for facial recognition
    height: 1920

cameras:
  Doorbell:
    snapshot:
      url: https://jakowenko.com/img/david.92f395c6.jpg

events:
  Doorbell:
    image:
       height: 1920
       snapshot: https://jakowenko.com/img/david.92f395c6.jpg
       latest: https://jakowenko.com/img/david.92f395c6.jpg
RutgerDiehard commented 8 months ago

I got it to work by using latest and not snapshot:

events: Front_Door: attempts: latest: 5 snapshot: 0 mqtt: false delay: 0 image: latest: http://cameraip/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=user&password=password