Skip to content
tropikandyPublic

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

29 Commits

Folders and files

Repository files navigation

CoreMLWin - Universal ML Runtime for Windows

๐Ÿš€ Apple CoreML-like experience for Windows with DirectML GPU acceleration

License: MIT Windows ONNX Runtime DirectML


โœจ Features

  • ๐ŸŽฏ Universal ML Inference - Run ONNX, PyTorch, TensorFlow models on Windows
  • โšก GPU Acceleration - DirectML support for NVIDIA, AMD, and Intel GPUs
  • ๐Ÿ”„ Automatic Fallback - CPU execution when GPU unavailable
  • ๐Ÿ Python SDK - Easy-to-use client library
  • ๐Ÿ›ก๏ธ Production Ready - Security hardened, red-team tested
  • ๐Ÿ”Œ Simple Integration - Drop-in replacement for CoreML on Windows

๐Ÿ“ฆ Installation

Option 1: Winget (Recommended)

winget install CoreMLWin.UniversalMLRuntime

Option 2: MSI Installer

Download from Releases and run:

msiexec /i CoreMLWin-0.1.0-x64.msi

Option 3: Portable (No Installation)

Download ZIP from Releases, extract, and run:

.\start-service.bat

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Your Application                         โ”‚
โ”‚                  (Python, C++, etc.)                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                      โ”‚
                      โ”‚ Client Library
                      โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              CoreMLWin Runtime Service                      โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚            Named Pipe IPC Server                    โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                         โ”‚                                   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚          Model Registry & Manager                   โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚                         โ”‚                                   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚           ONNX Runtime Executor                     โ”‚   โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚   โ”‚
โ”‚  โ”‚  โ”‚ DirectML    โ”‚  โ”‚     CPU     โ”‚  โ”‚   CUDA    โ”‚  โ”‚   โ”‚
โ”‚  โ”‚  โ”‚   (GPU)     โ”‚  โ”‚  Provider   โ”‚  โ”‚ Provider  โ”‚  โ”‚   โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
                         โ–ผ
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚   GPU / CPU          โ”‚
              โ”‚   Hardware           โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

1. Install Python SDK

pip install coremlwin

2. Start Service (if using portable)

coremlwin-service

3. Run Inference

from coremlwin_client import CoreMLWinClient
import numpy as np

# Connect to runtime
client = CoreMLWinClient()

# Check service health
print(client.health())

# Register a model
model_id = client.register_model("path/to/model.onnx")

# Prepare input
input_data = {
    "input": np.random.randn(1, 3, 224, 224).astype(np.float32)
}

# Run inference
output = client.run_inference(model_id, input_data)
print(output)

๐Ÿ’ก Use Cases

  • ๐Ÿ–ผ๏ธ Computer Vision - Image classification, object detection, segmentation
  • ๐Ÿ“ NLP - Text classification, sentiment analysis, translation
  • ๐ŸŽต Audio Processing - Speech recognition, audio classification
  • ๐ŸŽฎ Gaming - Real-time ML inference in games
  • ๐Ÿข Enterprise - Production ML deployments on Windows servers

๐Ÿ“‹ Requirements

Minimum

  • Windows 10 version 1903 (build 18362) or newer
  • Visual C++ Redistributable 2022
  • Python 3.8+ (for Python SDK)

Recommended

  • Windows 11
  • DirectX 12 capable GPU (NVIDIA, AMD, or Intel)
  • Latest GPU drivers
  • 8GB+ RAM

๐Ÿ”ง Building from Source

Prerequisites

  • CMake 3.15+
  • Visual Studio 2019/2022
  • ONNX Runtime 1.16.3
  • Python 3.8+

Build Steps

# 1. Clone repository
git clone https://github.com/tropikandy/WinCoreML.git
cd WinCoreML

# 2. Download ONNX Runtime
$version = "1.16.3"
Invoke-WebRequest -Uri "https://github.com/microsoft/onnxruntime/releases/download/v$version/onnxruntime-win-x64-gpu-$version.zip" -OutFile "onnxruntime.zip"
Expand-Archive -Path "onnxruntime.zip" -DestinationPath "."
$env:ONNXRUNTIME_DIR = (Get-ChildItem -Directory -Filter "onnxruntime-win-*").FullName

# 3. Configure with CMake
cmake -B build -DCMAKE_BUILD_TYPE=Release -DONNXRUNTIME_DIR=$env:ONNXRUNTIME_DIR

# 4. Build
cmake --build build --config Release --parallel

# 5. Run tests
pytest tests/test_integration.py -v

๐Ÿ“ฆ Distribution

For Developers

See RELEASE_CHECKLIST.md for release process.

One-command release:

.\tools\release.ps1 -Version 0.1.0

This will:

  • Run tests
  • Build MSI and portable packages
  • Create git tag
  • Trigger GitHub Actions
  • Auto-publish GitHub Release

For End Users

Multiple installation options available:

Method Command Best For
Winget winget install CoreMLWin.UniversalMLRuntime Most users
Chocolatey choco install coremlwin IT admins
MSI Download from releases Enterprise
Portable Extract and run No admin rights

See docs/INSTALLATION.md for details.


๐Ÿ›ก๏ธ Security

CoreMLWin has been thoroughly security tested:

  • โœ… Red team audited - Comprehensive penetration testing
  • โœ… All P0 critical fixes applied - Zero known critical vulnerabilities
  • โœ… Input validation - Protection against buffer overflows, path traversal
  • โœ… Secure hashing - SHA-256 content-based model identification
  • โœ… 35+ security tests - Full test coverage for security features

See docs/RED_TEAM_AUDIT.md for the full security audit report.


๐Ÿ“š Documentation


๐Ÿงช Testing

Run All Tests

# Start service
start build\bin\Release\coremlwin_service.exe

# Run integration tests
pytest tests/test_integration.py -v

# Run security tests
pytest tests/test_security.py -v

# Run C++ security unit tests
.\tests\test_security_utils.exe

Test Coverage

  • โœ… Integration Tests - End-to-end workflows
  • โœ… Security Tests - Adversarial testing
  • โœ… Performance Tests - Latency benchmarks
  • โœ… Concurrency Tests - Thread safety
  • โœ… C++ Unit Tests - Security utilities (35 tests)

๐Ÿ“Š Performance

Latency Benchmarks (ResNet50, 224x224 input):

Provider Latency Throughput
DirectML (RTX 3080) ~5ms 200 FPS
CPU (Intel i9) ~45ms 22 FPS

Service Overhead: <100ms health check latency


๐Ÿ—บ๏ธ Roadmap

v0.2.0

  • Model caching with LRU eviction
  • Shared memory transport for zero-copy
  • Connection pooling
  • Google Test C++ unit testing framework

v0.3.0

  • WebSocket API support
  • REST API endpoint
  • Model versioning
  • A/B testing support

v1.0.0

  • Microsoft Store distribution
  • GUI management tool
  • Performance profiler
  • Model optimization tools

๐Ÿค Contributing

Contributions are welcome! Please:

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

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments


๐Ÿ’ป Development & Disclaimer

CoreMLWin was developed using modern AI-assisted development practices. Architecture and design decisions by Andreas Larsson; implementation assisted by AI language models. All code has been reviewed, tested, and validated for production use.

Not affiliated with Apple Inc. CoreML is a trademark of Apple Inc.


๐Ÿ“ž Support


๐ŸŒŸ Star History

If you find CoreMLWin useful, please consider giving it a star โญ


Made with โค๏ธ for the Windows ML community

GitHub โ€ข Install โ€ข Download โ€ข Report Bug

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages