logo

Kataglyphis-Inference-Engine

An inference engine with Flutter/Dart frontend and Rust/C++ backend, showcasing Gstreamer capabilities enhanced with AI. Read further if you are interested in cross platform AI inference.

Build + run + test on Linux natively Windows CMake (clang-cl) natively Build + test + run for web
Build + test + run android appAutomatic Dependency Submission Dependabot Updates TopLang Donate Twitter YouTube

Official homepage

Overview

Kataglyphis-Inference-Engine bundles a Flutter/Dart frontend, a Rust/C++ inference core, and a rich set of camera streaming pipelines powered by GStreamer. The repository acts as an end-to-end reference for building cross-platform inference products that target desktop, web, and embedded devices.

Highlights & Key Features โ€“ Kataglyphis-Inference-Engine

๐ŸŒŸ Highlights

  • ๐ŸŽจ GStreamer native GTK integration โ€“ Leveraging users to write beautiful Linux AI inference apps.
  • ๐Ÿ“น GStreamer WebRTC livestreaming with ready-to-use pipelines for USB, Raspberry Pi, and Orange Pi cameras.
  • ๐ŸŒ‰ flutter_rust_bridge integration โ€“ Ensures a seamless API boundary between Dart UI and Rust logic.
  • ๐Ÿณ Containerized development flow plus native instructions for Windows, Linux, web. For details in my build environment look into Kataglyphis-ContainerHub. On Windows the container engine is Stevedore and build containers run with --isolation process (full host CPU count) โ€” see docs/source/platforms.md.
  • ๐Ÿ Python inference demos for rapid experimentation alongside the Rust core.

๐Ÿ“Š Feature Status Matrix

Core Features

Category Feature Win x64 Linux x64 Linux ARM64 Linux RISC-V Android
Camera Streaming ๐Ÿ“น GStreamer WebRTC Livestream โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ N/A
๐Ÿง  Local Webcam ONNX Inference (Rust) โœ”๏ธ ๐Ÿ”ถ ๐Ÿ”ถ ๐Ÿ”ถ ๐Ÿ”ถ
Supported Cameras ๐Ÿ”Œ USB Devices โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ N/A
๐Ÿ“ Raspberry Pi Camera N/A โœ”๏ธ โœ”๏ธ โœ”๏ธ N/A
๐ŸŸ  Orange Pi Camera N/A โŒ โŒ โŒ N/A
๐Ÿ“ฑ Native Camera API N/A N/A N/A N/A โœ”๏ธ

Infrastructure & Build

Category Feature Win x64 Linux x64 Linux ARM64 Linux RISC-V Android
Containerization ๐Ÿณ Dockerfile โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ N/A
๐Ÿณ Docker Compose N/A โœ”๏ธ โœ”๏ธ โœ”๏ธ N/A
Native Integration ๐ŸŽจ GTK Integration N/A โœ”๏ธ โœ”๏ธ โœ”๏ธ N/A
๐ŸชŸ Win32 API โœ”๏ธ N/A N/A N/A N/A
๐Ÿค– Android NDK N/A N/A N/A N/A โœ”๏ธ
Bridge Layer ๐ŸŒ‰ flutter_rust_bridge โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
Compiler ๐Ÿ”ง Clang-CL โœ”๏ธ N/A N/A N/A N/A
๐Ÿ”ง GCC/Clang N/A โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ

Testing & Quality Assurance

Category Feature Win x64 Linux x64 Linux ARM64 Linux RISC-V Android
Unit Testing ๐Ÿงช Advanced unit testing ๐Ÿ”ถ ๐Ÿ”ถ ๐Ÿ”ถ ๐Ÿ”ถ ๐Ÿ”ถ
Performance โšก Advanced performance testing ๐Ÿ”ถ ๐Ÿ”ถ ๐Ÿ”ถ ๐Ÿ”ถ ๐Ÿ”ถ
Security ๐Ÿ” Advanced fuzz testing ๐Ÿ”ถ ๐Ÿ”ถ ๐Ÿ”ถ ๐Ÿ”ถ ๐Ÿ”ถ

Frontend Platforms

Category Feature Win x64 Linux x64 Linux ARM64 Linux RISC-V Android
Flutter UI ๐Ÿฆ‹ Flutter Web Support โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
๐Ÿ’ป Flutter Desktop โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ N/A
๐Ÿ“ฑ Flutter Mobile N/A N/A N/A N/A โœ”๏ธ

Platform Summary

Platform Architecture Status Notes
๐ŸชŸ Windows x86-64 โœ”๏ธ Built with clang-cl, Win32 integration
๐Ÿง Linux x86-64 โœ”๏ธ Full GTK support, Docker ready
๐Ÿง Linux ARM64 โœ”๏ธ SBC optimized (RPi, OPi support)
๐Ÿง Linux RISC-V โœ”๏ธ Emerging architecture support
๐Ÿค– Android ARM64/x86-64 โœ”๏ธ Native camera, NDK integration

Legend:

  • โœ”๏ธ Completed - Feature fully implemented and tested
  • ๐Ÿ”ถ In Progress - Active development underway
  • โŒ Not Started - Planned but not yet begun
  • N/A - Not applicable for this platform

Quick Start

  1. Clone the repository with submodules:

NOTE: On Windows I use Git Bash instead of
Powershell or cmd

git clone --recurse-submodules --branch develop git@github.com:Kataglyphis/Kataglyphis-Inference-Engine.git
cd Kataglyphis-Inference-Engine
  1. Initialize submodules if needed.
    If u used --recurse-submodules while cloning you are already good.
    Otherwise you can use this :smile:
    git submodule update --init --recursive
    

Refer to the detailed docs below for platform-specific requirements, camera streaming pipelines, and deployment workflows.

  1. Build the app. Every lane runs containerized, and local runs invoke the same script CI invokes โ€” the exact commands, presets and switches are in AGENTS.md ยง 4:

    Lane What CI runs Locally
    Windows (amd64) scripts/windows/Build-Windows.ps1 the same script, in the same image
    Linux native (amd64 / arm64) scripts/linux/ci/ci-container-run-native-linux.sh Invoke-LinuxLane.ps1
    Android scripts/linux/ci/ci-container-run-android.sh Invoke-LinuxLane.ps1 -Lane android
    Web scripts/linux/ci/ci-container-run-web-linux.sh Invoke-LinuxLane.ps1 -Lane web

    The Linux entries go through ContainerHub's run-in-linux-container action in CI and Rancher Desktop's nerdctl locally; inside the container the two are identical, down to the argument list. Reproduce a CI failure locally before pushing โ€” that is the whole point of the arrangement.

    Note that the Linux build_linux stage runs a full CodeQL analysis on x64, not just a build โ€” see AGENTS.md before starting one.

    Building the Linux lane locally on a Windows host has host-side prerequisites โ€” Rancher Desktop's engine, the drive the repo lives on being visible to containerd's own mount namespace, and QEMU binfmt registered for an arm64 run. The concrete commands are in AGENTS.md ยง 4, "The Linux lane, locally"; the reasoning behind them is ContainerHub's, in rancher-desktop-linux-containers.md. Both prerequisites are lost on a VM restart, and skipping either is silent: you get a bind mount that resolves and is empty, or an arm64 container running x86-64 binaries.

Browse the API docs locally

Generate the site into doc/api, then serve it. Use the pub-activated dartdoc, not the SDK-bundled dart doc: dartdoc 9.0.4 (bundled with several Flutter SDKs, including the Windows build image) crashes on any Flutter app with a _stripDocImports RangeError; โ‰ฅ 9.0.9 fixes it.

scripts/windows/Build-Windows.ps1 already does this for you as its "Generate API Docs" step (skip it with -SkipDocs); the commands below are for generating and serving the site by hand.

dart pub global activate dartdoc      # pulls >= 9.0.9
dart pub global run dartdoc --output doc/api
dart pub global activate dhttpd
export PATH="$PATH:$HOME/.pub-cache/bin"
dhttpd --path doc/api --host 127.0.0.1 --port 8080

On PowerShell the pub-cache bin goes on PATH differently:

$env:Path += ";$env:USERPROFILE\AppData\Local\Pub\Cache\bin"

Then open 127.0.0.1:8080.

Documentation

Topic Location Description
Overview & architecture docs/source/overview.md What the project is, the architecture at a glance, and what each top-level directory holds.
Getting Started docs/source/getting-started.md Environment prerequisites, installation, and run commands.
Platform Guides docs/source/platforms.md Container, Windows, Raspberry Pi, and web build instructions โ€” incl. the Windows container troubleshooting table (Dev Drive, pkg-config, rustup/Cargokit, Debug-preset pitfalls).
Agent / contributor guide AGENTS.md Build workflow, container pitfalls, and quality gates for coding agents and new contributors.
Camera Streaming docs/source/camera-streaming.md GStreamer WebRTC pipelines and Python inference demos.
Upgrade guide docs/source/upgrade-guide.md How to keep things up-to-date.

Build the full documentation website with dart pub global run dartdoc (see the note above โ€” not the SDK-bundled dart doc). The generated site in doc/api now includes the guides from docs/source.

Tests

Testing infrastructure is under active development. Track progress on the roadmap or contribute test plans via pull requests.

Roadmap

Upcoming features and improvements will be documented in this repository.
Please have a look docs/source/roadmap.md for more deetails.

Contributing

Contributions are what make the open-source community amazing. Any contributions are greatly appreciated.

  1. Fork the project.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

License

MIT (see here)

Acknowledgements

Thanks to the open-source community and all contributors!

Literature

Helpful tutorials, documentation, and resources:

Multimedia

Rust

Raspberry Pi

CMake/C++

Flutter/Dart

Protocols

Tooling

Android

Contact

Jonas Heinle
Twitter: @Cataglyphis_
Email: cataglyphis@jonasheinle.de

Project Links:

Libraries

blog_dependent_app_attributes
blog_page_config
js/gstwebrtc_api_interop
l10n/app_localizations
l10n/app_localizations_de
l10n/app_localizations_en
main
my_two_cents_config
Pages/AboutMePage/about_me_page
Pages/AboutMePage/about_me_page_navbar_config
Pages/AboutMePage/Widgets/about_me_table
Pages/AboutMePage/Widgets/donation
Pages/AboutMePage/Widgets/perfect_day_chart
Pages/AboutMePage/Widgets/skill_table
Pages/AboutMePage/Widgets/sqlite3_healthcheck_widget
Pages/Blog/blog_page
Pages/blog_dependent_screen_configurations
Pages/DataPage/BlockOverviewPage/block_entry
Pages/DataPage/BlockOverviewPage/block_entry_list
Pages/DataPage/BlockOverviewPage/block_overview_page
Pages/DataPage/BlockOverviewPage/block_overview_page_config
Pages/DataPage/media_critics_page
Pages/ErrorPage/error_page
Pages/ErrorPage/error_page_stateful_branch_info_provider
Pages/ErrorPage/error_page_widget
Pages/Footer/Pages/configs/privacy_policy_config
Pages/Home/home_config
Pages/jotrockenmitlocken_screen_configurations
Pages/LandingPage/landing_page
Pages/LandingPage/landing_page_navbar_page_config
Pages/shared/markdown_content_page
Pages/StreamPage/rust_webcam_view
Pages/StreamPage/stream_page
Pages/StreamPage/stream_page_navbar_config
Pages/StreamPage/webrtc_view
Pages/StreamPage/webrtc_view_stub
Routing/jotrockenmitlocken_router
settings/webrtc_settings
WebRTC and video streaming configuration settings.
utils/locale_utils