blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18.52k stars 1.68k forks source link

Cannot get anything but Person to show #8841

Closed LordNex closed 9 months ago

LordNex commented 10 months ago

Describe the problem you are having

I have a list of items like car, truck, cat, dog, etc listed but cannot get anything but person to show up. It constantly detects my trucks as Person even though I have it listed

Version

0.13.0-beta8

Frigate config file

mqtt:
          # Required: host name
  host: 192.168.1.250
  # Optional: port (default: shown below)
  port: 1883
  # Optional: topic prefix (default: shown below)
  # NOTE: must be unique if you are running multiple instances
  topic_prefix: frigate
  # Optional: client id (default: shown below)
  # NOTE: must be unique if you are running multiple instances
  client_id: frigate
  # Optional: 
  user: user 
  # Optional: pas
  # NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.
  #       e.g. password: '{FRIGATE_MQTT_PASSWORD}'
  password: pass
  stats_interval: 30
# Optional: Detectors configuration. Defaults to a single CPU detector
detectors:
  # Required: name of the detector
  coral:
    # Required: type of the detector
    # Valid values are 'edgetpu' (requires device property below) and 'cpu'.
    type: edgetpu
    # Optional: device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api
    device: usb
    # Optional: num_threads value passed to the tflite.Interpreter (default: shown below)
    # This value is only used for CPU types
    #num_threads: 3
#  cpu1:
#    type: cpu
#    num_threads: 3
#  cpu2:
#    type: cpu
#    num_threads: 3
# Optional: Database configuration
#database:
  # The path to store the SQLite DB (default: shown below)
#  path: /docker-compose/frigate/config/frigate.db
# Optional: ffmpeg configuration
ffmpeg:
  # Optional: global ffmpeg args (default: shown below)
  global_args: -hide_banner -loglevel warning
  # Optional: global hwaccel args (default: shown below)
  # NOTE: See hardware acceleration docs for your specific device
 # hwaccel_args:
  #  - preset-intel-qsv-h264
  #  - preset-intel-qsv-h265
#    - -c:v
#    - h264_v4l2m2m 
  # Optional: global input args (default: shown below)
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1
  output_args:
    # Optional: output args for detect streams (default: shown below)
    detect: -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
    # Optional: output args for rtmp streams (default: shown below)
    rtmp: -c copy -f flv

# Optional: model modifications
model:
  # Optional: path to the model (default: automatic based on detector)
  path: /edgetpu_model.tflite
  # Optional: path to the labelmap (default: shown below)
  labelmap_path: /labelmap.txt
  # Required: Object detection model input width (default: shown below)
  width: 320
  # Required: Object detection model input height (default: shown below)
  height: 320
  # Optional: Label name modifications. These are merged into the standard labelmap.
  labelmap:
    1: face
    2: person
    3: cat
    4: car
    5: license
    6: truck
    7: police
    8: gun
    9: weapon
    10: license_plate
go2rtc:
  streams:
    hallcam:
      - "ffmpeg:http://192.168.1.195/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=user&password=pass#video=copy#audio=copy#audio=opus"
    hallcam_sub1:
      - "ffmpeg:http://192.168.1.195/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=user&password=pass"

cameras:
  hallcam:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/hallcam?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record
            - rtmp
            - audio
        - path: rtsp://127.0.0.1:8554/hallcam_sub1?video=copy
          input_args: preset-rtsp-restream
          roles:
            - detect
  livingroom:
    ffmpeg:
      inputs:
        - path: rtsp://user:pass@192.168.20.181/live
          roles:
            - detect
            - rtmp
            - record
            - audio
    detect:
      width: 1920
      height: 1080
    record: # <----- Enable recording
      enabled: True
    snapshots: # <----- Enable snapshots
      enabled: True
      bounding_box: true

  sidedoorbell:
    ffmpeg:
#      input_args: -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1
      inputs:

        - path: rtsp://user:pass@192.168.10.175:554/cam/realmonitor?channel=1&subtype=1&authbasic=64

          roles:

            - detect

        - path: rtsp://iser:pass@192.168.10.175:554/cam/realmonitor?channel=1&subtype=0&authbasic=64

          roles:

            - record
            - audio
            - rtmp

    detect:
      width: 2560
      height: 1920
    record: # <----- Enable recording
      enabled: true
    snapshots: # <----- Enable snapshots
      enabled: True
      bounding_box: true
    objects:
      filters:
        person:
          mask: 989,918,989,1151

  frontdoor:
    ffmpeg:
      inputs:
        - path: rtsp://user:pass@192.168.10.149/live
          roles:
            - detect
            - rtmp
            - record
            - audio
    detect:
      width: 1920
      height: 1080
    record: # <----- Enable recording
      enabled: True
    snapshots: # <----- Enable snapshots
      enabled: True
      bounding_box: true
    objects:
      filters:
        person:
          mask:
            - 1354,190,1379,271,1211,255,1191,190
            - 1354,190,1379,271,1455,126,1459,281
  deckcam:
    ffmpeg:
      inputs:
        - path: rtsp://user:pass@192.168.10.69/live
          roles:
            - detect
            - rtmp
            - record
            - audio
    detect:
      width: 1920
      height: 1080
    record: # <----- Enable recording
      enabled: True
    snapshots: # <----- Enable snapshots
      enabled: True
      bounding_box: true

# Optional: logger verbosity settings
logger:
  # Optional: Default log verbosity (default: shown below)
  default: info
  # Optional: Component specific logger overrides
  logs:
    frigate.event: debug

# Optional: birdseye configuration
birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: True
  # Optional: Width of the output resolution (default: shown below)
  width: 1920
  # Optional: Height of the output resolution (default: shown below)
  height: 1080
  # Optional: Encoding quality of the mpeg1 feed (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 10
  # Optional: Mode of the view. Available options are: objects, motion, and continuous
  #   objects - cameras are included if they have had a tracked object within the last 30 seconds
  #   motion - cameras are included if motion was detected in the last 30 seconds
  #   continuous - all cameras are included always
  mode: continuous

# Optional: Detect configuration
# NOTE: Can be overridden at the camera level
detect:
  # Optional: width of the frame for the input with the detect role (default: shown below)
  width: 1024
  # Optional: height of the frame for the input with the detect role (default: shown below)
  height: 768
  # Optional: desired fps for your camera for the input with the detect role (default: shown below)
  # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
  fps: 7
  # Optional: enables detection for the camera (default: True)
  # This value can be set via MQTT and will be updated in startup based on retained value
  enabled: True
  # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)
  max_disappeared: 25

# Optional: Motion configuration
# NOTE: Can be overridden at the camera level
motion:
  # Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: 25)
  # Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
  # The value should be between 1 and 255.
  threshold: 25
  # Optional: Minimum size in pixels in the resized motion image that counts as motion (default: ~0.17% of the motion frame area)
  # Increasing this value will prevent smaller areas of motion from being detected. Decreasing will make motion detection more sensitive to smaller
  # moving objects.
  contour_area: 75
  # Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: 0.2)
  # Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.
  # Too low and a fast moving person wont be detected as motion.
  delta_alpha: 0.2
  # Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: 0.2)
  # Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.
  # Low values will cause things like moving shadows to be detected as motion for longer.
  # https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/
  frame_alpha: 0.2
  # Optional: Height of the resized motion frame  (default: 1/6th of the original frame height, but no less than 180 = 360)
  # This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense of higher CPU usage.
  # Lower values result in less CPU, but small changes may not register as motion.
  frame_height: 360
  # Optional: motion mask
  # NOTE: see docs for more detailed info on creating masks

# Optional: Record configuration
# NOTE: Can be overridden at the camera level
record:
  # Optional: Enable recording (default: shown below)
  enabled: true
  # Optional: Number of days to retain recordings regardless of events (default: shown below)
  # NOTE: This should be set to 0 and retention should be defined in events section below
  #       if you only want to retain recordings of events.
#  retain_days: 5
  # Optional: Event recording settings
  events:
    # Optional: Maximum length of time to retain video during long events. (default: 600)
    # NOTE: If an object is being tracked for longer than this amount of time, the retained recordings
    #       will be the last x seconds of the event unless retain_days under record is > 0.
#    max_seconds: 1200
    # Optional: Number of seconds before the event to include (default: shown below)
    pre_capture: 10
    # Optional: Number of seconds after the event to include (default: shown below)
    post_capture: 10
    # Optional: Objects to save recordings for. (default: all tracked objects)
    objects:
      - face
      - person
      - cat
      - car
      - truck
      - license
      - police
    # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
#    required_zones: []
    # Optional: Retention settings for recordings of events
    retain:
      # Required: Default retention days (default: shown below)
      default: 30
      # Optional: Per object retention days
      objects:
        person: 60
        face: 90
        cat: 30
        car: 90

Relevant log output

N/A

Frigate stats

I’m not cleaning all that code

Operating system

Other Linux

Install method

Docker Compose

Coral version

USB

Any other information that may be helpful

I’m running Frigate on its own VM of Ununtu 22 LTS in ESXi 7.0.3 on a 40 core 256gig Dell PowerEdge R620

hawkeye217 commented 10 months ago

A few things to check out so we can help you more:

1) You listed your version as 0.13.0-beta8, but the latest released version is beta 6. What version of frigate are you actually running? You can see the version in the logs on startup, or you can see it in the system page of the Frigate UI. 2) There are several things you'll want to look at in your configuration:

github-actions[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.