Dan*_*Dan 2 python cluster-analysis machine-learning scikit-learn coreml
目前 K-means CLustring 代码在方法中是这样写的:
def predict(image_path):
image = cv2.imread(image_path)
image = image.reshape((image.shape[0] * image.shape[1], 3))
clt = KMeans(n_clusters = 3, random_state=2, n_jobs=1)
clt.fit(image)
Run Code Online (Sandbox Code Playgroud)
如何将其保存到模型中,以便将其转换为 Core-ML 并在我的应用程序中使用它?
归档时间: |
|
查看次数: |
5305 次 |
最近记录: |