This tutorial describes how to use patch-based kmeans clustering to train a model and classify pixels in a target image. It also includes a step to group clusters by membership in a user-specified set of categories (like tissue type, plant structure, plant vs. background, etc.), and make combined binary masks for each category.
Kmeans, train, patch, classify, combine, mask, tutorial