UNET segmentation model trained to detect and plot carotid artery on recorded ultrasound images
Table of Contents
The Common Carotid Artery Ultrasound dataset consists of aquistified ultrasound images of the common carotid artery. The images were taken from a Mindary UMT-500Plus ultrasound machine with an L13-3s linear probe. The study group consisted of 11 subjects, with each person examined at least once on the left and right sides. 2 subjects were examined using the vascular modality and 8 using the carotid modality. Time series (DICOM) were converted to png files and cropped appropriately. Each person had 100 images, making a total of 1100 images. The dataset also includes corresponding expert masks (corresponding file name) made by a technician and verified by an expert. The collection can be used for carotid artery segmentation and geometry measurement and evaluation.
Example Ultrasound Images and associated masks from dataset:
U-Net is a is a semantic segmentation technique originally proposed for medical imaging segmentation. The architecture contains two paths. First path is the contraction path (encoder) which is used to capture the context in the image. The encoder is just a traditional stack of convolutional and max pooling layers. The second path is the symmetric expanding path (decoder) which is used to enable precise localization using transposed convolutions.
Model scoring is conducted via dice loss, quantifying overlap of predicted and ground-truth masks. See Sudre et al, 2017 for details on generalized dice overlap for image segmentation.
Mean baseline model dice loss score on test set data: 0.0235
Dice score can be calculated via carotidSegmentation.plot_pred(image, label=True)
for any image having an associated label, as per image above.
Download the dataset and move the unzipped folder to /data
With conda installed, create and activate environment with the following bash commands:
>>> conda env create -f environment.yml
>>> conda activate py310
python train.py
-
Create a new
.yaml
config file like this one and add toconfig/
-
Run the following command, specifying your model name as stored in above
.yaml
python train.py --model your_model_name
model = carotidSegmentation()
image = 'file/path/to/image.png'
model.plot_pred(image)