Question 1: Short answer
easyAI-checkedClusteringK-Means can serve as a dimensionality-reduction step before a classifier. What does the last line print?
import numpy as np
from sklearn.cluster import KMeans
X = np.random.default_rng(0).random((400, 64)) # 400 images, 64 pixels each
kmeans = KMeans(n_clusters=50, n_init=1, random_state=0).fit(X)
print(kmeans.transform(X).shape)