’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). [![Covid][1]][1] 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. [![Result][2]][2] 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? [1]: https://i.sstatic.net/HTDgc.jpg [2]: https://i.sstatic.net/sPRtJ.jpg