blakeblackshear.frigate/1c86fc29.9ddf1dd6.js

1 line
8.7 KiB
JavaScript
Raw Permalink Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{74:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return i})),r.d(t,"metadata",(function(){return c})),r.d(t,"toc",(function(){return l})),r.d(t,"default",(function(){return p}));var a=r(3),n=r(7),o=(r(0),r(99)),i={id:"optimizing",title:"Optimizing performance"},c={unversionedId:"configuration/optimizing",id:"configuration/optimizing",isDocsHomePage:!1,title:"Optimizing performance",description:"- Google Coral//coral.ai",source:"@site/docs/configuration/optimizing.md",slug:"/configuration/optimizing",permalink:"/frigate/configuration/optimizing",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/configuration/optimizing.md",version:"current",sidebar:"docs",previous:{title:"Cameras",permalink:"/frigate/configuration/cameras"},next:{title:"Detectors",permalink:"/frigate/configuration/detectors"}},l=[{value:"FFmpeg Hardware Acceleration",id:"ffmpeg-hardware-acceleration",children:[]}],s={toc:l};function p(e){var t=e.components,r=Object(n.a)(e,["components"]);return Object(o.b)("wrapper",Object(a.a)({},s,r,{components:t,mdxType:"MDXLayout"}),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"Google Coral"),": It is strongly recommended to use a Google Coral, Frigate will no longer fall back to CPU in the event one is not found. Offloading TensorFlow to the Google Coral is an order of magnitude faster and will reduce your CPU load dramatically. A $60 device will outperform $2000 CPU. Frigate should work with any supported Coral device from ",Object(o.b)("a",Object(a.a)({parentName:"li"},{href:"https://coral.ai"}),"https://coral.ai")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"Resolution"),": For the ",Object(o.b)("inlineCode",{parentName:"li"},"detect")," input, choose a camera resolution where the smallest object you want to detect barely fits inside a 300x300px square. The model used by Frigate is trained on 300x300px images, so you will get worse performance and no improvement in accuracy by using a larger resolution since Frigate resizes the area where it is looking for objects to 300x300 anyway."),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"FPS"),": 5 frames per second should be adequate. Higher frame rates will require more CPU usage without improving detections or accuracy. Reducing the frame rate on your camera will have the greatest improvement on system resources."),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"Hardware Acceleration"),": Make sure you configure the ",Object(o.b)("inlineCode",{parentName:"li"},"hwaccel_args")," for your hardware. They provide a significant reduction in CPU usage if they are available."),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"Masks"),": Masks can be used to ignore motion and reduce your idle CPU load. If you have areas with regular motion such as timestamps or trees blowing in the wind, frigate will constantly try to determine if that motion is from a person or other object you are tracking. Those detections not only increase your average CPU usage, but also clog the pipeline for detecting objects elsewhere. If you are experiencing high values for ",Object(o.b)("inlineCode",{parentName:"li"},"detection_fps")," when no objects of interest are in the cameras, you should use masks to tell frigate to ignore movement from trees, bushes, timestamps, or any part of the image where detections should not be wasted looking for objects.")),Object(o.b)("h3",{id:"ffmpeg-hardware-acceleration"},"FFmpeg Hardware Acceleration"),Object(o.b)("p",null,"Frigate works on Raspberry Pi 3b/4 and x86 machines. It is recommended to update your configuration to enable hardware accelerated decoding in ffmpeg. Depending on your system, these parameters may not be compatible."),Object(o.b)("p",null,"Raspberry Pi 3/4 (32-bit OS)\nEnsure you increase the allocated RAM for your GPU to at least 128 (raspi-config > Performance Options > GPU Memory)