semantic segmantation outputs only one class

2 visualizaciones (últimos 30 días)
Marius Bledea
Marius Bledea el 25 de Abr. de 2020
Comentada: Ryan Comeau el 19 de Mayo de 2020
Using the algorithm from here I try to detect polyps from pictures. Every things goes well until I try to predict an image, it doesen't matter if it's from the training set or test set, it only outputs one class (there are 2 possible cases: tissue and polyp). Any ideas what I'm missing?
These are original and the ground truth combined with the original(left).
And here is what the algorithm is giving. Basically it labels all the pixels as tissue.

Respuesta aceptada

Ryan Comeau
Ryan Comeau el 10 de Mayo de 2020
Hello,
Based on what I can see here, the semantic segmentation algorithm may not be your best choice. Maybe try using a computer vision technique which will place a bounding box around the object in your image. One of the following 2:
  1. https://www.mathworks.com/help/vision/ug/getting-started-with-yolo-v2.html
These will allow you to place bounding boxes around your regions of interest to identify what you're looking for. It will avoid having to class the various pixels in an image.
I have maybe a few ideas about how to improve your results:
  1. Lower your learning rate. The learning rate can cause your algorithm to converge too quickly on results that are not the best or in your case, since the regions of tissue are all very similar, it was unable to segment from the polyps and it determined it was getting perfect accuracy on the image from the tissue.
  2. Increase the mini batch size to 16-24 images if you have enough RAM to handle it. Coupled with the lower learning rate, this can help not falling into the trap of finding "blank" space and thinking it perfectly located what you're searching for. What i mean by this is, if your polyps look similar to tissue, the algo might class tissue as a polyp and tell you it's obtained a 100% accuracy.
  3. Augment your data to increase the data size
  4. go obtain a larger training set without augmentation.
Hope this helps,
RC
  2 comentarios
Marius Bledea
Marius Bledea el 19 de Mayo de 2020
Hi,
Thank you for all this explanations. I managed to make it work finnaly. My problem was labeling the classes and after that I had to deal with mini batch size as you were suggesting.
Ryan Comeau
Ryan Comeau el 19 de Mayo de 2020
Excellent, nice work.

Iniciar sesión para comentar.

Más respuestas (1)

Sai Bhargav Avula
Sai Bhargav Avula el 14 de Mayo de 2020
Hi,
Adding to Ryan Comeau answers, I want to add the things like
By looking at the result I think the issue might be vanishing gradients. Check for that and the loss values.
To use segmentation the data needs a bit of preprocessing for better training.
Refer the following example which is closer to your case.
Hope this help!

Productos


Versión

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by