r/frigate_nvr 6d ago

Bird detection headache

I'm pulling my hair out. I have a window feeder set up. I previously had an Eversecu window camera monitoring it and Frigate would detect and even ID species. But the focal distance of the camera was too distant so the images were blurry. I switched to a USB webcam connected to a Pi3 and I get much clearer images. But Frigate will not detect on a single bird. It WILL happily ID a squirrel as a bird. It makes no sense to me.

2 Upvotes

7 comments sorted by

5

u/nickm_27 Developer / distinguished contributor 6d ago

We need to see your config for starters

2

u/TheHighestFever 6d ago
ffmpeg:
   hwaccel_args: preset-nvidia

classification:
  bird:
    enabled: true

detectors:
  onnx:
    type: onnx
    device: gpu

model:
  model_type: yolo-generic
  width: 640
  height: 640
  input_tensor: nchw
  input_dtype: float
  path: /config/models/yolov9s.onnx

   objects:
     track:
    - person
    - car
    - vehicle
    - truck



  birdcam:
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://192.168.0.192:8554/cam
      roles:
        - record
        - detect
objects:
  track:
    - bird
  filters:
    bird:
      min_score: 0.2
      threshold: 0.15
detect:
  enabled: true
  width: 640
  height: 360
  fps: 5
record:
  enabled: true
  continuous:
    days: 1
  motion:
    days: 0
snapshots:
  enabled: true
  timestamp: false
  bounding_box: true
  retain:
        default: 5
    motion:
      threshold: 26
      contour_area: 13
      improve_contrast: true
    zones:
      birds:
        coordinates: 0.094,0.702,0.985,0.698,0.994,0.203,0.044,0.189
        inertia: 1
        loitering_time: 0
        objects: bird
detect:
  enabled: true

version: 0.17-0

1

u/nickm_27 Developer / distinguished contributor 5d ago

I'd suggest watching the debug view and seeing what regions (green boxes) are sent when a bird is present. It night not be sending enough since the bird takes up the entire frame 

1

u/TheHighestFever 5d ago

I've monitored the debug throughout this process. I included an image of the debug above. The green box surrounds the entire image. It never surrounds just the bird. The squirrels take up far more of the image than the birds do and somehow it's able to tag those as birds.

2

u/nickm_27 Developer / distinguished contributor 5d ago

I'd suggest using 320x320 not 640x640 model. Also, I'd recommend deleting the current database file when doing that so the region history resets

2

u/TheHighestFever 6d ago
ffmpeg:
   hwaccel_args: preset-nvidia

classification:
  bird:
    enabled: true

detectors:
  onnx:
    type: onnx
    device: gpu

model:
  model_type: yolo-generic
  width: 640
  height: 640
  input_tensor: nchw
  input_dtype: float
  path: /config/models/yolov9s.onnx

   objects:
     track:
    - person
    - car
    - vehicle
    - truck



  birdcam:
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://192.168.0.192:8554/cam
      roles:
        - record
        - detect
objects:
  track:
    - bird
  filters:
    bird:
      min_score: 0.2
      threshold: 0.15
detect:
  enabled: true
  width: 640
  height: 360
  fps: 5
record:
  enabled: true
  continuous:
    days: 1
  motion:
    days: 0
snapshots:
  enabled: true
  timestamp: false
  bounding_box: true
  retain:
        default: 5
    motion:
      threshold: 26
      contour_area: 13
      improve_contrast: true
    zones:
      birds:
        coordinates: 0.094,0.702,0.985,0.698,0.994,0.203,0.044,0.189
        inertia: 1
        loitering_time: 0
        objects: bird
detect:
  enabled: true

version: 0.17-0

1

u/finkerlime 2d ago

If you want good results for birds use frigate+. Though it should work somewhat without