谢谢Freshcoast。你是对的。我需要在护卫舰配置文件中更新MQTT地址。

Thank you@blakeblackshearfor putting this together. Here is my best shot at a noob’s guide to using a Raspberry Pi 4 to do person detection. I’m still working on home assistant integration but this doesn’t seem very difficult. (Edit: It was harder than I expected although now that I have it setup, it’s pretty awesome.)

步骤1:使用Balenaetcher闪烁Hypriot图像到SD卡上
Step 2: Update Password:

passwd

步骤3:根特权

sudo -i

步骤4:更新您的安装

apt-get update && apt-get upgrade -y
重启

步骤6:安装Hassio的额外软件

apt-get install -y jq curl avahi-daemon dbus apparmor-utils网络 - 经理apt-transport-https-https ca-cecrifificates socat软件properties-propies-common-common gnupg gnupg-gnupg-
重启

步骤7:安装hass.iofor RPi4

curl -sl https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh |bash -s -m raspberrypi4

步骤8:在192.168.xx.xx上检查Hassio安装:8123
步骤9:设置家庭助理19463331伟德国际
步骤10:从添加ONS安装蚊子并添加用户名和密码
Step 11: Install Configurator from add ons
Step 12: Download frigate files to /home/pirate

git clone https://github.com/blakeblackshear/frigate.git

步骤13:更新配置文件
Step 14: Comment out intel hardware acceleration lines in DockerFile so it looks like this

libgcc1#vaapi驱动程序,用于英特尔硬件#libva-drm2 libva2 i965-va-driver vainfo \#&& rm -rm -rf/var/var/lib/apt/lists/*

步骤15:建造护卫舰容器

docker build -t frigate .

步骤16:创建docker-compose.yml文件,然后将其保存在主护卫舰目录中。像这样:

Nano Docker-Compose.yml

复制并粘贴以下内容。

版本:“ 3”服务:护卫舰:container_name:Frigate RESTART:除非停滞特权:True Image:Frigate:最新卷: - /dev/dev/bus/usb:/dev/dev/bus/usb  - /home/home/home/pirate/pirate/pirate/config:/config端口: - “ 5000:5000”环境:rtsp_password:“密码”

然后控制+o,输入,控制+x
步骤17:运行护卫舰容器

docker-compose up

步骤18:通过复制相机和binary_senso19463331伟德国际r代码与家庭助理集成@blakeblackshear’s readme example to the Home Assistant config file. As of this writing it appears the automation code is intended to live inside the automations.yaml file which is where it was generated when I created my first automation via the Configuration->Automation tab.
对于像我一样来自Ipcamtalk世界的人,这里有一些有关家庭助理的提示:19463331伟德国际

  1. 默认情况下,在HA的最新版本上创建的configuration.yaml文件看起来与您会发现的大多数示例相同。伟德国际官方app下载苹果版它没有或需要额外的代码行才能正常工作。您最终需要比大多数会发现的示例和视频要少得多。伟德国际官方app下载苹果版
  2. If you want to add multiple cameras you’ll just copy the “camera” and “binary_sensor” sections and add a space and an identifier like so
摄像机2: - 名称:摄像机最后一个人2平台:MQTT主题:护卫舰//快照binary_sensor 2: - 名称:camera2人平台:MQTT state_topic:“ frigate//objects” value_template:'value_template:'value_jsson {value_jjson {{。
  1. For Android users you won’t need a “native” app from the Play store. It’s possible to setup your configuration withduckdns.orgvia aHass.io附加组件,以便您可以远程查看HA安装。设置后,您可以“添加到主屏幕”您创建的HTTPS页面,并且它将像普通应用一样运行。lovelace UI从我所看到的,比我尝试建立“ HA客户”的尝试更好。对于通知,我正在使用HTML5,尽管Telegram和Pushbullet显然也是不错的选择。
4 Likes

One thing I’d really like to do is have the ability to create an automation that is triggered by an individual bounding box. For instance if you have two bounding boxes within a single camera view, one covering the front door and another box covering the driveway, it would be nice to be able to trigger off of the front door box (deliveries during the day) separately from the driveway box (prowler at night). I might be able to figure this out but if someone knows how already please let me know.

