skrashevich/double-take

[BUG] (Support) Sub_Label not updating

AriaGen opened this issue · 12 comments

Describe the bug
I can't seem to get the label to update, I'm hoping that it's a simple oversight/I'm over thinking the problem. I don't see anything in my Frigate/Double take logs that suggests there is a problem.

Version of Double Take
1.13.10-SHA7
skrashevich/double-take:latest

Frigate:
0.12.1-367D724

Hardware

  • OS: Unraid

Frigate Config:

# yaml-l
anguage-server: $schema=http://192.168.1.250:5000/api/config/schema.json


detectors:
  coral:
    type: edgetpu
    device: pci
mqtt:
  enabled: True
  host: 192.168.1.250
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: mqtt
  password: Schooter@13
  stats_interval: 30

cameras:
  Front_Door_Frigate: 
    ffmpeg:
        inputs:
        - path: rtsp://admin:Scooter03@192.168.1.250:8554/9c76133b06ef_live
          roles:
            - detect
        - path: rtsp://admin:Scooter03@192.168.1.250:8554/9c76133b06ef_live
          roles:
            - rtmp
        - path: rtsp://admin:Scooter03@192.168.1.250:8554/9c76133b06ef_live
          roles:
            - record
        output_args:
          record: preset-record-generic-audio-aac
    detect:
      width: 1920
      height: 1080
      fps: 30
    objects:
      track:
        - person
      #  - car
      filters:
        person:
           min_area: 20000
           max_area: 400000
           threshold: 0.65
        car:
           min_area: 200000
           max_area: 500000
           threshold: 0.65
    record:
      enabled: True
      retain:
        days: 10
        mode: motion
      events:
        objects:
          - person
        required_zones:
          - driveway_door_zone
        retain:
          default: 10
          mode: active_objects
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True
      crop: False
      retain:
        default: 3
      required_zones:
        - driveway_door_zone

    zones:
      driveway_door_zone:
         coordinates: 0,1080,1540,1080,1523,839,1134,838,377,743,0,892
         objects:
           - person

    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 500
  Driveway_Frigate: 
    ffmpeg:
        inputs:
        - path: rtsp://Frigate:Frigate01@192.168.1.200:554/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
        - path: rtsp://Frigate:Frigate01@192.168.1.200:554/cam/realmonitor?channel=1&subtype=1
          roles:
            - rtmp
        - path: rtsp://Frigate:Frigate01@192.168.1.200:554/cam/realmonitor?channel=1&subtype=1
          roles:
            - record
    detect:
      width: 1280
      height: 720
      fps: 24
    objects:
      track:
        - person
        - umbrella
        - bicycle
      #  - car
      filters:
        person:
           min_area: 5000
           max_area: 300000
           threshold: 0.65
        umbrella:
           min_area: 5000
           max_area: 400000
           threshold: 0.65
        bicycle:
           min_area: 5000
           max_area: 400000
           threshold: 0.65
        car:
           min_area: 2000
           max_area: 500000
           threshold: 0.50
    record:
      enabled: True
      retain:
        days: 10
        mode: motion
      events:
        objects:
          - person
          - umbrella
          - bicycle
        required_zones:
          - driveway_zone
          - pathway_zone
        retain:
          default: 10
          mode: active_objects
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True
      crop: False
      retain:
        default: 3
      required_zones:
        - driveway_zone
        - pathway_zone

    zones:
      driveway_zone:
         coordinates: 101,677,903,687,891,614,634,388,566,268,408,126
         objects:
           - person
          # - car
      pathway_zone:
         coordinates: 692,0,1082,418,1049,496,969,519,489,0
         objects:
           - person
           - bicycle
      driveway_entrance_zone:
         coordinates: 617,198,597,261,435,138,479,72
        # objects:
        #   - car
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 500

  Hallway_Frigate: 
    ffmpeg:
        inputs:
        - path: rtsp://admin:Scooter03@192.168.1.250:8554/54e019a903b0_live
          roles:
            - detect
        - path: rtsp://admin:Scooter03@192.168.1.250:8554/54e019a903b0_live
          roles:
            - rtmp
        - path: rtsp://admin:Scooter03@192.168.1.250:8554/54e019a903b0_live
          roles:
            - record
    detect:
      width: 1920
      height: 1080
      fps: 30
    objects:
      track:
        - cat
      filters:
        cat:
           min_area: 10000
           max_area: 20000
           threshold: 0.65
    record:
      enabled: True
      retain:
        days: 10
        mode: motion
      events:
        objects:
          - cat
        required_zones:
          - hallway_zone
        retain:
          default: 10
          mode: active_objects
    snapshots:
      enabled: True
      timestamp: True
      bounding_box: True
      crop: False
      retain:
        default: 3
      required_zones:
        - hallway_zone
    zones:
      hallway_zone:
         coordinates: 571,1080,1232,1080,797,747,680,383,499,397
         #objects:
         #  - cat
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 500

birdseye:
  enabled: True
  restream: True
  width: 1280 
  height: 720
  quality: 1
  mode: objects

telemetry:
  version_check: True'

Double Take Config:

mqtt:
  host: 192.168.1.250
  username: mqtt
  password: Schooter@13

frigate:
  url: http://192.168.1.250:5000
  update_sub_labels: true
  stop_on_match: true
  labels:
    - person

  attempts:
    mqtt: true

  image:
    height: 500

detectors:
  compreface:
    url: http://192.168.1.250:8800
    key: 9a9****b8-**6a-4**d-a**1-e****34***99
    timeout: 15
    det_prob_threshold: 0.8
    opencv_face_required: false
    cameras:
     - front_door_frigate

detect:
  match:
    confidence: 70

  unknown:
    confidence: 69

your's sub_labels (recognized person's names) no more than 20 characters?

Yeah, all names less than 20 char's

Hm, looks like a bug. If you disable "stop_on_match" -- problem remains?

I believe so yeah, I only recently added that but in, thinking that it may fix the problem.

I'll try to fix it in next release

I was looking into this today again, to try and test the function of updating the sub_labels. I found this command:

curl --header "Content-Type: application/json" -X POST http://192.168.1.250:5000/api/events/1689355672.691961-jy3kys/sub_label -d '{"subLabel": "test_name"}'

This successfully updated the sub_label. Hopfully this helps diagnosing the issue. It had issues when I didn't specify the content type.

It's been a long time since I've coded anything, and not in the language this is, but if I'm reading/understanding it correctly then and looking at the Axios docs, then the content type may need specifying:

  await axios({
    method: 'post',
    url: `${this.topicURL(topic)}/api/events/${id}/sub_label`,
    data: { subLabel: names, subLabelScore: confidences },
    headers: {
    'Content-Type': 'application/json'
    },
  }).catch((error) => console.error(`sublabel error: ${error.message}`));
};

I did try to create my own fork to test but I don't know how to get docker to run it :')

Only gone and fixed the thing.
The problem turned out to be my camera names.... having a underscore causes issues apparently.

Thanks for all your help man and good night :)

jr-k commented

I've the issue and my camera have no underscore :/

jr-k commented

This helped me: #117

This helped me: #117

Admittedly, when I did made some changes on my Unraid array and upgraded my server a few weeks ago, I had to rebuild my docker file. I'm now running with just the original jakowenko/double-take fork and haven't got around to switching it back.