Answers.Body: <p><strong>&quot;Could an image segmentation technique make the prediction worse?&quot;</strong></p>
  <p>Yes, it is entirely possible that a classifier trained on the segmented image performs worse than a classifier trained on unsegmented images.  One possible reason is that there is information elsewhere in the image that was revealing of COVID status that is removed in the segmented image.  For example, it has been suggested that COVID has impact on more than just the lungs.  Second, the two models that you are training are different, and they can absolutely have different performances.  Finally, it is worth noting that the differences that you are seeing are small and may be within a margin of error.  In other words, by sampling a different batch of images, you may see a reversal in the ranking of model performances.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-04T04:28:30.073Z
Answers.LastActivityDate: 2022-11-04T04:28:30.073Z
Answers.UserDisplayName: Snehal Patel
Body: <p>I’m currently working on covid detection project using x-rays. I applied K -means clustering algorithm (<a href="https://www.kaggle.com/code/naim99/image-classification-clustering-step-by-step?scriptVersionId=48171200" rel="nofollow noreferrer">https://www.kaggle.com/code/naim99/image-classification-clustering-step-by-step?scriptVersionId=48171200</a>) used in this link, on x-ray image (The following is the image result).</p>
  <p><a href="https://i.sstatic.net/HTDgc.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/HTDgc.jpg" alt="Covid" /></a></p>
  <p>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.</p>
  <p><a href="https://i.sstatic.net/sPRtJ.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/sPRtJ.jpg" alt="Result" /></a></p>
  <p>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?</p>
  
Tags: <machine-learning><computer-vision><image-processing><image-segmentation><clustering>
Title: Segmentation of x-ray images to detect Covid-19
UserDisplayName: S i
ThreadText: # Segmentation of x-ray images to detect Covid-19
  
  (Asked by: username_0 on 2022-11-03)
  
  I’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](https://i.sstatic.net/HTDgc.jpg)](https://i.sstatic.net/HTDgc.jpg)
  
  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](https://i.sstatic.net/sPRtJ.jpg)](https://i.sstatic.net/sPRtJ.jpg)
  
  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?
  
  **Tags:** machine-learning, computer-vision, image-processing, image-segmentation, clustering
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-11-04. Score: 1
  
  **"Could an image segmentation technique make the prediction worse?"**
  
  Yes, it is entirely possible that a classifier trained on the segmented image performs worse than a classifier trained on unsegmented images. One possible reason is that there is information elsewhere in the image that was revealing of COVID status that is removed in the segmented image. For example, it has been suggested that COVID has impact on more than just the lungs. Second, the two models that you are training are different, and they can absolutely have different performances. Finally, it is worth noting that the differences that you are seeing are small and may be within a margin of error. In other words, by sampling a different batch of images, you may see a reversal in the ranking of model performances.
  
  
  ---
  
  