It is federated framework for the segmentation task, which uses novel loss and aggregation strategies.
This project implements a 3D U-Net model for medical image segmentation using TensorFlow and the segmentation_models_3D
library. The project is structured into multiple modules for better maintainability and readability.
data_loader.py
: Contains theDataLoader
class for loading and preprocessing the dataset.model.py
: Contains theUNET3D
class for defining the 3D U-Net model.train.py
: Contains theTrainer
class for training and evaluating the model.utils.py
: Contains utility functions for metrics and loss calculations.main.py
: The main script to run the training process.
- Python 3.6+
- TensorFlow 2.x
- segmentation_models_3D
- numpy
- tqdm
You can install the required packages using the following command:
pip install -r requirements.txt
-
Clone the repository:
https://github.com/SUNNY11286/SAFCF-federated-contrastive-segmentation-framework.git
-
Run the training script:
python app.py
- DataLoader: Modify
data_loader.py
to change how data is loaded and preprocessed. - Model: Modify
model.py
to change the architecture of the 3D U-Net model. - Training: Modify
train.py
to change the training process, including the loss function, metrics, and training loop.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.