Obtaining Probability Map from Trained Network

4 次查看(过去 30 天)
Hi,
Is there a way to obtain a probability map from a trained neural network in matlab? I have saved the trained network variable but I wanted to see what the probability map looks like.
The network was trained to identify bone and background pixels from ultrasound data so it should contain a probability map of where the bone surface (pixel value of 1) is most likely found.

采纳的回答

Raunak Gupta
Raunak Gupta 2019-11-22
Hi,
In my understanding while doing identification of pixels from ultrasound data you may be doing semantic segmentation of a 2D image or 3D Volume. So, I assume you may be using segnetLayers or unetLayers for 2D images or unet3dLayers for 3D volumes for achieving the same. The second last layer in each of the Network is the softmax layer which return a probability of the specific class. So, lets say we have 2 classes in above case then for every pixel in image or volume there will be a vector with 2 values corresponding to the probability of class-1 and class-2.
For getting these probabilities you may use activations to get the output for specific image with layer name mentioned to be the softmax layer name in any of above-mentioned Networks. Then you may plot the probability map for each class separately using imshow or any other visualization method. Here by using imshow, grayscale image will be generated for each class where bright area represents higher probability of that respective class.
Note that for using unet3dLayers, MATLAB R2019b with Deep Learning Toolbox is required.
Hope this helps.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by