RichardObi / medigan

medigan - A Python Library of Pretrained Generative Models for Medical Image Synthesis
https://medigan.readthedocs.io/en/latest/
MIT License
115 stars 13 forks source link

Model Integration Request for medigan: 00007_INPAINT_BRAIN_MRI #40

Closed RichardObi closed 1 year ago

RichardObi commented 1 year ago

Creator: Sunho Kim, Byungjai Kim, and HyunWook Park, Medigan Model Preparation: Richard Osuala, Socayna Jouide Affiliation: Korea Advanced Institute of Science and Technology (KAIST) Stored in: https://zenodo.org/record/7041738

Model Metadata:


   "00007_INPAINT_BRAIN_MRI": {
      "execution": {
         "package_name": "00007_INPAINT_BRAIN_MRI",
         "package_link": "https://zenodo.org/record/7041738/files/00007_INPAINT_BRAIN_MRI.zip?download=1",
         "model_name": "inp_gen",
         "extension": ".pth",
         "image_size": [
            256,
            256
         ],
         "dependencies": [
            "matplotlib",
            "albumentations",
            "torch",
            "torchvision",
            "numpy",
            "pillow",
            "opencv-contrib-python"
         ],
         "generate_method": {
            "name": "generate",
            "args": {
               "base": [
                  "model_file",
                  "num_samples",
                  "output_path",
                  "save_images"
               ],
               "custom": {
                  "image_size": 256,
                  "num_inpaints_per_sample": 5,
                  "randomize_input_image_order": true,
                  "F_img_path": null,
                  "T1_img_path": null,
                  "T1c_img_path": null,
                  "T2_img_path": null,
                  "add_variations_to_mask": true,
                  "x_center": 130,
                  "y_center": 130,
                  "radius_1": 10,
                  "radius_2": 15,
                  "radius_3": 30
               }
            }
         }
      },
      "selection": {
         "performance": {
            "SSIM": null,
            "MSE": null,
            "NSME": null,
            "PSNR": null,
            "IS": null,
            "FID": 1.1597,
            "turing_test": null,
            "downstream_task": null,
            "DSC": 0.737,
            "Sensitivity": 0.663,
            "Precision": 0.864
         },
         "use_cases": [
            "segmentation",
            "classification",
            "detection"
         ],
         "organ": [
            "brain",
            "cranial",
            "head"
         ],
         "modality": [
            "MRI",
            "Cranial MRI",
            "Brain MRI",
            "Flair",
            "T1",
            "T1c",
            "T1 contrast-enhanced",
            "T2"
         ],
         "vendors": [],
         "centres": [],
         "function": [
            "image inpainting",
            "mask to image",
            "circle to tumor grade",
            "tumor grade to image",
            "cross-modal synthesis",
            "data augmentation",
            "domain-adaptation"
         ],
         "condition": [],
         "dataset": [
            "BRATS"
         ],
         "augmentations": [],
         "generates": [
            "brain MRI",
            "Flair",
            "T1",
            "T1c",
            "T2",
            "binary mask",
            "tumor grade mask"
         ],
         "height": 256,
         "width": 256,
         "depth": 1,
         "type": "Inpaint Generator",
         "license": null,
         "dataset_type": "public",
         "privacy_preservation": null,
         "tags": [
            "Brain",
            "Tumor",
            "MRI Generation",
            "Inpainting",
            "Brain MRI Synthesis",
            "Concentric Circle",
            "Tumor Inpainting",
            "Tumor Grade",
            "Tumor Grading",
            "Cross-Modality",
            "Multi-modal synthesis"
         ],
         "year": "2022"
      },
      "description": {
         "title": "Tumor Inpainting Model for Generation of Flair, T1, T1c, T2 Brain MRI Images (Trained on BRATS)",
         "provided_date": "August 2022",
         "trained_date": "2020",
         "provided_after_epoch": null,
         "version": null,
         "publication": "Medical Physics Journal",
         "doi": [
            "https://doi.org/10.48550/arXiv.2003.07526",
            "https://doi.org/10.1002/mp.14701"
         ],
         "inputs": [
            "image_size: default=256, help=the size if height and width of the generated images.",
            "num_inpaints_per_sample: default=10, help=the number of tumor inpaint images per MRI modality that is generated from the same input sample",
            "randomize_input_image_order: default=True, help=input image order is randomized. This helps to not exclude input images if batch generation is used.",
            "F_img_path: default=None, help=The path to the folder were the input Flair MRI images are stored.",
            "T1_img_path: default=None, help=The path to the folder were the input T1 MRI images are stored.",
            "T1c_img_path: default=None, help=The path to the folder were the input T1c MRI images are stored.",
            "T2_img_path: default=None, help=The path to the folder were the input T2 MRI images are stored.",
            "add_variations_to_mask: default=True, help=This slightly varies the values of x_center, y_center, radius_1, radius_2, radius_3. If True, the same segmentation masks is still used to generate each of the 4 modality images. This is recommended as it results in higher image diversity.",
            "x_center: default=130, help=the x coordinate of the concentric circle upon which the binary mask, the tumor grade mask, and, ultimately, the generated images are based.",
            "y_center: default=130, help=the y coordinate of the concentric circle upon which the binary mask, the tumor grade mask, and, ultimately, the generated images are based.",
            "radius_1: default=10, help=the radius of the first (inside second) of three concentric circles (necrotic and non-enhancing tumor) upon which the binary mask, the tumor grade mask, and, ultimately, the generated images are based.",
            "radius_2: default=15, help=the radius of the second (inside third) of three concentric circles (enhancing tumor) upon which the binary mask, the tumor grade mask, and, ultimately, the generated images are based.",
            "radius_3: default=30, help=the radius of the third of three concentric circles (edema) upon which the binary mask, the tumor grade mask, and, ultimately, the generated images are based."
         ],
         "comment": "A Generative adversarial network (GAN) for Inpainting tumors (based on concentric circle-based tumor grade masks) into multi-modal MRI images (Flair, T1, T1c, T2) with dimensions 256x256. Model was trained on BRATS MRI Dataset (Menze et al). For more information, see publication (https://doi.org/10.1002/mp.14701). Model comes with example input image folders. Apart from that, the uploaded ZIP file contains the model checkpoint files .pth (model weight), __init__.py (image generation method and utils), a requirements.txt, the MEDIGAN metadata.json. The proposed method synthesizes brain tumor images from normal brain images and concentric circles that are simplified tumor masks. The tumor masks are defined by complex features, such as grade, appearance, size, and location. Thus, these features of the tumor masks are condensed and simplified to concentric circles. In the proposed method, the user-defined concentric circles are converted to various tumor masks through deep neural networks. The normal brain images are masked by the tumor mask, and the masked region is inpainted with the tumor images synthesized by the deep neural networks. Also see original repository at: https://github.com/KSH0660/BrainTumor"
      }
   }
}
RichardObi commented 1 year ago

Now integrating this model..