roflcoopter / viseron

Self-hosted, local only NVR and AI Computer Vision software. With features such as object detection, motion detection, face recognition and more, it gives you the power to keep an eye on your home, office or any other place you want to monitor.
MIT License
1.5k stars 154 forks source link

Failed to load license plate #725

Closed BliXem1 closed 2 months ago

BliXem1 commented 2 months ago

I'm running the latest (not beta) version on Synology.

My config:

# Thanks for trying out Viseron!
# This is a small walkthrough of the configuration to get you started.
# There are far more components and options available than what is listed here.
# See the documentation for the full list of configuration options.

mqtt:
  broker: 192.168.0.125
  port: 1883
  username: frigate
  password: pass
  home_assistant:

## Start by adding some cameras
ffmpeg:
  camera:
    camera_1:  # This value has to be unique across all cameras
      name: Voordeur
      host: 192.168.0.7
      port: 554
      path: h264Preview_01_sub
      fps: 10
      protocol: rtsp
      username: hacs
      password: pass

    camera_2:  # This value has to be unique across all cameras
      name: Oprit
      host: 192.168.0.210
      port: 554
      path: h264Preview_01_sub
      fps: 10
      protocol: rtsp
      username: hacs
      password: pass

    camera_3:  # This value has to be unique across all cameras
      name: Tuin
      host: 192.168.0.211
      port: 554
      path: h264Preview_01_sub
      fps: 10
      protocol: rtsp
      username: hacs
      password: pass

    camera_4:  # This value has to be unique across all cameras
      name: Garage
      host: 192.168.0.212
      port: 554
      path: h264Preview_01_sub
      fps: 10
      protocol: rtsp
      username: hacs
      password: pass

## Then add an object detector
darknet:
  object_detector:
    cameras:
      camera_1:  # Attach detector to the configured camera_1 above
        fps: 1
        scan_on_motion_only: false  # Scan for objects even when there is no motion
        labels:
          - label: person
            confidence: 0.75
            trigger_recorder: true

      camera_2:  # Attach detector to the configured camera_1 above
        fps: 1
        scan_on_motion_only: false  # Scan for objects even when there is no motion
        labels:
          - label: person
            confidence: 0.7
            trigger_recorder: true
          - label: car
            confidence: 0.6
            trigger_recorder: true
          - label: vehicle
            confidence: 0.6
            trigger_recorder: true
          - label: cat
            confidence: 0.65
            trigger_recorder: true
          - label: dog
            confidence: 0.65
            trigger_recorder: true
          - label: sports ball
            confidence: 0.65
            trigger_recorder: true

      camera_3:  # Attach detector to the configured camera_1 above
        fps: 1
        scan_on_motion_only: false  # Scan for objects even when there is no motion
        labels:
          - label: person
            confidence: 0.75
            trigger_recorder: true

      camera_4:  # Attach detector to the configured camera_1 above
        fps: 1
        scan_on_motion_only: false  # Scan for objects even when there is no motion
        labels:
          - label: person
            confidence: 0.7
            trigger_recorder: true
          - label: dog
            confidence: 0.65
            trigger_recorder: true
          - label: cat
            confidence: 0.65
            trigger_recorder: true

codeprojectai:
  host: 192.168.0.125
  port: 32168
license_plate_recognition:
    camera_2:
    labels:
      - vehicle
      - car
      - truck
    known_plates:
      - plate
    min_confidence: 0.5
    expire_after: 1

## You can also use motion detection
mog2:
  motion_detector:
    cameras:
      camera_1:  # Attach detector to the configured camera_2 above
        fps: 1
      camera_2:  # Attach detector to the configured camera_2 above
        fps: 1
      camera_3:  # Attach detector to the configured camera_2 above
        fps: 1
      camera_4:  # Attach detector to the configured camera_2 above
        fps: 1

## To tie everything together we need to configure one more component.
nvr:
  camera_1:  # Run NVR for camera_1
  camera_2:
  camera_3:
  camera_4:
# Now you can restart Viseron and you should be good to go!

Log is saying: failed to load component license_plate_recognition: No module named 'viseron.components.license_plate_recognition'.

Is there also a way to add the camera images to HA? I don't want a live view but a view every second like Frigate can do.

BliXem1 commented 2 months ago

Alright, removed the coreai code and readded, but got this error now:

error validating config for component codeprojectai: extra keys not allowed @ data ['codeprojectai'] [license_plate_recognition] [camera_2] got none.

BliXem1 commented 2 months ago

Fixed! :)