Views
No views yet
add_mosaic.mlmodel - 用於為圖片/影片添加馬賽克clean_mosaic_HD.mlmodel - 用於去除馬賽克 (HD 高清版)clean_mosaic_video.mlmodel - 用於去除影片中的馬賽克.mlmodel or .mlpackage file from the Files and versions tab.1import CoreML
2import Vision
3
4// 1. 初始化模型 (請替換成你的模型名稱)
5let model = try! clean_mosaic_HD(configuration: MLModelConfiguration())
6
7// 2. 準備輸入 (請根據你的模型實際的輸入規格修改)
8// 例如,如果模型吃的是 CVPixelBuffer:
9// let input = clean_mosaic_HDInput(inputImage: pixelBuffer)
10
11// 3. 執行推論
12// let output = try! model.prediction(input: input)
13
14// 4. 取得結果
15// let resultImage = output.outputImageNote: Please refer to Xcode's CoreML model inspector to see the exact expected input and output shapes (e.g., Image size or MultiArray dimensions).