Skip to content

Augmentations

Adam Tupper edited this page Jan 15, 2025 · 4 revisions

Depth Attenuation

The depth attenuation augmentation proposed by Østvik et al. (2021) is designed to mimic the loss of energy of the ultrasound wave energy as it moves through the body, which results in a gradual drop in intensity with distance from the probe. In Østvik et al. (2021), this is implemented as applying a "varying degree of intensity attenuation along the radial direction". Guided by the visualizations of the attenuation maps in their paper, and knowing that the intensity of the wave should decrease exponentially with distance, we implement the augmentation as follows.

Assuming the ultrasound fan is oriented such that the probe is positioned at the middle-top of the image, we create an attenuation map that is used to scale the intensity of each pixel of the ultrasound scan mask $S$ in the original image $I$, as illustrated in the figure below.

An example of the depth attenuation augmentation.

The resulting image $I'$ is given by

$$ I'(x, y) = A(x, y) \odot S(x, y) \odot I(x, y) $$

The attenuation map $A$ is calculated as

$$ A(x, y) = (1 - \lambda)e^{-\mu d} + \lambda $$

where $d = \sqrt{(x - 0.5)^2 + y^2}$. The maximum attenuation $\lambda$ and attenuation rate $\mu$ are configurable parameters. By default, $\lambda$ is set to 0 and to generate variation $\mu$ is sampled uniformly from the range $[0, 3)$. The attenuation rates for different absorption coefficients are shown below.

Exponential decay rates for different absorption coefficients.

Gaussian Shadow

To mimic acoustic shadows that occur air or tissue blocks acoustic waves from penetrating deeper, the Gaussian shadow augmentation proposed by Smistad et al. (2018) generates and applies two-dimensional Gaussian shadows with randomly selected parameters. The shadow centre ($\mu_x$, $\mu_y$) is randomly positioned in the image, while its dimensions ($\sigma_x$, $\sigma_y$) are sampled uniformly between 0.1 and 0.4 of the image size. This upper limit is lower than the 0.9 used in the original formulation, where the augmentation was used on rectangular linear probe images, rather than fan-shaped convex probe images. The shadow strength $s$ is sampled uniformly between 0.25 and 0.8. The Gaussian shadow image $G$ is then calculated as

$$ G(x, y) = 1 - s\exp \left(-\frac{(x - \mu_x)^2}{2\sigma_x^2} - \frac{(y - \mu_y)^2}{2\sigma_y^2}\right) $$

Finally, the augmented image $I'$ is generating by the pixel-wise multiplication of $G$, the ultrasound scan mask $S$, and the original image $I$:

$$ I'(x, y) = I(x,y) \odot S(x, y) \odot G(x, y) $$

An example of a Gaussian shadow is shown below.

An example of the Gaussian shadow augmentation.

Haze Artifact

Acoustic haze is a semi-static noise band that is sometimes present in ultrasound images. To mimic this, Østvik et al. (2021) proposed a haze artifact augmentation that applies static with a Gaussian profile at a fixed distance (radius) from the probe. Guided by their illustrations, we implement this augmentation by generating a haze image $H$ that is added to the pixels that lie within the ultrasound scan mask $S$ in the original image $I$.

For a given haze radius $r$ and standard deviation $\sigma$ that controls the spread of the noise, the haze image $H$ is calculated as

$$ H(x, y) = \frac{1}{2}u\exp(-\frac{(d - r)^2}{2\sigma^2}) $$

where $d = \sqrt{(x - 0.5)^2 + y^2}$ and $u \sim U(0, 1)$. This results in an image similar to the one shown below. By default, $r \sim U(0.05, 0.95)$ and $\sigma \sim U(0, 0.1)$.

An example of the haze artifact augmentation.

Speckle Reduction

Speckle noise is caused by interference between ultrasound waves. The speckle pattern observed in images captured using machines from different vendors often differs due to image enhancement and various filtering methods. As described in Østvik et al. (2021) we apply a bilateral filter with randomly sampled parameter values to reduce the effect of these speckle patterns. We use the bilateral filter implementation from scikit-image. The $\sigma_\text{spatial}$ and $\sigma_\text{color}$ are sampled uniformly from the ranges $[0.1, 2.0)$ and $[0, 1)$, respectively. An example of this augmentation is shown below.

An example of the speckle reduction augmentation.

Clone this wiki locally