Currently The K-means CLustring code is written like this in a method:
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)
How can I save This to a model so I can convert it to Core-ML and use it in my application?
Core ML does not support K-means clustering at the moment.
You can find a simple implementation of K-means at the Swift Algorithm Club.