Skip to content
kakashi3litePublic

About

Metal GPU β€’ On-Device AI β€’ Privacy-First🌿

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

5 Commits

Folders and files

Repository files navigation

πŸ”₯ NeuroPro 🌿

Real-time AI vision, rendered on the Metal GPU β€” 100% on-device.

SwiftUI Β· Metal 3 Β· Vision Β· Mossfire Dusk Design System

Platform Swift Metal Privacy Status License

β€œAI That Respects Privacy.” Every pixel is processed on the Neural Engine and GPU. Zero cloud, zero telemetry, zero compromise.


✨ Highlights

🎯 Object Detection Animals with bounding boxes + live scene classification chip (indoor · 87%)
🎨 Style Transfer Real-time cinematic grade via a custom Metal compute kernel
🧍 Segmentation Person silhouette isolation, rendered as a live mossfire-tinted overlay
πŸ“ Depth Estimation Honest production status β€” reports device capability, real depth mapping staged
πŸŽ›οΈ Filters Sobel Edge Detection & Preprocess (sharpening + contrast) compute shaders
⚑ Performance Mode Half-resolution render + MetalFX spatial upscaling (A12+ devices)
🌑️ Thermal Governance Frame-rate governor that watches ProcessInfo.thermalState + camera system pressure
πŸ”’ Privacy First All inference on-device β€” no network permission, no analytics, no PII

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  AVCaptureSession ── 1080p @ 60 fps ── CVMetalTextureCache (zero-copy) β”‚
β”‚        β”‚                                                              β”‚
β”‚        β”œβ”€β”€β–Ί PreviewRenderer ──► CAMetalLayer ──► Screen   (lowest latency)β”‚
β”‚        β”‚        β–²   direct draw from capture queue, no main-thread hop β”‚
β”‚        └──► NeuralProcessor (dedicated neural queue)                   β”‚
β”‚                 β”œβ”€β”€ Vision ── animals Β· scene Β· segmentation (10 Hz)   β”‚
β”‚                 └── MetalEngine ── filters Β· style Β· texture pool      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Why it's fast (verified 2026-08-05, iPhone 15 Pro / iOS 27):

Metric Value
Capture 1080p 60 FPS (explicit 60fps format selection)
Preview frame time 11.1 ms (was 17.4 ms)
GPU utilization 47 % (was 72 %)
AI pass 5.5 ms @ 10 Hz on a dedicated neural queue
Dropped frames 0

The hot path avoids per-frame allocations and GPU syncs (waitUntilCompleted) via a reusable texture pool; inference never blocks the capture queue.

flowchart LR
    CAM[AVCaptureSession<br/>1080p @ 60fps] --> MTX[CVMetalTextureCache]
    MTX --> RENDER[PreviewRenderer<br/>CAMetalLayer direct]
    RENDER --> SCREEN[Screen]
    MTX --> AI[NeuralProcessor<br/>neural queue Β· 10Hz]
    AI --> VN[Vision Β· Neural Engine<br/>animals Β· scene Β· segmentation]
    AI --> MTL[MetalEngine Β· compute<br/>edge Β· preprocess Β· style]
Loading

πŸ“¦ Core Modules

File Responsibility
NeuralVisionProApp.swift @main β€” Metal init, AppState, unbuffered console logging
ContentView.swift Full-bleed camera UI, floating glass chrome, detection overlay
MetalEngine.swift GPU engine: pipelines, shader dispatch, texture pool, MetalFX scaler
MetalShaders.metal Compute kernels (edge, preprocess, style) + aspect-fill preview fragment
NeuralProcessor.swift AI pipeline: Vision requests, 10 Hz throttle, detection hold window
CameraManager.swift AVFoundation capture, 60fps format selection, thermal/pressure governor
ThermalObserver.swift Thermal state β†’ safe frame-rate recommendation
MossfireDuskTheme.swift Mossfire Dusk design system (colors, type, spacing, motion)

πŸš€ Getting Started

Requirements β€” iPhone with A12 Bionic+, iOS 16+, Xcode 15+ (beta toolchain tested).

# 1. Build for a connected device
xcodebuild -project NeuralVisionPro.xcodeproj -scheme NeuralVisionPro \
  -destination 'id=<DEVICE_UDID>' -derivedDataPath build \
  DEVELOPMENT_TEAM=<TEAM_ID> CODE_SIGN_STYLE=Automatic \
  -allowProvisioningUpdates build

# 2. Install
xcrun devicectl device install app --device <DEVICE_UDID> \
  build/Build/Products/Debug-iphoneos/NeuralVisionPro.app

# 3. Launch
xcrun devicectl device process launch --device <DEVICE_UDID> \
  com.elite.neuralvisionpro --terminate-existing

For a free-team (personal) Apple ID, pass your team ID via DEVELOPMENT_TEAM on the command line β€” profiles are 7-day and regenerated automatically.


πŸ§ͺ Verification Workflow

Every feature can be driven live and verified on-device:

# Drive the app to a specific state (DEBUG builds only)
xcrun devicectl device process launch --device <UDID> \
  com.elite.neuralvisionpro --terminate-existing \
  -debugMode StyleTransfer -debugFilter EdgeDetection -debugMetrics on

# Stream runtime logs (camera config, frame rate, mode switches)
xcrun devicectl device process launch --device <UDID> --console \
  com.elite.neuralvisionpro

# Pull crash logs after a run
xcrun devicectl device copy from --device <UDID> --source / \
  --destination ./crashlogs --domain-type systemCrashLogs
Launch arg Values
-debugMode ObjectDetection, StyleTransfer, Segmentation, DepthEstimation
-debugFilter None, EdgeDetection, Preprocess
-debugMetrics on, off

πŸ—‚οΈ Project Structure

NeuroPro/
β”œβ”€β”€ NeuralVisionPro/
β”‚   β”œβ”€β”€ NeuralVisionProApp.swift   # App entry Β· Metal init Β· AppState
β”‚   β”œβ”€β”€ ContentView.swift          # Camera UI Β· overlays Β· detection boxes
β”‚   β”œβ”€β”€ MetalEngine.swift          # GPU engine Β· pipelines Β· texture pool
β”‚   β”œβ”€β”€ MetalShaders.metal         # Compute + preview shaders
β”‚   β”œβ”€β”€ NeuralProcessor.swift      # AI pipeline Β· Vision Β· throttling
β”‚   β”œβ”€β”€ CameraManager.swift        # Capture Β· 60fps Β· thermal/pressure
β”‚   β”œβ”€β”€ ThermalObserver.swift      # Thermal β†’ frame-rate governor
β”‚   β”œβ”€β”€ MossfireDuskTheme.swift    # Mossfire Dusk design system
β”‚   β”œβ”€β”€ Assets.xcassets            # App icon Β· colors Β· launch screen
β”‚   └── Info.plist
β”œβ”€β”€ NeuralVisionPro.xcodeproj/
β”œβ”€β”€ *.md                           # Design, build, handoff, research docs
└── project_stats.sh               # Repo stats utility

πŸ“š Documentation

Doc Purpose
ARCHITECTURE.md Technical deep-dive: shaders, threading, memory
BUILD_GUIDE.md Step-by-step build & signing guide
DEVELOPER_HANDOFF.md Phase-by-phase build-out plan + session wrap-up
BRANDING.md Mossfire Dusk brand & design language
PROJECT_SUMMARY.md Executive overview
MARKET_RESEARCH.md Market analysis & competitive landscape
UX_ENHANCEMENTS.md UX roadmap & design rationale
SECURITY.md Privacy & security posture
CHANGELOG.md Release history

πŸ—ΊοΈ Roadmap

  • Phase 0–2 β€” Clean build, device deployment, crash-free operation, performance (60 fps / 11 ms)
  • Detection β€” Animal boxes, scene classification, confidence thresholds, anti-flicker hold
  • UX β€” Full-bleed feed, floating glass chrome, mode toasts, dismissible HUD
  • Onboarding β€” 3-screen tutorial, gesture navigation, contextual hints
  • General object detection β€” bundled Core ML model (cars, chairs, …) β€” staged, model intentionally not added to keep the app lean
  • Real depth mapping β€” LiDAR/dual-camera depth stream
  • App Store β€” paid Developer Program, privacy manifest, iconography

🀝 Contributing

Proprietary portfolio/investment project. Technical questions via Issues; partnership inquiries through GitHub.

πŸ“„ License

Proprietary β€” Β© 2025–2026. All rights reserved. Mossfire Dusk color palette is open for community use.

πŸ™ Acknowledgments

Apple (Metal Β· Core ML Β· Vision), the OpenCV/Vision research community, and the warm glow of a moss-forest sunset at dusk.

Built with πŸ”₯ Metal Β· 🌿 SwiftUI Β· πŸŒ‘ Mossfire Dusk

GitHub Β· @kakashi3lite

Made with πŸ”₯ and 🌿

Elite iOS β€’ Metal GPU β€’ On-Device AI β€’ Privacy-First

About

Metal GPU β€’ On-Device AI β€’ Privacy-First🌿

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages