I have 2D images of black balls and white inter-balls spaces. I want a CNN to recognise the white area. I think it's a grayscale binary image segmentation task
2 views (last 30 days)
Show older comments
I have attached one of the image. It's all almost the same. I think that you will find this easy but I really don't have a background in coding
5 Comments
Image Analyst
on 19 Aug 2023
I can see you needing a CNN if you have real world images. It looks like what you chose to upload was a synthetically created image, that like @DGM said, has already been segmented to find the white areas. If you have some other porosity method obtained by some other method (like air or liquid diffusion or however) then you can use deep learning to do a regression to take the gray scale image and try to predict the porosity. Please post the actual image, not this simplified already-binary one.
help trainNetwork
Accepted Answer
Image Analyst
on 20 Aug 2023
Moved: Image Analyst
on 20 Aug 2023
Training with synthetic images and then running on real world images will likely produce inaccurate segmentations and porosity estimates. The most accurate way to count the white pixels is to simply do numWhite = sum(mask, 'all'). If you use deep learning we don't know what it will do. Will it learn to simply threshold and then sum? Or will it do a bunch of convolutions which will blur and downsample your images making them less accurate? For that reason I'd train on the actual images you plan to use, not synthetic ones. To see how to train a network, see the button callback function called btnStartTraining_Callback in the attached m-file
5 Comments
Image Analyst
on 21 Aug 2023
No. With regression you don't need to label or segment the images. You only need to provide the known, measured porosity of the material the image came from. Labeling wouldn't make sense since you're not trying to find non-porous pixels (segment the image) or classify the image into a small discrete number of porosity classes (like none, low, medium, and high porosity).
More Answers (0)
See Also
Categories
Find more on Image Data Workflows in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!