Skip to content

frigate: migrate from tensorflow to ai-edge-litert - #480163

Merged
mweinelt merged 5 commits into
NixOS:masterfrom
mweinelt:ai-edge-litert
Jan 16, 2026
Merged

mweinelt merged 5 commits into
NixOS:masterfrom
mweinelt:ai-edge-litert

Conversation

@mweinelt

@mweinelt mweinelt commented Jan 14, 2026 •

Copy link
Copy Markdown
Member

The combination of tensorflow-bin and onnxruntime in the same Python interpreter is super fragile. This problem does not seem to exist with tflite-runtime (used upstream) or ai-edge-litert (the successor to tflite).

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 6.topic: python Python is a high-level, general-purpose programming language. labels Jan 14, 2026
@mweinelt
mweinelt force-pushed the ai-edge-litert branch 4 times, most recently from e33ef64 to ccd0bfe Compare January 14, 2026 21:48
@mweinelt mweinelt mentioned this pull request Jan 15, 2026
2 of 13 tasks
Comment thread .editorconfig
trim_trailing_whitespace = unset

[*.json]
insert_final_newline = unset

@dotlambda dotlambda Jan 15, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because json.dump() does not add a final newline and other encoders might also not do that. Either way we should not require it and I created that commit in response to a discussion with the nixpkgs-ci team.

@mweinelt
mweinelt marked this pull request as ready for review January 15, 2026 16:37
@mweinelt

mweinelt commented Jan 15, 2026 •

Copy link
Copy Markdown
Member Author

Tested against Coral M.2 PCIe NPU.

[2026-01-15 16:02:18] detector.coral                 INFO    : Starting detection process: 1522327
[2026-01-15 16:02:18] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as pci
[2026-01-15 16:02:18] frigate.app                    INFO    : Output process started: 1522343
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
[2026-01-15 16:02:18] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found
image

Also allows enabling enrichments (sematic search and other classifications):

image image

@nixpkgs-ci
nixpkgs-ci Bot requested review from Mic92, natsukium and zowoq January 15, 2026 16:41
@mweinelt mweinelt changed the title frigate: test support for ai-edge-litert frigate: replace tensorflow support for ai-edge-litert Jan 15, 2026
@mweinelt mweinelt changed the title frigate: replace tensorflow support for ai-edge-litert frigate: migrate from tensorflow to ai-edge-litert Jan 15, 2026
@mweinelt
mweinelt force-pushed the ai-edge-litert branch 4 times, most recently from d0b34c1 to 82bad9e Compare January 16, 2026 00:44
The combination of tensorflow-bin and onnxruntime in the same Python
interpreter is super fragile. This problem does not seem to exist
with tflite-runtime (used upstream) or ai-edge-litert (the successor
to tflite).

Fixes: NixOS#476181
JSON is often automatically generated and adding a final newline is a
manual step, that we shouldn't enforce.
@mweinelt
mweinelt added this pull request to the merge queue Jan 16, 2026
@mweinelt
mweinelt removed this pull request from the merge queue due to a manual request Jan 16, 2026
This was for protobuf coexistence between onnxruntime and tensorflow and
is not needed any longer.
@mweinelt
mweinelt enabled auto-merge January 16, 2026 02:17
@mweinelt
mweinelt added this pull request to the merge queue Jan 16, 2026
Merged via the queue into NixOS:master with commit 7e474c6 Jan 16, 2026
@mweinelt
mweinelt deleted the ai-edge-litert branch January 16, 2026 02:29
@indiv0 indiv0 mentioned this pull request Feb 5, 2026
1 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants