semantic segmantation outputs only one class

조회 수: 2 (최근 30일)
Marius Bledea
Marius Bledea 2020년 4월 25일
댓글: Ryan Comeau 2020년 5월 19일
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.

채택된 답변

Ryan Comeau
Ryan Comeau 2020년 5월 10일
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
Marius Bledea
Marius Bledea 2020년 5월 19일
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 2020년 5월 19일
Excellent, nice work.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Sai Bhargav Avula
Sai Bhargav Avula 2020년 5월 14일
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!

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by