我要弄清楚的另一件事是如何创建一个自动化,该自动化只有在一个摄像头的盒子中检测到一个人在另一台相机上的盒子中检测到一个人的盒子。例如,如果Camera1覆盖围栏的外部,并且Camera2覆盖了栅栏的内部,请在摄像头1上检测到一个人在相机2上检测到一个人(有人在栅栏上落在栅栏上),触发动作。有任何想法吗?

3个喜欢

谢谢,这非常有用。我设法使对象检测工作:slight_smile:

谢谢@blakeblackshearfor developing and sharing such a great piece of software!:slight_smile:

大家好,我设置了几周后,整个时间都保持着坚实的态度。好吧,我重新启动了所有内容,完全忘记了我如何做到这一点。从字面上看,几天都在尝试将其恢复。我终于有了它,所以我的照片开始了,警报再次工作。但是奇怪的是,我无法到达URL来设置区域。我看不到文档中提到的它变了,但是在我必须问的那时……

I realize the pictures are coming over mqtt now too, but i thought the url woud still work to adjust the regions? im usinghttp:// ipaddress:5000/camName

该区域在护卫舰配置文件中进行调整,该文件通常位于/home/home/“用户名”/护卫舰/配置文件夹中。

1喜欢

Thanks. I am looking for the url that shows the video with the region boxes, so I can make sure my regions are where they need to be.

My fault. just noticed i forgot to expose the port in my compose file. added the port and back in buisness. thanks

Hello,
Thank you@blakeblackshearfor a really interesting project and a useful addition to my home automation.
I followed@polarbearshirt指示并启动并运行……各种各样。
The image at port 5000 is very jerky and delayed by about 30 seconds. Cars going past can jump from one side of the screen to the other and people are missed as they ‘jump’ over the detection areas.
I’m using a Raspberry Pi 4 and a new security camera, I just bought for this project, that is outputting H265 video at 1920x1080. I tried changing the take_frame to 5 but this didn’t make an improvement.
有什么想法我可能出错吗?也许不支持H265。
Regards
标记

您在什么fps运行相机?老实说,我没有尝试过H265,因为我在捕获相机中捕获剪辑的问题,然后通过电报发送它们。

Thanks for the reply. To be honest I haven’t been able to work out what the FPS are from the camera. I looked in VLC but this is not one of the fields shown in ‘Media Information’. But, it does look very smooth to me so I assume quite high. Which is why I changed the ‘take_frame’ value.

好奇,在WiFi还是有线以太网上的相机和PI4?我会尝试的,只是为了踢,如果可以的话,将其撞到H264。

It’s all on wired. I can’t see how to change the output to H264 (the camera is a Jennov A73WG20) but your suggestion gave me an idea of using some of the other output streams. Stream 2 is still H265 apparently , but the resolution is 640x480 which seems to not suffer the same stuttering. I’ll leave it running to see if it identifies people as before.

and the lag is now minimal too. A big step forward, thank you!

1喜欢

Hey I was looking through the GitHub and noticed someone mentioned you can put a different model to be able to detect cars. Is there some steps to what I would need to do to make that happen? Thank you!

在Imagenet数据库中训练的模型可能会识别出更多类别的卡车(例如卡车),因为它们在DB中有区别……最好的可能是来自此处的Mobilenet v2带有Imagenet:

尽管您应该能够识别具有随附模型的通用“汽车”类别。您只需设置配置即可发送护卫舰配置中其他类别的识别。

Thanks man! That last sentence sounds easy lol. Where do you make the change from person to car?

I haven’t done it myself, but I recall seeing other people doing it either in this thread or in the github chat. IIRC, it was done in the parameters that can be sent to the detection engine in recent versions. You can find the details if you look for them.

Ok thanks for the direction. I’ve been through the thread and gitHub. I don’t have chat or anything but I’ll see if I can find something similar n copy. I’ll post back if I do. Thanks again.