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

Darknet zones and labels #807

Open
ceewanna opened this issue Sep 11, 2024 · 2 comments
Open

Darknet zones and labels #807

ceewanna opened this issue Sep 11, 2024 · 2 comments

Comments

@ceewanna
Copy link

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
@roflcoopter
Copy link
Owner

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.

Interesting, will take a look at that.

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?

Not sure i understand the question fully. The camera labels and the zone labels are completely separate so if there is overlap both will trigger recordings (essentially making the zone redundant)

@ceewanna
Copy link
Author

ceewanna commented Sep 15, 2024

The camera labels and the zone labels are completely separate so if there is overlap both will trigger recordings (essentially making the zone redundant)

My use case so far are 1) labels under cameras + (optional) some masks and 2) labels under zones + (optional) some masks (without any labels under cameras).

Case 1) everything seemed to work fine with labels and motion detected, including "End event"
Case 2) resulted in no labels shown in log file but it seemed to perform recordings fine. Only motion detected and "End event" shown in log.

On case 2) when some labels are added under camera, the log file will contains labels of object detected (which looked similar to in case 1).

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

No branches or pull requests

2 participants