Show HN:用於處理 Apple Core ML 模型之命令列介面
一個針對 macOS 的新命令列介面 (CLI) 工具,讓開發者無需 Xcode 或 Python 即可檢查、執行推論、基準測試和管理 Apple Core ML 模型。該工具提供批次處理、效能測量和模型編譯等功能。
Navigation Menu
Search code, repositories, users, issues, pull requests...
Provide feedback
We read every piece of feedback, and take your input very seriously.
Saved searches
Use saved searches to filter your results more quickly
To see all available qualifiers, see our documentation.
A native command-line interface for working with Apple Core ML models on macOS
License
schappim/coreml-cli
Folders and files
Latest commit
History
Repository files navigation
coreml-cli
A native command-line interface for working with Apple Core ML models on macOS. Inspect, run inference, benchmark, and manage Core ML models without Xcode or Python.
Features
Installation
Homebrew (Recommended)
Download Binary
Download the latest release from GitHub Releases:
Build from Source
Requires macOS 13+ and Swift 5.9+
Verify Installation
Usage
Inspect a Model
View model structure, inputs, outputs, and metadata:
Output:
JSON output for scripting:
Run Inference
Classify an image:
Output:
Save results to file:
Select compute device:
Batch Processing
Process a directory of images:
Output:
Control concurrency:
Benchmark Performance
Measure inference latency:
Output:
Custom iterations:
JSON output for CI/CD:
Compile Models
Compile .mlmodel to optimized .mlmodelc:
Output:
With validation:
View Metadata
Get model metadata:
Output:
Command Reference
Global Options
Supported Input Types
Examples
Image Classification Pipeline
Performance Comparison
CI/CD Integration
JSON Tensor Input
For models that accept numeric tensor inputs (not images), you can pass JSON arrays:
Create a JSON input file (input.json):
Run prediction:
Output:
Batch process multiple JSON files:
Output CSV (json_results/results.csv):
This is useful for models trained on tabular data, embeddings, or any non-image numeric inputs.
Requirements
License
MIT License - see LICENSE for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Acknowledgments
About
A native command-line interface for working with Apple Core ML models on macOS
Resources
License
Uh oh!
There was an error while loading. Please reload this page.
Stars
Watchers
Forks
Releases
1
Packages
0
Uh oh!
There was an error while loading. Please reload this page.
Languages
Footer
Footer navigation
相關文章