GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jagtesh/pycoreml: CoreML inference from Python — powered by Swift & ApplePy

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
pycoreml
pycoreml
 
 
swift
swift
 
 
.DS_Store
.DS_Store
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
README.md
README.md
 
 
pyproject.toml
pyproject.toml
 
 
setup.py
setup.py
 
 

Repository files navigation

PyCoreML

CoreML inference from Python — powered by Swift & ApplePy.

Direct access to Apple's CoreML framework with explicit compute unit selection (CPU, GPU, Neural Engine).

macOS only — requires Swift 6.0+ toolchain

Install

pip install -e .

Usage

import pycoreml

# Load and describe a model
info = pycoreml.load_model("/path/to/model.mlmodelc")
desc = pycoreml.model_description("/path/to/model.mlmodelc")

# Run prediction
result = pycoreml.predict("/path/to/model.mlmodelc", {"x": 42.0})

# Predict with explicit compute unit (the killer feature)
result = pycoreml.predict_with_options(
    "/path/to/model.mlmodelc",
    {"x": 42.0},
    "cpuAndNeuralEngine"  # or "cpuOnly", "cpuAndGPU", "all"
)

API

Function Returns Description
load_model(path) str Load model and return description
model_description(path) dict[str, str] Model metadata
predict(path, inputs) dict[str, float] Run inference
list_compute_units() list[str] Available compute units
predict_with_options(path, inputs, unit) dict[str, float] Predict with compute unit control

Examples

See pycoreml/examples/demo.py for a full demo.

License

BSD-3-Clause © Jagtesh Chadha — see LICENSE.

About

CoreML inference from Python — powered by Swift & ApplePy

Resources

Readme
BSD-3-Clause license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.