A tutorial on setting up SeqSeg for medical image segmentation
The first step in using SeqSeg is to preprocess your data.
We require the following data:
images truths centerlines .vtp filesA few things to note:
SeqSeg/centerlines.py script, or use VMTK or other tools .vtp fileParaview The next step is to preprocess the data for training. SeqSeg requires a model trained on local patches, so we need to extract patches from the images and masks based on centerlines.
The repository for this is BloodVesselML3D and the script is gather_sampling_data_parallel.py. This requires the following arguments:
config - the configuration file for the dataset, which you must change to match your dataNext, we must change the naming structure to match nnU-Net. This is done with the dataset_dirs/create_nnunet.py script. The new data can be output anywhere, but we recommend directly into the nnU-Net Raw directory.
The next step is to train the model. This is done with the specific nnU-Net commands, which are detailed in the nnU-Net repository.
This requires two commands (see documentation for more details):
prepocessing commandtrain commandYou can train:
The final step is to run SeqSeg inference on new data. This is done with the SeqSeg/seqseg.py script. You need direct access to the directory containing the images and seed points, and another containing the trained model weights.
Here are some more articles you might like to read next: