DeepMosaics - CoreML Version
This repository contains the Apple CoreML conversions of the pre-trained models from the original DeepMosaics project by HypoX64.
DeepMosaics is a powerful tool for automatic video and image processing. By converting these models to CoreML, iOS and macOS developers can easily integrate these capabilities directly into their Apple ecosystem applications, taking full advantage of on-device hardware acceleration (Apple Neural Engine and GPU).
📦 Available Models
add_mosaic.mlmodel- 用於為圖片/影片添加馬賽克clean_mosaic_HD.mlmodel- 用於去除馬賽克 (HD 高清版)clean_mosaic_video.mlmodel- 用於去除影片中的馬賽克
🚀 How to Use (Swift)
- Download the desired
.mlmodelor.mlpackagefile from the Files and versions tab. - Drag and drop the file into your Xcode project.
- Xcode will automatically generate the Swift class for the model.
- Use it in your code:
import CoreML
import Vision
// 1. 初始化模型 (請替換成你的模型名稱)
let model = try! clean_mosaic_HD(configuration: MLModelConfiguration())
// 2. 準備輸入 (請根據你的模型實際的輸入規格修改)
// 例如,如果模型吃的是 CVPixelBuffer:
// let input = clean_mosaic_HDInput(inputImage: pixelBuffer)
// 3. 執行推論
// let output = try! model.prediction(input: input)
// 4. 取得結果
// let resultImage = output.outputImage
Note: Please refer to Xcode's CoreML model inspector to see the exact expected input and output shapes (e.g., Image size or MultiArray dimensions).
⚖️ Acknowledgements & License
- Original Project: HypoX64/DeepMosaics
- All credit for the original architecture and pre-trained weights goes to the original authors.
- The models are provided under the same license as the original project.