As a first step for training neural network for ULM (Ultrasound Localization Microscopy ), we trained a neural network for a simplified problem. We assume that micro bubbles are in Gaussian shape. We generated a dataset using the Gaussian kernel in Figure 1. For computational purposes, the input images size is chosen as 32 x 32 pixels. Ground Truth image size is 64 x 64. Additionally, we have only single micro bubble in the target scene to make problem even simpler. We would like to solve the simplest case first then move to complicated cases gradually.
Dataset generation: From scipy.ndimage we used gaussian_filter function in order to obtain gaussian kernel. Sigma is chosen as 3. Then dataset pairs are formed using scipy.convolve2d function. There are 250 images in the training set and there are 100 images in the test set. Let’s have some definitions to describe the process mathematically:
x: ground truth image
y: blurred image
h: gaussian kernel (sigma =3)
\[ y = h * x \]
Network Structure: Our network is based U-Net with batch normalization and drop out layer.
Training Process: Lost function is chosen as summation MSE loss and L1 loss. However, since the ground truth has one non zero pixel, it was hard to stably train the network. So we applied Gaussian blur to ground truth and the output of network before calculating the loss value.
z: output of the network
f : blur kernel(sigma = 2)
Let’s define the following:
\[ w = z * f \]
\[ v = x*f \]
Then the training lost can be expressed as follows:
\[ loss = MSEloss(w-v) + \lambda \times L1loss(z)\]
Results: From Graph 1, we can see the test loss and training lost per epoch.
From following figures, we can see that the network produces very good results. Following results are from test set.