inpainting


Nameinpainting JSON
Version 0.0.7 PyPI version JSON
download
home_pagehttps://github.com/BrainLesion/preprocessing
SummaryOfficial package to compute metrics for the BraTS inpainting challenge.
upload_time2024-03-13 22:41:31
maintainerFlorian Kofler
docs_urlNone
authorFlorian Kofler
requires_python>=3.10
licenseAGPL-3.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # inpainting
Official package to compute metrics for the [BraTS inpainting challenge](https://twitter.com/BraTS_inpaint).

## Usage
```
from inpainting.challenge_metrics_2023 import generate_metrics, read_nifti_to_tensor


def compute_image_quality_metrics(
    prediction: str,
    healthy_mask: str,
    reference_t1: str,
    voided_t1: str,
) -> dict:
    print("computing metrics!")
    print("prediction:", prediction)
    print("healthy_mask:", healthy_mask)
    print("reference_t1:", reference_t1)
    print("voided_t1:", voided_t1)

    prediction_data = read_nifti_to_tensor(prediction)
    healthy_mask_data = read_nifti_to_tensor(healthy_mask).bool()
    reference_t1_data = read_nifti_to_tensor(reference_t1)
    voided_t1_data = read_nifti_to_tensor(voided_t1)

    metrics = generate_metrics(
        prediction=prediction_data,
        target=reference_t1_data,
        normalization_tensor=voided_t1_data,
        mask=healthy_mask_data,
    )

    return metrics

```


## Citation
Please cite our [manuscript](https://arxiv.org/pdf/2305.08992.pdf) when using the package:
```
@misc{kofler2023brain,
      title={The Brain Tumor Segmentation (BraTS) Challenge 2023: Local Synthesis of Healthy Brain Tissue via Inpainting}, 
      author={Florian Kofler and Felix Meissen and Felix Steinbauer and Robert Graf and Eva Oswald and Ezequiel de da Rosa and Hongwei Bran Li and Ujjwal Baid and Florian Hoelzl and Oezguen Turgut and Izabela Horvath and Diana Waldmannstetter and Christina Bukas and Maruf Adewole and Syed Muhammad Anwar and Anastasia Janas and Anahita Fathi Kazerooni and Dominic LaBella and Ahmed W Moawad and Keyvan Farahani and James Eddy and Timothy Bergquist and Verena Chung and Russell Takeshi Shinohara and Farouk Dako and Walter Wiggins and Zachary Reitman and Chunhao Wang and Xinyang Liu and Zhifan Jiang and Ariana Familiar and Gian-Marco Conte and Elaine Johanson and Zeke Meier and Christos Davatzikos and John Freymann and Justin Kirby and Michel Bilello and Hassan M Fathallah-Shaykh and Roland Wiest and Jan Kirschke and Rivka R Colen and Aikaterini Kotrotsou and Pamela Lamontagne and Daniel Marcus and Mikhail Milchenko and Arash Nazeri and Marc-André Weber and Abhishek Mahajan and Suyash Mohan and John Mongan and Christopher Hess and Soonmee Cha and Javier Villanueva-Meyer and Errol Colak and Priscila Crivellaro and Andras Jakab and Jake Albrecht and Udunna Anazodo and Mariam Aboian and Juan Eugenio Iglesias and Koen Van Leemput and Spyridon Bakas and Daniel Rueckert and Benedikt Wiestler and Ivan Ezhov and Marie Piraud and Bjoern Menze},
      year={2023},
      eprint={2305.08992},
      archivePrefix={arXiv},
      primaryClass={eess.IV}
}
```



<!-- ## install dependencies
```
poetry export -f requirements.txt > requirements.txt
pip install -r  requirements.txt
``` -->


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/BrainLesion/preprocessing",
    "name": "inpainting",
    "maintainer": "Florian Kofler",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "florian.kofler@tum.de",
    "keywords": "",
    "author": "Florian Kofler",
    "author_email": "florian.kofler@tum.de",
    "download_url": "",
    "platform": null,
    "description": "# inpainting\nOfficial package to compute metrics for the [BraTS inpainting challenge](https://twitter.com/BraTS_inpaint).\n\n## Usage\n```\nfrom inpainting.challenge_metrics_2023 import generate_metrics, read_nifti_to_tensor\n\n\ndef compute_image_quality_metrics(\n    prediction: str,\n    healthy_mask: str,\n    reference_t1: str,\n    voided_t1: str,\n) -> dict:\n    print(\"computing metrics!\")\n    print(\"prediction:\", prediction)\n    print(\"healthy_mask:\", healthy_mask)\n    print(\"reference_t1:\", reference_t1)\n    print(\"voided_t1:\", voided_t1)\n\n    prediction_data = read_nifti_to_tensor(prediction)\n    healthy_mask_data = read_nifti_to_tensor(healthy_mask).bool()\n    reference_t1_data = read_nifti_to_tensor(reference_t1)\n    voided_t1_data = read_nifti_to_tensor(voided_t1)\n\n    metrics = generate_metrics(\n        prediction=prediction_data,\n        target=reference_t1_data,\n        normalization_tensor=voided_t1_data,\n        mask=healthy_mask_data,\n    )\n\n    return metrics\n\n```\n\n\n## Citation\nPlease cite our [manuscript](https://arxiv.org/pdf/2305.08992.pdf) when using the package:\n```\n@misc{kofler2023brain,\n      title={The Brain Tumor Segmentation (BraTS) Challenge 2023: Local Synthesis of Healthy Brain Tissue via Inpainting}, \n      author={Florian Kofler and Felix Meissen and Felix Steinbauer and Robert Graf and Eva Oswald and Ezequiel de da Rosa and Hongwei Bran Li and Ujjwal Baid and Florian Hoelzl and Oezguen Turgut and Izabela Horvath and Diana Waldmannstetter and Christina Bukas and Maruf Adewole and Syed Muhammad Anwar and Anastasia Janas and Anahita Fathi Kazerooni and Dominic LaBella and Ahmed W Moawad and Keyvan Farahani and James Eddy and Timothy Bergquist and Verena Chung and Russell Takeshi Shinohara and Farouk Dako and Walter Wiggins and Zachary Reitman and Chunhao Wang and Xinyang Liu and Zhifan Jiang and Ariana Familiar and Gian-Marco Conte and Elaine Johanson and Zeke Meier and Christos Davatzikos and John Freymann and Justin Kirby and Michel Bilello and Hassan M Fathallah-Shaykh and Roland Wiest and Jan Kirschke and Rivka R Colen and Aikaterini Kotrotsou and Pamela Lamontagne and Daniel Marcus and Mikhail Milchenko and Arash Nazeri and Marc-Andr\u00e9 Weber and Abhishek Mahajan and Suyash Mohan and John Mongan and Christopher Hess and Soonmee Cha and Javier Villanueva-Meyer and Errol Colak and Priscila Crivellaro and Andras Jakab and Jake Albrecht and Udunna Anazodo and Mariam Aboian and Juan Eugenio Iglesias and Koen Van Leemput and Spyridon Bakas and Daniel Rueckert and Benedikt Wiestler and Ivan Ezhov and Marie Piraud and Bjoern Menze},\n      year={2023},\n      eprint={2305.08992},\n      archivePrefix={arXiv},\n      primaryClass={eess.IV}\n}\n```\n\n\n\n<!-- ## install dependencies\n```\npoetry export -f requirements.txt > requirements.txt\npip install -r  requirements.txt\n``` -->\n\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0",
    "summary": "Official package to compute metrics for the BraTS inpainting challenge.",
    "version": "0.0.7",
    "project_urls": {
        "Homepage": "https://github.com/BrainLesion/preprocessing",
        "Repository": "https://github.com/BrainLesion/preprocessing"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6bef6160db1bc4b8c5c6c5a6f2e42ed9c3ae2b7380242512f3e35e6a3eabf2ca",
                "md5": "64399c75c27c5b4f961aca64c153c4bc",
                "sha256": "30cfc3ad43b331479af3e1905854202ccf42a2504e72bb1d71764ce6d21e2bb2"
            },
            "downloads": -1,
            "filename": "inpainting-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "64399c75c27c5b4f961aca64c153c4bc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 17781,
            "upload_time": "2024-03-13T22:41:31",
            "upload_time_iso_8601": "2024-03-13T22:41:31.929988Z",
            "url": "https://files.pythonhosted.org/packages/6b/ef/6160db1bc4b8c5c6c5a6f2e42ed9c3ae2b7380242512f3e35e6a3eabf2ca/inpainting-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-13 22:41:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "BrainLesion",
    "github_project": "preprocessing",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "inpainting"
}
        
Elapsed time: 0.21912s