This repository contains code and models to segment thyroid nodules in ultrasound images. Dataset used: Open-CAS Ultrasound Dataset
The main code is written as a Python package named ‘tnseg’. After cloning this repository to your machine, install with:
cd cloned/path
pip install .
You should then be able to use the package in Python:
import matplotlib.pyplot as plt
from tnseg import dataset, models, loss, opts, evaluate
Scripts for model training and evaluation are located under /scripts/.
python -u scripts/train.py config_files/defaults.config
On running the model, the outputs are saved in the outputs/ folder, in a folder named with the experiment name (this should be specified in the config file). The outputs include the following:
Note: In this project, the dataset contains 16 folders. Due to the limited nature of the dataset, we trained 8 models (14 train and 2 validation), and obtained the validation dice coefficients of all the folders.
Note: this package is written with the Tensorflow backend in mind – (batch, height, width, channels) ordered is assumed and is not portable to Theano.
The implemented models are: