data_folder/
├── data/ # Contains .h5 data files
├── train.list # List of training samples
├── val.list # List of validation samples
└── test.list # List of test samples
Each .h5 file in the data/ folder contains two keys:
image— the input image arraylabel— the corresponding segmentation mask array
Example of how data is loaded:
case = self.sample_list[idx]
if self.split == "train":
h5f = h5py.File(self._base_dir + "/data/{}".format(case), 'r')
else:
h5f = h5py.File(self._base_dir + "/data/{}".format(case), 'r')
image = h5f['image'][:]
label = h5f['label'][:]The project includes multiple paired training and testing scripts. Configuration parameters can be modified directly inside each script.
| Script | Description |
|---|---|
train_BCP.py |
Training script for BCP method |
test_BCP.py |
Testing script for BCP method |
Note: Additional
train_*.py/test_*.pypairs may be available for other methods. Follow the same pattern to run them.
python train_BCP.pypython test_BCP.pyAll hyperparameters and settings (e.g., dataset path, number of epochs, batch size, learning rate) can be configured by editing the config section at the top of each script before running.