{"id":37702141,"url":"https://github.com/masilab/deepn4","last_synced_at":"2026-01-16T13:01:04.366Z","repository":{"id":203794329,"uuid":"560493535","full_name":"MASILab/DeepN4","owner":"MASILab","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-28T22:53:33.000Z","size":97695,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-28T23:28:27.906Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MASILab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-11-01T16:12:49.000Z","updated_at":"2025-06-28T22:53:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"53df4398-b4c7-4050-89a9-de572761784f","html_url":"https://github.com/MASILab/DeepN4","commit_stats":null,"previous_names":["masilab/deepn4"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MASILab/DeepN4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2FDeepN4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2FDeepN4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2FDeepN4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2FDeepN4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MASILab","download_url":"https://codeload.github.com/MASILab/DeepN4/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASILab%2FDeepN4/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T13:01:03.983Z","updated_at":"2026-01-16T13:01:04.345Z","avatar_url":"https://github.com/MASILab.png","language":"Jupyter Notebook","readme":"# DeepN4\nPytorch implementation of DeepN4, from the paper: DeepN4: Learning ITKN4 Bias Field Correction for T1 weighted Images. \nWe propose **DeepN4**, a 3D UNet to generate Bias Field for T1w images and inturn correct T1w images for inhomogeneities.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"figures/fig.png\" width=100% height=40% \nclass=\"center\"\u003e\n\u003c/p\u003e\n\n## Prequisite installation\nPlease look into `requirements.txt` for libraries and versions used in the virutal environment. \n\n## Training and Testing\n1. Input train/test/val format: csv file with each row with `/path/to/corrected_T1.nii.gz,/path/to/input.nii.gz,/path/to/bias_field.nii.gz` for each subject \n2. Run training \n```\npython main.py train 0 Synbo_UNet3D False /path/to/save/model /path/to/tensorboard/output \\\n/path/to/save/predictions checkpoint_epoch_# guass \\\n```\n3. Run testing \n```\npython main.py pred 0 Synbo_UNet3D False /path/to/saved/model /path/to/tensorboard/output \\ \n/path/to/save/predictions checkpoint_epoch_# guass \\\n```\n\n## External evaluation \n\nEfficient evaulation can be performed for the public datasets as in `Evaluation_deepN4.ipynb`. The example data used is in `data/` \nThe trained weights and the singualrity image can be downloaded from https://zenodo.org/records/15765107 or https://drive.google.com/drive/folders/1mdBsV0kHRRV_Alu1QJrTT7N0GGNJDuiu?usp=sharing   \n\n\n\n## Singularity \n\nTo containize the source code \n```\nsudo singularity build deepn4v1.simg Singularity\n```\n\nTo run singularity \n```\nsingaulrity run\n--contain -e\n-B /path/to/inputs/directory/:/INPUTS\n-B /path/to/outputs/directory/:/OUTPUTS\n-B /tmp:/tmp\n-B /path/to/freesurfer/license.txt:/APPS/freesurfer/license.txt\ndeepn4v1.simg\n[options]\n```\n\nInputs and arguments for singularity\nInput Directory: one T1 image named as t1.nii.gz\nOutput Directory: results will be saved as t1processed.nii.gz and (if the option below is on) bias.nii.gz\nOptions: \"--bias_file\" to save the bias field field\n\n---\n\n\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasilab%2Fdeepn4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasilab%2Fdeepn4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasilab%2Fdeepn4/lists"}