knn processing with preannotated images