blakeblackshear / frigate

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

[Detector Support]: My plants started to get detected as person #5883

Closed yanivf38 closed 1 year ago

yanivf38 commented 1 year ago

Describe the problem you are having

image

Version

0.11.1-2EADA21

Frigate config file

{
  "birdseye": {
    "enabled": true,
    "height": 720,
    "mode": "continuous",
    "quality": 8,
    "width": 1280
  },
  "cameras": {
    "deck": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": true,
        "mode": "continuous"
      },
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 480,
        "max_disappeared": 25,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 50
        },
        "width": 704
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": "-hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p",
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://192.168.1.102/user=y_password=z_channel=2_stream=0.sdp",
            "roles": [
              "record",
              "rtmp"
            ]
          },
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://192.168.1.102/user=y_password=z_channel=2_stream=1.sdp",
            "roles": [
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://192.168.1.102/user=y_password=z_channel=2_stream=0.sdp -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/deck-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/deck",
          "roles": [
            "record",
            "rtmp"
          ]
        },
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://192.168.1.102/user=y_password=z_channel=2_stream=1.sdp -r 5 -s 704x480 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": [
          "704,0,704,194,522,134,512,175,333,179,0,247,0,0",
          "704,305,704,480,576,480"
        ],
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "deck",
      "objects": {
        "filters": {
          "person": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": [
            "person"
          ],
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 10,
            "mode": "motion",
            "objects": {}
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 0,
          "mode": "all"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "mode": "motion",
          "objects": {}
        },
        "timestamp": true
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {
        "backyardDeck": {
          "coordinates": "0,480,0,249,345,166,510,175,517,131,704,195,704,297,571,480",
          "filters": {},
          "objects": []
        }
      }
    },
    "front_door": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": true,
        "mode": "continuous"
      },
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 480,
        "max_disappeared": 25,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 50
        },
        "width": 704
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": "-hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p",
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://192.168.1.151/user=a_password=z_channel=1_stream=0.sdp",
            "roles": [
              "record",
              "rtmp"
            ]
          },
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://192.168.1.151/user=a_password=z_channel=1_stream=1.sdp",
            "roles": [
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://192.168.1.151/user=a_password=z_channel=1_stream=0.sdp -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/front_door-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/front_door",
          "roles": [
            "record",
            "rtmp"
          ]
        },
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://192.168.1.151/user=a_password=z_channel=1_stream=1.sdp -r 5 -s 704x480 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": [
          "704,0,704,33,448,29,454,0"
        ],
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "front_door",
      "objects": {
        "filters": {
          "person": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": [
            "person"
          ],
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 10,
            "mode": "motion",
            "objects": {}
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 0,
          "mode": "all"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "mode": "motion",
          "objects": {}
        },
        "timestamp": true
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {
        "frontDoorPathway": {
          "coordinates": "0,480,200,304,150,0,612,0,574,480",
          "filters": {},
          "objects": []
        },
        "frontPathway": {
          "coordinates": "0,480,200,304,150,0,612,0,574,480",
          "filters": {},
          "objects": []
        }
      }
    },
    "front_pathway": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": true,
        "mode": "continuous"
      },
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 480,
        "max_disappeared": 25,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 50
        },
        "width": 704
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": "-hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p",
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://192.168.1.152/user=a_password=z_channel=1_stream=0.sdp",
            "roles": [
              "record",
              "rtmp"
            ]
          },
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://192.168.1.152/user=a_password=z_channel=1_stream=1.sdp",
            "roles": [
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://192.168.1.152/user=a_password=z_channel=1_stream=0.sdp -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/front_pathway-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/front_pathway",
          "roles": [
            "record",
            "rtmp"
          ]
        },
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://192.168.1.152/user=a_password=z_channel=1_stream=1.sdp -r 5 -s 704x480 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": [
          "181,187,233,164,270,143,296,124,293,98,280,74,260,58,233,44,192,39,144,46,95,78,71,110,98,201",
          "463,25,462,0,704,0,704,32"
        ],
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "front_pathway",
      "objects": {
        "filters": {
          "person": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": [
            "person"
          ],
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 10,
            "mode": "motion",
            "objects": {}
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 0,
          "mode": "all"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "mode": "motion",
          "objects": {}
        },
        "timestamp": true
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {
        "driveway": {
          "coordinates": "56,104,370,48,618,58,599,161",
          "filters": {},
          "objects": []
        },
        "frontPathway": {
          "coordinates": "0,480,0,446,217,251,421,122,597,153,568,480",
          "filters": {},
          "objects": []
        },
        "frontYard": {
          "coordinates": "0,428,0,127,46,98,423,123",
          "filters": {},
          "objects": []
        },
        "neighbourJack": {
          "coordinates": "613,0,490,4,446,27,360,49,608,60",
          "filters": {},
          "objects": []
        },
        "pathwayPathway": {
          "coordinates": "0,480,0,446,217,251,421,122,597,153,568,480",
          "filters": {},
          "objects": []
        },
        "street": {
          "coordinates": "366,46,408,35,456,22,499,0,0,0,0,125",
          "filters": {},
          "objects": []
        }
      }
    },
    "garage": {
      "best_image_timeout": 60,
      "birdseye": {
        "enabled": true,
        "mode": "continuous"
      },
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 480,
        "max_disappeared": 25,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 50
        },
        "width": 704
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": "-hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p",
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-timeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://192.168.1.102/user=y_password=z_channel=1_stream=0.sdp",
            "roles": [
              "record",
              "rtmp"
            ]
          },
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://192.168.1.102/user=y_password=z_channel=1_stream=1.sdp",
            "roles": [
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": [
            "-f",
            "segment",
            "-segment_time",
            "10",
            "-segment_format",
            "mp4",
            "-reset_timestamps",
            "1",
            "-strftime",
            "1",
            "-c",
            "copy",
            "-an"
          ],
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://192.168.1.102/user=y_password=z_channel=1_stream=0.sdp -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/garage-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/garage",
          "roles": [
            "record",
            "rtmp"
          ]
        },
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://192.168.1.102/user=y_password=z_channel=1_stream=1.sdp -r 5 -s 704x480 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": [
          "704,52,704,23,456,24,455,51"
        ],
        "mqtt_off_delay": 30,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "garage",
      "objects": {
        "filters": {
          "person": {
            "mask": null,
            "max_area": 24000000,
            "max_ratio": 24000000,
            "min_area": 0,
            "min_ratio": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "objects": [
            "person"
          ],
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 10,
            "mode": "motion",
            "objects": {}
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 0,
          "mode": "all"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "mode": "motion",
          "objects": {}
        },
        "timestamp": true
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "ui": {
        "dashboard": true,
        "order": 0
      },
      "zones": {
        "driveway": {
          "coordinates": "0,209,76,173,462,134,704,260,704,480,0,480",
          "filters": {},
          "objects": []
        },
        "frontYard": {
          "coordinates": "0,90,345,72,443,120,265,141,131,161,76,172",
          "filters": {},
          "objects": []
        },
        "neighbourCarlos": {
          "coordinates": "704,0,519,0,501,58,704,120",
          "filters": {},
          "objects": []
        },
        "neighbourKathy": {
          "coordinates": "324,72,310,0,186,0,190,76",
          "filters": {},
          "objects": []
        },
        "pathwayPathway": {
          "coordinates": "81,202,76,163,23,116,0,119,0,212",
          "filters": {},
          "objects": []
        },
        "street": {
          "coordinates": "247,41,410,39,704,118,704,256",
          "filters": {},
          "objects": []
        }
      }
    }
  },
  "database": {
    "path": "/media/frigate/frigate.db"
  },
  "detect": {
    "enabled": true,
    "fps": 5,
    "height": 720,
    "max_disappeared": null,
    "stationary": {
      "interval": 0,
      "max_frames": {
        "default": null,
        "objects": {}
      },
      "threshold": null
    },
    "width": 1280
  },
  "detectors": {
    "coral": {
      "device": "usb",
      "num_threads": 3,
      "type": "edgetpu"
    }
  },
  "environment_vars": {},
  "ffmpeg": {
    "global_args": [
      "-hide_banner",
      "-loglevel",
      "warning"
    ],
    "hwaccel_args": [],
    "input_args": [
      "-avoid_negative_ts",
      "make_zero",
      "-fflags",
      "+genpts+discardcorrupt",
      "-rtsp_transport",
      "tcp",
      "-timeout",
      "5000000",
      "-use_wallclock_as_timestamps",
      "1"
    ],
    "output_args": {
      "detect": [
        "-f",
        "rawvideo",
        "-pix_fmt",
        "yuv420p"
      ],
      "record": [
        "-f",
        "segment",
        "-segment_time",
        "10",
        "-segment_format",
        "mp4",
        "-reset_timestamps",
        "1",
        "-strftime",
        "1",
        "-c",
        "copy",
        "-an"
      ],
      "rtmp": [
        "-c",
        "copy",
        "-f",
        "flv"
      ]
    }
  },
  "live": {
    "height": 720,
    "quality": 8
  },
  "logger": {
    "default": "info",
    "logs": {}
  },
  "model": {
    "height": 320,
    "labelmap": {},
    "labelmap_path": null,
    "path": null,
    "width": 320
  },
  "motion": null,
  "mqtt": {
    "client_id": "frigate",
    "host": "192.168.1.224",
    "password": "a",
    "port": 1883,
    "stats_interval": 20,
    "tls_ca_certs": null,
    "tls_client_cert": null,
    "tls_client_key": null,
    "tls_insecure": null,
    "topic_prefix": "frigate",
    "user": "G"
  },
  "objects": {
    "filters": null,
    "mask": "",
    "track": [
      "person"
    ]
  },
  "plus": {
    "enabled": false
  },
  "record": {
    "enabled": false,
    "events": {
      "objects": null,
      "post_capture": 5,
      "pre_capture": 5,
      "required_zones": [],
      "retain": {
        "default": 10,
        "mode": "motion",
        "objects": {}
      }
    },
    "expire_interval": 60,
    "retain": {
      "days": 0,
      "mode": "all"
    },
    "retain_days": null
  },
  "rtmp": {
    "enabled": true
  },
  "snapshots": {
    "bounding_box": true,
    "clean_copy": true,
    "crop": false,
    "enabled": false,
    "height": null,
    "quality": 70,
    "required_zones": [],
    "retain": {
      "default": 10,
      "mode": "motion",
      "objects": {}
    },
    "timestamp": false
  },
  "timestamp_style": {
    "color": {
      "blue": 255,
      "green": 255,
      "red": 255
    },
    "effect": null,
    "format": "%m/%d/%Y %H:%M:%S",
    "position": "tl",
    "thickness": 2
  },
  "ui": {
    "use_experimental": false
  }
}

