Works with
Not security product
Porch Pirate flags; it does not prevent theft. The listener logs and publishes an MQTT message, and nothing else is wired. Theft is a rule on Frigate’s tracked-object events, not something the detector sees, and the rule cannot tell a resident, a returning courier and a thief apart.

How it works
Frigate package detection needs a model with a package class, which COCO-80 models lack. Porch Pirate runs a custom 5-class model, people-and-cardboxes.dxnn, on the NPU of the Sixfab AI HAT+ for Raspberry Pi 5 (DEEPX DX-M1M) and a Python listener, porch_watch.py, on the Raspberry Pi 5 CPU. “Porch pirate” is US slang for someone who steals delivered packages.
The data flows in 5 steps:
- An RTSP stream of the porch reaches Frigate on the Raspberry Pi 5.
- Frigate sends frames to the DEEPX NPU, which runs the 5-class model.
- Frigate tracks each package and person and records whether it is inside
frontdoor_zone. - Frigate publishes tracked-object events to
frigate/events. porch_watch.pyreads those events and, when the rule matches, publishes an alert toporch_pirate/theft_alert.
When it works, the porchpirate camera in Frigate shows boxes around packages and people, the listener’s log has one line per step of the rule, and a theft scenario produces a message on porch_pirate/theft_alert. Each alert is one JSON line with the camera, package ID, suspect ID, dropper IDs, score and timestamp. Explore in Frigate lists each package and each person as its own tracked object, the same objects Frigate reports on frigate/events.

Requirements
Finish these pages first, in order: mount the Sixfab AI HAT+ for Raspberry Pi 5 with the Sixfab AI HAT+ Quickstart, set up Frigate NVR on Raspberry Pi 5 with the DEEPX NPU, then Camera feeds and MQTT for Frigate projects.
Hardware
- Raspberry Pi 5Runs Frigate and the listener.
- Sixfab AI HAT+ (DEEPX DX-M1M)Already set up with Frigate’s DEEPX detector. This project was tested on this board.
- Porch-facing RTSP cameraAny RTSP camera or stream at
[RTSP_URL].
Software
- Frigate with the DEEPX NPU detectorSet up with Frigate NVR on Raspberry Pi 5 with the DEEPX NPU. That page holds the one Frigate
docker runcommand and pullsghcr.io/blakeblackshear/frigate:af0ba19-standard-arm64. - MQTT brokerAny broker on port 1883 that accepts connections without credentials, such as Mosquitto; the listener sends no credentials. Frigate must publish MQTT events to the same broker the listener uses: follow Camera feeds and MQTT for Frigate projects.
- Python 3 with venv
install.shcreates a virtual environment and installspaho-mqtt. - Other tools
git,curl,sha256sum, Docker,ffprobe,mosquitto_sub,systemduser services.
DEEPX support is not in a stable Frigate release
DEEPX support was merged into Frigate’s dev branch on September 21, 2026 (PR #24336). The latest stable release is v0.18.0 (September 12, 2026). This project uses the ghcr.io/blakeblackshear/frigate:af0ba19-standard-arm64 image, built from commit af0ba19 of the dev branch. Sixfab develops and maintains DEEPX support in Frigate; see Frigate’s DEEPX NPU detector docs.
Install
Run the install on the Raspberry Pi 5 that runs Frigate. Both methods copy the model and label map into the Frigate config directory, merge the model entry and the porchpirate camera into your Frigate config.yaml, install the listener and its service, and restart Frigate; the files in the repository stay unchanged.
git clone https://github.com/sixfab/sixfab-dx-frigate.git
cd sixfab-dx-frigate/apps/porch-pirate
./install.sh --rtsp-url [RTSP_URL] --broker [BROKER_HOST]
--rtsp-urlstringThe RTSP address of your porch camera.
--brokerstringThe host of your MQTT broker. Without it, the listener uses
127.0.0.1, which reaches no broker when the broker runs on another computer, as in the tested layout, so always pass it. The option sets only the listener’s broker, not Frigate’s ownmqtt.hostsetting: point that at the broker in yourconfig.yamltoo. Defaults to127.0.0.1.--yesflagSkips the question before the Frigate restart.
--containerstringNames the container when it is not named
frigate. Defaults tofrigate.--config-dirstringSets the Frigate config directory yourself.
The installer asks for anything it needs and does not have. It downloads the model file from the project’s GitHub release and checks its SHA-256 before installing it. It finds your Frigate config directory from the container’s /config mount, asks before it restarts Frigate, and switches the porchpirate camera on after the restart. It prints its 5 stages and ends with Install complete.

After the install, edit the frontdoor_zone polygon in [FRIGATE_CONFIG_DIR]/config.yaml to match your own porch. The installed zone traces the project’s reference footage, not your camera.

To keep the listener running after logout and reboot, run once:
sudo loginctl enable-linger $USER
Sign in at https://[PI_IP]:8971 and confirm that the porchpirate camera shows a live image.
The manual install runs the same installer from a clone, with your values as environment variables.
-
Start your RTSP feed and MQTT broker, and turn on MQTT in Frigate
Start your RTSP feed and MQTT broker, and turn on MQTT in Frigate with host
[BROKER_HOST]. -
Clone repository
Clone the repository and open the project folder:
git clone https://github.com/sixfab/sixfab-dx-frigate.git [REPO_DIR] cd [REPO_DIR]/apps/porch-pirate -
Download and check model
Download the model from the project’s GitHub release into the project folder and check it. Use the repository address without a trailing
.gitin the download URL.mkdir -p model/people-and-cardboxes curl -fL -o model/people-and-cardboxes/people-and-cardboxes.dxnn https://github.com/sixfab/sixfab-dx-frigate/releases/download/porch-pirate-v1.0.0/people-and-cardboxes.dxnn awk '$1 !~ /^#/ && NF {print $3 " " $2}' models.txt | sha256sum -c -model/people-and-cardboxes/people-and-cardboxes.dxnn: OK -
Draw your porch zone
Draw your own porch zone, named
frontdoor_zone, inconfig/fragment.yaml. The fragment adds this camera and model:models: - scene: indoor model_type: yolo-generic width: 640 height: 640 path: /config/model_cache/people-and-cardboxes.dxnn labelmap_path: /config/model_cache/people-and-cardboxes-labelmap.txt devices: - deepx:PCIe:0 cameras: porchpirate: ffmpeg: inputs: - path: [RTSP_URL] roles: - detect - record detect: enabled: true width: 1280 height: 720 objects: track: - person - package filters: person: min_score: 0.4 threshold: 0.5 package: min_score: 0.4 threshold: 0.5 motion: threshold: 15 contour_area: 8 zones: frontdoor_zone: coordinates: 0.0343,0.4439,0.3371,0.2119,0.5066,0.5039,0.5539,0.4557,0.8724,0.8514,0.7992,0.9948,0.2052,0.9948 objects: - person - package -
Run installer
Run the installer with your values.
CONTAINER,CONFIG_DIRandASSUME_YES=1work as environment variables too.RTSP_URL=[RTSP_URL] BROKER=[BROKER_HOST] ./install.shThe script runs 5 stages: it checks the RTSP stream with
ffprobe, copies the model and label map into the Frigate config directory, merges your stream into a copy offragment.yamland that into the liveconfig.yaml(after saving a timestamped.bakcopy), installs the listener and its service, and restarts the Frigate container after asking. -
Keep listener running
To keep the listener running after logout and reboot, run once:
sudo loginctl enable-linger $USER -
Check camera
Sign in at
https://[PI_IP]:8971and confirm that theporchpiratecamera shows a live image. Use your own camera name if you changed it.
To run this camera next to other projects’ cameras and models on one NPU, see Can one DEEPX NPU run several cameras and models? on the setup page.
Verify
-
Check that the listener runs
systemctl --user status porch-pirate-automation.service --no-pager -n 30The unit reports
active (running), followed by its latest log lines.
-
Subscribe to alert topic
mosquitto_sub -h [BROKER_HOST] -t porch_pirate/theft_alert -vThe command stays quiet until an alert fires.
-
Check that Frigate answers
docker exec frigate curl -s http://localhost:5000/api/statsFrigate returns its stats as JSON. Reach the Frigate web interface only through
https://[PI_IP]:8971. -
Follow rule in listener log
journalctl --user -u porch-pirate-automation.service -n 50 --no-pagerThe listener writes one line per step of the rule:
Log line Meaning PERSON_ENTERED_ZONEA person entered frontdoor_zonePACKAGE_DROPPEDA package was seen for the first time; the log lists the dropper IDs SECONDARY_PERSON_NEAR_PACKAGEA person outside the dropper set entered the zone while the package was active THEFT_ALERT_SUSPECTEDThe package event ended after a secondary person was seen; the alert was published PACKAGE_REMOVEDThe package event ended and no unrelated person was seen 
A theft scenario logs
PACKAGE_DROPPED, thenSECONDARY_PERSON_NEAR_PACKAGE, thenTHEFT_ALERT_SUSPECTED. The dropper picking the package back up while still in the frame logsPACKAGE_REMOVEDand publishes nothing. A dropper who leaves the frame and comes back gets a new track ID, so the alert fires.
Results
Tested on a Raspberry Pi 5 (8 GB) with the Sixfab AI HAT+ (DEEPX DX-M1M), Raspberry Pi OS Trixie 64-bit, RT driver v2.6.0, PCIe driver v2.5.0, DX-RT v3.4.2 on the Raspberry Pi 5 and v3.4.0 in Frigate’s DEEPX detector, firmware v2.7.4, ghcr.io/blakeblackshear/frigate:af0ba19-standard-arm64 and a live IP camera over RTSP; last tested October 5, 2026.
Frigate’s System page showed a detector inference speed of 18.35 ms for deepx:PCIe:0 in the test (the figure below): one reading of Frigate’s own statistic, not a benchmark. No alert delay or false-alarm rate has been measured. To measure your own setup, read the detector stats with the Frigate stats command under Verify, and compare the time you remove a package with the time the message reaches porch_pirate/theft_alert; add a timestamp to your test runs so you can report the delay. Frigate’s System page lists the deepx:PCIe:0 detector with charts for inference speed, CPU and memory, which confirms that the NPU does the detection. System Monitoring shows how to check NPU load with dxtop.

Details
Parts
Porch Pirate has 3 parts:
| Part | File | Job |
|---|---|---|
| Model | model/people-and-cardboxes/people-and-cardboxes.dxnn, labelmap.txt | Detects package, person, car, truck and motorcycle on the NPU |
| Zone and camera | config/fragment.yaml (porchpirate camera, model, frontdoor_zone) | Limits the rule to the porch deck |
| Listener | automation/porch_watch.py, run by porch-pirate-automation.service | Reads frigate/events and publishes the theft alert |
Terms
| Term | Meaning |
|---|---|
| NPU | Neural processing unit, a chip that runs neural-network inference so the CPU does not have to |
| Frigate NVR | An open-source network video recorder that runs object detection and publishes events over MQTT |
| MQTT, broker, topic | MQTT is a lightweight publish-subscribe protocol; a broker such as Mosquitto passes messages between programs, and each message goes to a named topic |
| RTSP | The protocol IP cameras use to stream live video |
| COCO-80 | A common set of 80 object classes that many pretrained detectors use; it has no package class |
.dxnn | DEEPX’s compiled model format |
| Label map | A text file that lists the class names in the order the model outputs them |
| Zone | A polygon on the camera image; Frigate reports which zones each tracked object is in |
| Track ID | The ID Frigate gives an object while it stays in view; a person who leaves and returns gets a new one |
Models with package class
Frigate detects packages without Frigate+, Frigate’s paid model service, only if its model has a package class. Porch Pirate does not use Frigate+:
| Model | Package label | Classes | Theft logic |
|---|---|---|---|
yolov8n-ppu-coco80.dxnn, a COCO-80 reference model | No | 80 | No |
people-and-cardboxes.dxnn, this project’s custom model | Yes (package, class 0) | 5 | Provided by porch_watch.py, not by the model |
people-and-cardboxes.dxnn detects 5 classes, in this order: package, person, car, truck, motorcycle. It takes a 640 × 640 input, was trained on a custom dataset balanced with COCO person images, and was compiled with DX-COM as a PPU model. It ships as a ready-compiled .dxnn file, so you compile nothing. The install downloads it from the project’s GitHub release into model/people-and-cardboxes/, next to labelmap.txt.
To compile your own model to .dxnn, see the Sixfab Deployment Workflow and the DX-COM configuration reference; for ready-made models, see the Sixfab Model Zoo.
Porch zone
porch_watch.py counts only people inside the Frigate zone named frontdoor_zone, but it tracks every package event on the camera, whichever zone the package is in. The shipped polygon follows the porch deck of the project’s reference frame: door frame, railing, pillar, deck corner, bottom edge. It does not fit your camera, so draw your own and keep the name frontdoor_zone. The coordinates in the fragment are x,y pairs between 0 and 1.

porch_watch.py does not filter by camera name. If another project on the same Frigate, such as face recognition, defines a zone also named frontdoor_zone, a person at that camera can trigger a false theft alert. Rename one of the 2 zones before you run both.
Theft rule
The alert fires when a package’s tracked-object event ends after someone new entered the zone: a person who was not in the zone when the package appeared. porch_watch.py applies 4 steps:
- Subscribes to
frigate/eventsand reads the event type, ID, label, camera and current zones. - When a new
packageevent appears, takes a snapshot of every person in the zone at that moment as that package’s dropper set (the presumed droppers: a courier, or you). The set does not change, and it stays until the package event ends. - While the package is active, flags the first person in the zone who is not in the dropper set as the secondary person.
- When the package event ends, logs a warning and publishes the alert if a secondary person was flagged; otherwise logs
PACKAGE_REMOVEDand publishes nothing.
A “different person” is a different Frigate track ID. The rule reacts to Frigate ending the package event and does not check why it ended. See Limitations.
MQTT topics
Porch Pirate uses 2 MQTT topics. Frigate’s own MQTT topics are documented upstream.
| Topic | Published by | Read by | Payload |
|---|---|---|---|
frigate/events | Frigate | porch_watch.py | Tracked-object events |
porch_pirate/theft_alert | porch_watch.py | Any subscriber | JSON, published with QoS 1, not retained |
The alert payload has these fields; the example is schematic, not a captured alert. timestamp is Unix time in seconds, and dropped_score is the package’s detection score when it first appeared. The listener also logs THEFT_ALERT_SUSPECTED at warning level when it publishes.
{"camera": "<camera-name>", "box_id": "<package-event-id>", "suspect_person_id": "<person-event-id>", "dropped_by": ["<person-event-id>"], "dropped_score": 0.0, "timestamp": 0.0}
Limitations
- No re-identification. Anyone who leaves and re-enters the frame gets a new track ID, so “different person” means “different track ID”. A real identity check would need a
face_recognitionsub_labelcomparison, which this project does not use. - No resident, courier or thief distinction. The rule does not check who picks the package up. It alerts whenever someone other than the dropper entered the zone first, so collecting your own package alerts when you were not in the zone as it appeared.
- The rule reacts to the end of the package event. It does not check why Frigate ended the event, so a package track that Frigate loses while the package is still there counts as removed.
- One flagged person per package. The listener records the first secondary person only.
- State lives in memory. Restarting the listener clears active packages.
- No broker security. The listener connects to port 1883 without credentials.
- One camera and one zone. The fragment defines one camera and one zone, and the listener does not filter by camera: see Porch zone.
- Frigate chooses the DX-RT version its DEEPX detector uses. The tested build pins DX-RT v3.4.0, and this page cannot change it.
- Restart after a runtime restart. If the DX-RT daemon (the DEEPX runtime) restarts, restart the Frigate container too.
- Frigate in Docker only. Porch Pirate was set up with Frigate in Docker; Home Assistant OS and the Frigate add-on were not tested.
Privacy
The camera records people, so set it up with their privacy in mind.
- Aim the camera at your porch, not the street, and check local rules on recording public areas.
- Delivery workers and visitors are recorded. Set recording and snapshot retention deliberately.
- Detection runs on the NPU, and no cloud service is needed. The listener connects only to the MQTT broker you configure and contacts nothing else. Frigate itself downloads the DX-RT Python bindings once at first start, and again when a release pins a new version.
- Never add traps, sprays or anything that could hurt someone, and never confront anyone.
Troubleshooting
Check the listener log with journalctl --user -u porch-pirate-automation.service -n 50 --no-pager. Confirm that mosquitto_sub -h [BROKER_HOST] -t frigate/events -v shows events; if it does not, revisit the Frigate MQTT setup. Then confirm that BROKER in porch_watch.py points at the same broker.
The listener filters by zone name and label only. Check that the zone is named frontdoor_zone and that Frigate tracks person and package.
Run sudo loginctl enable-linger $USER.
The installer runs ffprobe against the RTSP URL you gave it and exits with ERROR: cannot read <rtsp-url> - is the stream running and reachable from this Pi? if it cannot read the stream. Confirm the feed is running and the URL is reachable from the Raspberry Pi 5.
The installer looks for a Docker container named frigate. Pass --container [NAME] to the install script, or set CONTAINER=[NAME] for the manual install.
Run docker restart frigate yourself, or rerun the installer with --yes. The new camera and model load only after the restart.
The installer places the listener and its virtual environment in ~/sixfab-apps/porch-pirate and points the unit file at your user and home directory. Check it with systemctl --user status porch-pirate-automation.service --no-pager -n 30, and confirm ~/sixfab-apps/porch-pirate/porch_watch.py exists.
The rule expects this when you were not in the porch zone as the package appeared, or when you left the frame and came back (a new track ID). See Limitations.
Next steps
See also
- Raspberry Pi face recognition camera with Frigate Projects
- Cellular connectivity on the Edge AI Expansion Board Edge AI
- Sixfab AI HAT+ for Raspberry Pi 5 Product page
License and credits
The code is licensed under the MIT License. Each model file has its own license: people-and-cardboxes.dxnn is licensed under AGPL-3.0. The license and other details of every model are in the release notes at https://github.com/sixfab/sixfab-dx-frigate/releases/tag/porch-pirate-v1.0.0.