’mI’m currently working on covid detection project using x-rays. I applied K -means clustering algorithm (https://www.kaggle.com/code/naim99/image-classification-clustering-step-by-step?scriptVersionId=48171200) used in this link, on x-ray image (The following is the image result).
However, while training a machine learning classifier (RandomForestClassifier) on the segmented images using k-means, the classifier performs a bit worse (performance result in below image on segmented images with accuracy= 0.889… on the left, performance on unsegmented images with accuracy = 0.9..image on the right.
Could an image segmentation technique make the prediction worse? Or does it mean that the segmentation technique of k-means isn't efficient on image x-rays and i should try another way?