Calibrating Frigate max_area and min_area

Frigate calibration

To calibrate Frigate’s object detection accuracy you need to calibrate Frigates min_area and max_area values. This is very easy using a teddy bear, plush toy or even a box or a stack of boxes, as long as they are approximately the size of a real cat or whatever animal you wish to detect.

This process can be used for any animal as long as you know their general size.

🚨 Why This Step Is So Important

If you skip this calibration, you risk:

  • Constant false positives from shadows, plants, or insects
  • Missing actual detection because Frigate filters them out as too small or too large
  • Wasting resources (CPU, storage, bandwidth) on invalid events
  • Triggering automatons (like sprinklers or alarms) at the wrong time

In short: this is not optional—it’s essential for reliable performance.

Calibrating min_area and max_area is one of the most important steps you can take to make Frigate accurate and your automations effective.

📐 How min_area and max_area Work

Frigate uses these two parameters to filter detection’s based on the pixel size of an object’s bounding box:

  • min_area: The object must be at least this many pixels to be considered valid.
  • max_area: The object must not exceed this many pixels.

Anything smaller than min_area (like shadows or distant leaves) or larger than max_area (like people or large objects) will be ignored.

🧰 What You’ll Need

  • A plush toy, teddy bear, pile of boxes or anything that is about the size of your target animal.
  • Access to Frigate’s live stream or recordings.
  • GIMP (free image editor) for pixel analysis.

🧭 Step-by-Step Calibration Process

  • Place the plush toy or boxes in your garden (or detection zone):

Try multiple positions: near/far, left/right, full side view, angled and head on to the camera.

Move it through the full camera frame: corners, center, edges.

  • Take screenshots from Frigate’s stream or snapshots showing the dummy item in each location.
  • Open each of the screenshot in GIMP:

In Gimp go to Windows → Dockable Dialogs → Histogram.

Use the Rectangle Select Tool to manually select the object in each image.

With the dummy item selected, GIMP’s histogram will display the number pixels in the area of the selection, Record these values:

  • The smallest area of pixels from your tests becomes your min_area.
  • The largest area of pixels becomes your max_area.

Update your Frigate.yaml with your calibrated min_area and max_area for your tracked object, in my case cat:

        cat:
          min_area: 4000
          max_area: 120000

This will give you very precise settings for your frigate setup with your camera.

By properly setting these values, you ensure Frigate only acts on detection’s that match the real-world size of the animal you’re monitoring,

This boosts accuracy and reduces false positives.

👉 Don’t skip this—it’s the foundation of a reliable smart detection system.

If you have found this information useful feel free to buy me a coffee to help keep this content free and online.

Leave a comment