docker-compose file or Docker CLI command

-

Relevant log output

-

Operating system

HassOS

Install method

HassOS Addon

Coral version

USB

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

The docs cover a number of strategies to filter out false positives. https://docs.frigate.video/guides/false_positives

In this case, min_area would likely work well.

yanivf38 commented 1 year ago

Thank you @NickM-27 , what would you suggest putting as min_area? any recommendations for the other settings?

NickM-27 commented 1 year ago

I can't see in your image what the area of the plant was detected as

yanivf38 commented 1 year ago

Is there a recommended setting? how can I measure it

NickM-27 commented 1 year ago

The value is based on the resolution of the camera. The number next to the % score is the area of that box. You want min_area to be higher than that but lower than a real person detection would be

LaurenceGough commented 1 year ago

For this I would recommend an object mask so that a person could never be detected in that small area. The object mask should cover the bottom of the detection bounding box as that is where the object is defined. I.E set the object mask to cover where the table legs are.

yanivf38 commented 1 year ago

Thank you @LaurenceGough and @NickM-27 for the help. I get the workarounds but why would static plant is identified as a person to begin with?

NickM-27 commented 1 year ago

Thank you @LaurenceGough and @NickM-27 for the help. I get the workarounds but why would static plant is identified as a person to begin with?

Because the default model is not trained on the perspective of security cameras, it comes from a demo model from Google which is trained on many types of images like you can see here https://imgur.com/a/CNImofJ so it has false positives.

woempiej commented 1 year ago

Hi,

I have simular problems with person detection. I had a busy day with lots of people @ my house. Now the Add-on stucks on detecting persons.

afbeelding

As you can see below, the LOG shows that the detection gives an errors. The errors are also present when it is not busy @ my home.

afbeelding

Here is my config:

mqtt:
  host: 192.168.X.X
  user: mqtt-user
  password: mqtt-password
detectors:
  coral:
    type: edgetpu
    device: usb

birdseye:
  enabled: False
################################################################################
cameras:
  frigate_voordeur:
    ffmpeg:
      inputs:
        - path: rtsp://XXX/videoSub
          roles:
            - detect
            - rtmp
        - path: rtsp://XXX/videoMain
          roles:
            - record
    rtmp:
      enabled: False
    detect:
      width: 1280
      height: 720
    zones:
      zone_0_voordeur:
        coordinates: 309,720,1280,720,1280,221,454,131,196,41
    objects:
      track:
        - person
      filters:
        person:
          min_area: 5000
          mask:
            - 426,144,437,255,401,262,389,147
            - 1280,0,1280,164,191,83,302,720,0,720,0,0
            - 1280,720,1280,377,949,512
    motion:
      mask:
        - 0,39,374,38,373,0,0,0
        - 1280,0,1280,164,191,83,302,720,0,720,0,0
        - 1280,720,1280,377,949,512
    record:
      enabled: True
      events:
        objects:
          - person
        required_zones:
          - zone_0_voordeur
        retain:
          default: 5
          mode: active_objects
    snapshots:
      enabled: True
      clean_copy: False
      retain:
        default: 5
################################################################################
  frigate_oprit:
    ffmpeg:
      inputs:
        - path: rtsp://XXX/videoSub
          roles:
            - detect
            - rtmp
        - path: rtsp://XXX/videoMain
          roles:
            - record
    rtmp:
      enabled: False
    detect:
      width: 1280
      height: 720
    zones:
      zone_0_oprit:
        coordinates: 530,32,740,25,846,720,137,720
    objects:
      track:
        - person
      filters:
        person:
          min_area: 3000
          mask: 44,296,181,460,317,462,367,571,311,720,0,720,0,346
    motion:
      mask: 0,39,374,38,373,0,0,0
    record:
      enabled: True
      events:
        objects:
          - person
        required_zones:
          - zone_0_oprit
        retain:
          default: 5
          mode: active_objects
    snapshots:
      enabled: True
      clean_copy: False
      retain:
        default: 5
################################################################################
  frigate_tuin:
    ffmpeg:
      inputs:
        - path: rtsp://XXX/videoSub
          roles:
            - detect
            - rtmp
        - path: rtsp://XXX/videoMain
          roles:
            - record
    rtmp:
      enabled: False
    detect:
      width: 1280
      height: 720
    zones:
      zone_0_tuin:
        coordinates: 0,720,1280,720,1107,89,0,82
    objects:
      track:
        - person
      filters:
        person:
          min_area: 5000
          mask: 769,93,845,92,848,194,767,194
    motion:
      mask:
        - 0,96,739,86,741,184,856,181,853,86,1130,96,1114,235,1280,471,1280,105,1280,0,0,0
        - 0,421,142,391,250,356,333,314,397,280,410,243,366,213,282,194,146,195,0,215
    record:
      enabled: True
      events:
        objects:
          - person
        required_zones:
          - zone_0_tuin
        retain:
          default: 5
          mode: active_objects
    snapshots:
      enabled: True
      clean_copy: False
      retain:
        default: 5

Any advise? I'm reading the DOCS and Github Issues for weeks now. But can't get it to work stable.

NickM-27 commented 1 year ago

Detector getting stuck is usually a host issue. Some users have found in proxmox using lxc instead of VM works better. I'd suggesting searching past issues for that error.

woempiej commented 1 year ago

Hi Nick,

I have a system with only Home Assistant installed. Is that also a Vitual Machine setup?

NickM-27 commented 1 year ago

No, in that case might be a hardware issue. Do you have different USB ports to try?

woempiej commented 1 year ago

Yes I have 2 USB 3.0 ports. I switched port last week but that did not solve this issue.

LaurenceGough commented 1 year ago

Could it be the Coral USB not getting enough power?

I guess as a test you could try CPU detectors to rule it out?

woempiej commented 1 year ago

Thanks for thinking with me Nick and Laurence.

Yes it could be a power issue. I will check it and post an update.

LaurenceGough commented 1 year ago

I'm a Linux newb but try checking the following areas to check for log details:

Subsite "nano" with your text editor of your choice such as vi or just use the cat command to see the contents of these files. Home Assistant OS might store these files in a different location so I am not sure on that. You might need to allow SSH / terminal access first as well if you cannot find the logs otherwise. nano /var/log/debug nano /var/log/syslog (will be pretty full and may be harder to browse) nano /var/log/user.log nano /var/log/kern.log

Also try the following commands: journalctl dmesg -l 0,1,2,3 dmesg (if the above doesn't help)

woempiej commented 1 year ago

I think you are right Laurence

Output of the dmesg:

afbeelding

First google result:

afbeelding

Update: I changed my power supply and will post an update tomorrow

woempiej commented 1 year ago

@yanivf38 did you solve your challenge?

LaurenceGough commented 1 year ago

Snap, I get the same about once or twice a day... Works fine though so I'm leaving it be.

[2391261.094972] usb 2-2: reset SuperSpeed USB device number 4 using xhci_hcd [2391261.113637] usb 2-2: LPM exit latency is zeroed, disabling LPM.

Also in the Frigate logs occasionally, I assume related but might not be...

''2023-04-06 01:22:18.475157321 [2023-04-06 01:22:18] frigate.watchdog INFO : Detection appears to be stuck. Restarting detection process... 2023-04-06 01:22:18.476173821 [2023-04-06 01:22:18] root INFO : Waiting for detection process to exit gracefully...

2023-04-06 01:22:48.505573469 [2023-04-06 01:22:48] root INFO : Detection process didnt exit. Force killing... 2023-04-06 01:22:48.529025506 [2023-04-06 01:22:48] root INFO : Detection process has exited... 2023-04-06 01:22:48.605190062 [2023-04-06 01:22:48] detector.coral INFO : Starting detection process: 10963 2023-04-06 01:22:48.612780932 [2023-04-06 01:22:48] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb 2023-04-06 01:22:51.941904393 [2023-04-06 01:22:51] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found''

I've never had it get stuck like yours though.

The Raspberry Pi 4 itself never gets any undervolt issues, and on USB it's just the Coral and a very low power SSD (SSDs can vary a lot in power). Perhaps the Pi 4 just cannot handle the burst current the Coral requires, or there is some other issue..

woempiej commented 1 year ago

Hmmm... My LOGS are clear for now after changing the power supply:

afbeelding

github-actions[bot] commented 1 year 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.