In this repository we implement CIB-EfficientNet (Concise Information in Bottleneck EfficientNet). CIB is method used to increase explainability presented in this Bachelor's Thesis (TBA).
This repo presents this structure:
model/
loss.py
metric.py
model.py
notebooks/
attributions.ipynb
plotter.ipynb
data_loader/
data_loaders.py
train.py
test.py
config.json
- Python 3.9+
- CUDA-compatible GPU (recommended)
- Conda package manager
- Clone the repository:
git clone https://github.com/SH02-tech/CIB-EfficientNet.git
cd CIB-EfficientNet- Create and activate the conda environment:
conda env create -f environment.yml
conda activate fcrp- Verify the installation:
python -c "import torch; print(torch.cuda.is_available())"To train the model, use the training script with a configuration file:
python train.py --config config_prostate.jsonAvailable configuration files:
config_prostate.json- Full prostate dataset configurationconfig_prostate_reduced.json- Reduced prostate dataset configurationconfig_prostate_xmi.json- XMI prostate dataset configurationconfig_prostate_xmi_reduced.json- Reduced XMI prostate dataset configuration
To evaluate the trained model:
python test.py --config config_prostate.json --resume path/to/checkpoint.pthThe project includes several Jupyter notebooks for analysis and visualization:
attributions.ipynb- Attribution analysis and visualizationplottter.ipynb- Plotting utilities and visualizationstest_results_helper.ipynb- Helper functions for test result analysistest_results.ipynb- Test results analysis and visualization
The configuration files contain parameters for:
- Model architecture settings
- Training hyperparameters
- Dataset paths and preprocessing options
- Logging and checkpoint settings
The project expects data to be organized according to the splits defined in data_split/:
train.txt/train_reduced.txt- Training set file listsval.txt/val_reduced.txt- Validation set file liststest.txt/test_reduced.txt- Test set file listsclasses.txt- Class labels definition
Utility scripts are available in the scripts/ directory:
train.sh- Training script wrappertest.sh- Testing script wrappercreate_sets_files.sh- Data split creation utilitytensorboard_last_n.sh- TensorBoard logging utility
This project is licensed under the terms specified in the LICENSE file.
Contributions are welcome! Please feel free to submit a Pull Request.