Skip to main content

pyMEAL: Multi-Encoder-Augmentation-Aware-Learning

Project description

pyMEAL: Multi-Encoder-Augmentation-Aware-Learning

pyMEAL is a multi-encoder framework for augmentation-aware learning that accurately performs CT-to-T1-weighted MRI translation under diverse augmentations. It utilizes four dedicated encoders and three fusion strategies, concatenation (CC), fusion layer (FL), and controller block (BD), to capture augmentation-specific features. MEAL-BD outperforms conventional augmentation methods, achieving SSIM > 0.83 and PSNR > 25 dB in CT-to-T1w translation.

Model Architecture Overview

Image

Fig. 1:Model architecture for the model having no augmentation and traditional augmentation

Image

Fig. 2: Model architecture for Multi-Stream with a Builder Controller block method (BD), Fusion layer (FL) and Encoder concatenation (CC)

Dependecies

tensorflow

matplotlib

SimpleITK

scipy

antspyx

Available Models

Model ID File Name Description
BD builder1_mode1l1abW512_1_11211z1p1rt_.h5 Builder-based architecture model
CC best_moderRl_RHID2_1mo.h5 Encoder-concatenation-based configuration
FL bestac22_mode3l_512m2_m21.h5 Feature-level fusion-based model
NA direct7_11ag23f11.h5 Direct training baseline model
TA best_modelaf2ndab7_221ag12g11.h5 traditional augmentation configuration model

Download Model Files

You can download any .h5 file directly:

or alternatively, you can use the following Python script to downlaod all the models from Huggingface.

from huggingface_hub import hf_hub_download
import tensorflow as tf

my_folder = "./my_models"  # or any path you want

model_path = hf_hub_download(
    repo_id="AI-vBRAIN/pyMEAL",
    filename="builder1_mode1l1abW512_1_11211z1p1rt_.h5",  # or any other desired model in our Huggingface.
    repo_type="model",
    cache_dir=my_folder
)

# Load the model from that path
model = tf.keras.models.load_model(model_path, compile=False)
# Run inference
output = model.predict(input_data)

Here, input_data refers to a CT image, and the corresponding T1-weighted (T1w) image is predicted as the output.

For detailed instructions on how to use each module of the pyMEAL software, please refer to the tutorial section on our GitHub repository.

Finally, create and activate a virtual environment, then install pyMEAL.

conda create -n pyMEAL python=3.9
conda activate pyMEAL
pip install pyMEAL

How to get support?

For help, contact:

Dr. Ilyas (amoiIyas@hkcoche.org) or Dr. Maradesa (amaradesa@hkcoche.org)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymeal-1.0.2.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymeal-1.0.2-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file pymeal-1.0.2.tar.gz.

File metadata

  • Download URL: pymeal-1.0.2.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pymeal-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d03be43a51842baee77a2d185e05dec8ae1f75b27d50ddedf96fccc951ee8543
MD5 616301d8ffce0e9399ad7331340fad0e
BLAKE2b-256 877639023d26d443ce55d52f10a3865254e795cd6a5fd87c8f99f69375da7033

See more details on using hashes here.

File details

Details for the file pymeal-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pymeal-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 27.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pymeal-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9fae31c14b001d597cf3752470973f59c469fa9b91219a93184ca9d2353b5c96
MD5 928041b2123356ac2aa7f8c9af5b97ed
BLAKE2b-256 2a8f77bfba636b16fb37e5895eb4c627a8303ea033401f2da18792d66ebfed52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page