MEDCNN: Multiresolution Encoder-Decoder Convolutional Neural Network
- This is a 2D version of MEDCNN and without attentions in the decoder
- Full paper with attentions: https://doi.org/10.1109/ICASSP49660.2025.10890832
Installation guide
Install TFDWT from PyPI (Option $1$)
pip install MEDCNN
Install TFDWT from Github (Option $2$)
Download the package
git clone https://github.com/kkt-ee/MEDCNN.git
Change directory to the downloaded MEDCNN
cd MEDCNN
Run the following command to install the TFDWT package
pip install .
Verify installation
import MEDCNN
MEDCNN.__version__
Sample usage
- Import MEDCNN 2D Gφψ without attention
from MEDCNN.models.G2DwithoutAttention import Gφψ, configs
- Import the control Unet2D model for reference
from MEDCNN.models.ControlUnet2D import Unet2D, uconfigs
- Import utils to compile and train model
from MEDCNN.utils.utils import elapsedtime, timestamp
from MEDCNN.utils.BoundaryAwareDiceLoss import BoundaryAwareDiceLoss
from MEDCNN.utils.Load2Ddata import load_ibsr_XY
from MEDCNN.utils.TTViterators import get_train_test_val_iterators
from MEDCNN.utils.dice import dice_coef
from MEDCNN.utils.compile1 import compile_model
from MEDCNN.utils.Train1 import train
- Example: Compile a MEDCNN
CONFIGKEY= 'minimal2'
model, segconfig = Gφψ(config=configs[CONFIGKEY], compile=False), 'nonResidual'
model, lossname = compile_model(model, dataset, dice_coef)
- Example: Compile a control Unet2D
CONFIGKEY = '45678',
model, segconfig = Unet2D(config=uconfigs['45678'], compile=False), 'nonResidual'
model, lossname = compile_model(model, dataset, dice_coef)
- Example: Train a model with X an Y of shape (7056, 256, 256, 1), (7056, 256, 256, 1)
train_iterator, test_iterator, val_iterator = get_train_test_val_iterators(X,Y) #Assuming X and Y is loaded by a dataloader
train(
model,
train_iterator, test_iterator, val_iterator,
dataset='IBSR',
segconfig=segconfig,
lossname='bce',
CONFIGKEY=CONFIGKEY,
epochs=40)
Uninstall MEDCNN
pip uninstall MEDCNN
MEDCNN (C) 2025 Kishore Kumar Tarafdar, Prime Minister's Research Fellow, EE, IIT Bombay, भारत 🇮🇳
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
medcnn-0.0.2.tar.gz
(10.0 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
medcnn-0.0.2-py3-none-any.whl
(30.3 kB
view details)
File details
Details for the file medcnn-0.0.2.tar.gz.
File metadata
- Download URL: medcnn-0.0.2.tar.gz
- Upload date:
- Size: 10.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7809475fd932435cc50b794ba32d1995c0ecf75e84970b9ef14ed9765944163e
|
|
| MD5 |
5f833655808f86c80f4be8669954873d
|
|
| BLAKE2b-256 |
5568fde83aeb91fc35bee86ba47cd1bb121f6692ba4bf5fe1b6bac4389058721
|
File details
Details for the file medcnn-0.0.2-py3-none-any.whl.
File metadata
- Download URL: medcnn-0.0.2-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e564a2bf880c8968a2e1b150d48ef17947051eb341a8a960daffa120869d007
|
|
| MD5 |
b866b1cf4a993575e8bb852bbe0ab505
|
|
| BLAKE2b-256 |
1e50884fc9ce4331e46b1689bd84fa6393f5e3edaa6e69a26f7018893fcba02c
|