『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 742|回复: 5

[技术探讨] frigate实现人在传感器

[复制链接]

1

主题

6

帖子

66

积分

注册会员

Rank: 2

积分
66
金钱
60
HASS币
0
发表于 2024-7-22 14:22:18 | 显示全部楼层 |阅读模式
frigate的搭是在一台8265u的笔记本上,摄像头是乐橙的
先在/opt/docker/frigate/config创建config文件
mqtt:
  enabled: True
  host: 10.0.0.10
  port: 1883
  user: frigate
  password: yourpassword
  
detectors:
  ov:
    type: openvino
    device: AUTO
    model:
      path: /openvino-model/ssdlite_mobilenet_v2.xml

model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt  
 
cameras:
  your_camera:
    enabled: true
    ffmpeg:
      hwaccel_args: preset-vaapi
      inputs:
        - path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
          roles:
            - detect

detect: #偵測設定
      enabled: true
      fps: 25 
      width: 1920
      height: 1080
      stationary:
        interval: 30 #靜態偵測持續偵測影格
        threshold: 150 #靜態偵測影格

snapshots: #快照
      enabled: true
      retain: 
        default: 10

objects:
  track:
  - person
  - cat
  #- cell phone
  #- car
  #mask: 0,0,1000,0,1000,200,0,200
  # Optional: filters to reduce false positives for specific object types
  filters:
    person:
      # Optional: minimum width*height of the bounding box for the detected object (default: 0)
      #min_area: 5000
      # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
      #max_area: 100000
      # Optional: minimum width/height of the bounding box for the detected object (default: 0)
      #min_ratio: 0.5
      # Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
      #max_ratio: 2.0
      # Optional: minimum score for the object to initiate tracking (default: shown below)
      min_score: 0.5
      # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
      #threshold: 0.7
      # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
      # Checks based on the bottom center of the bounding box of the object     

docker启动frigate
version: "3.9"
services:
  frigate:
    container_name: frigate
    privileged: true # this may not be necessary for all setups
    restart: unless-stopped
    image: ghcr.io/blakeblackshear/frigate:stable
    shm_size: "256mb" # update for your cameras based on calculation above
    devices:
      - /dev/apex_0:/dev/apex_0    # Passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
      - /dev/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /opt/docker/frigate/config:/config
      - /opt/docker/frigate/storage:/media/frigate
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    network_mode: "host"
    environment:
      FRIGATE_RTSP_PASSWORD: "password"
      LIBVA_DRIVER_NAME: "i965

带动单台摄像头还是可以的
回复

使用道具 举报

0

主题

162

帖子

1297

积分

金牌会员

Rank: 6Rank: 6

积分
1297
金钱
1135
HASS币
0
发表于 2024-7-22 16:10:17 | 显示全部楼层
这个做人在传感器还是有局限,检测不到微动。
回复

使用道具 举报

10

主题

1296

帖子

4113

积分

论坛元老

Rank: 8Rank: 8

积分
4113
金钱
2817
HASS币
0
发表于 2024-7-22 22:14:46 | 显示全部楼层
jimgo 发表于 2024-7-22 16:10
这个做人在传感器还是有局限,检测不到微动。

这货不是用图像检测么?跟微动有关系?
回复

使用道具 举报

0

主题

162

帖子

1297

积分

金牌会员

Rank: 6Rank: 6

积分
1297
金钱
1135
HASS币
0
发表于 2024-7-23 12:19:33 | 显示全部楼层
隔壁的王叔叔 发表于 2024-7-22 22:14
这货不是用图像检测么?跟微动有关系?

用它当人在传感器,人坐着不动就检测为无人了。我是说用它当人在传感器的局限性。没别的意思。
回复

使用道具 举报

10

主题

1296

帖子

4113

积分

论坛元老

Rank: 8Rank: 8

积分
4113
金钱
2817
HASS币
0
发表于 2024-7-23 13:13:37 | 显示全部楼层
jimgo 发表于 2024-7-23 12:19
用它当人在传感器,人坐着不动就检测为无人了。我是说用它当人在传感器的局限性。没别的意思。 ...

哦,这样啊,我还以为人一直在视频范围呢,就显示有人呢,我也没别的意思。
回复

使用道具 举报

8

主题

177

帖子

1607

积分

金牌会员

Rank: 6Rank: 6

积分
1607
金钱
1430
HASS币
0
发表于 2024-7-23 17:41:57 | 显示全部楼层
可以侦测静态的,你看那个config里面就有
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-10-18 15:25 , Processed in 0.121698 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表