viseron icon indicating copy to clipboard operation
viseron copied to clipboard

Darknet zones and labels

Open ceewanna opened this issue 5 months ago • 2 comments

I have recently explored darknet and observed that using zones with labels under each zone without any label specified under camera resulted in recording but there was no objects shown in log file. The logging of objects will only appear when there are labels specified under camera.

In the past I only made use of labels under camera and mask. However, when I look in the document about zones I wonder what would be the appropriate setting of labels for zones and cameras (which to me seems to be a higher level). How do we set Zone/Label and Camera/Label? What if there are conflicts between the setting of Camera/Label and Zone/Label?

  cam2:
    fps: !secret cam2_fps
    scan_on_motion_only: !secret default_scan_on_motion_only
    # labels:
    #   - label: car
    #     confidence: 0.1
    #     trigger_recorder: true
    #     require_motion: true
    #   - label: person
    #     confidence: 0.1
    #     trigger_recorder: true
    #     require_motion: true
    #   - label: truck
    #     confidence: 0.1
    #     trigger_recorder: true
    #     require_motion: true
    #   - label: bicycle
    #     confidence: 0.1
    #     trigger_recorder: true
    #     require_motion: true
    #   - label: motorcycle
    #     confidence: 0.1
    #     trigger_recorder: true
    #     require_motion: true
    mask:
      - coordinates:  # upper area
        - x: 1
          y: 1
        - x: 640
          y: 1
        - x: 640
          y: 140
        - x: 0
          y: 140
    zones:
      - name: road
        coordinates:  # 187,140,190,227,534,234,534,141
          - x: 187
            y: 140
          - x: 190
            y: 227
          - x: 534
            y: 234
          - x: 534
            y: 141
        labels:
          - label: car
            confidence: 0.1
            trigger_recorder: true
            require_motion: true
          - label: person
            confidence: 0.1
            trigger_recorder: true
            require_motion: true
          - label: truck
            confidence: 0.1
            trigger_recorder: true
            require_motion: true
          - label: bicycle
            confidence: 0.1
            trigger_recorder: true
            require_motion: true
          - label: motorcycle
            confidence: 0.1
            trigger_recorder: true
            require_motion: true
      - name: offroad
        coordinates:  # 3,357,0,156,636,157,639,355
          - x: 0
            y: 360
          - x: 0
            y: 156
          - x: 640
            y: 156
          - x: 640
            y: 360
        labels:
          - label: person
            confidence: 0.1
            trigger_recorder: true
            require_motion: true
            # width_max: 0.2
            # height_max: 0.3
            # width_min: 0.01
            # height_min: 0.04
          - label: cat
            confidence: 0.1
            trigger_recorder: true
            require_motion: true
          - label: dog
            confidence: 0.1
            trigger_recorder: true
            require_motion: true

ceewanna avatar Sep 11 '24 12:09 ceewanna