Package: nondefaced-detector
Nondefaced-DetectorA framework to detect if a 3D MRI volume has been defaced.Table of contentsInstallationContainerGPUCPUPipUsing pre-trained networksReproducibilityPaperRoadmapQuestions or IssuesContributingLicenseContactAcknowledgementsTraining DatasetBuilt WithInstallationContainerWe recommend using the latestNondefaced-detectordocker container, which includes all the dependencies required for the framework.GPUTheNondefaced-detectorGPU supported container uses the tensorflow-gpu as its base image. Please see theofficial tensorflow docker install pagefor all of the CUDA and NVIDIA driver requirements.$dockerpullpoldracklab/nondefaced-detector:latest-gpuCPUThis container can be used on most systems that have Docker/Singularity installed.$dockerpullpoldracklab/nondefaced-detector:latest-cpuNOTE: The CPU container will be very slow for training. We highly recommend that you use a GPU system.Pip$pipinstall--no-cache-dirnondefaced-detector[cpu/gpu]Using pre-trained networksPre-trained networks are avalaible in theNondefaced-detectormodelsrepository. Prediction can be done using the nondefaced-detector CLI or in python.From docker container installation$dockerrun--rm-v$PWD:/datanondefaced-detector:latest-cpu\predict\--model-path=$MODEL_PATH\/data/example1.nii.gzFrom pip installation$nondefaced-detector
Usage:nondefaced-detector[OPTIONS]COMMAND[ARGS]...Aframeworktodetectifa3DMRIVolumehasbeendefaced.

Options:--versionShowtheversionandexit.--helpShowthismessageandexit.

Commands:convertPreprocessMRIvolumesandconverttoTfrecords.evaluateEvaluateamodel'spredictionsagainstknownlabels.infoReturninformationaboutthissystem.predictPredictlabelsfromfeaturesusingatrainedmodel.ReproducibilitySteps to reproduce inference results from the paper.Step 1:Get the preprocessed dataset. You need to havedataladinstalled.$dataladclonehttps://gin.g-node.org/shashankbansal56/nondefaced-detector-reproducibility/opt/nondefaced-detector-reproducibility
$cd/opt/nondefaced-detector-reproducibility
$dataladgetpretrained_weights/*
$dataladgettest_ixi/tfrecords/*NOTE: To reproduce inference results from the paper, you only need to download the tfrecords.Step 2:Depending on your system create a tensorflow-cpu/gpu virtual environment. We recommend usingconda.$condacreate-ntf-cputensorflow
$condaactivatetf-cpuStep 3:Get the nondefaced-detector repo.$gitclonehttps://github.com/poldracklab/nondefaced-detector.gitStep 4:Run the standalone inference script.$cdnondefaced-detector
$pipinstall-e.
$cdnondefaced_detector
$pythoninference.py-h
usage:inference.py[-h]tfrecords_pathmodel_path

positionalarguments:tfrecords_pathPathtotfrecords.model_pathPathtopretrainedmodelweights.

optionalarguments:-h,--helpshowthishelpmessageandexitPaperRoadmapSee theprojects dashboardfor a list of ongoing work and proposed features.Questions or IssuesSee theopen issuesfor a list of known issues. If you have any questions or encounter any issues, please submit a github issue.ContributingContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make aregreatly appreciated.Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull RequestLicenseDistributed under the Apache 2.0 License. SeeLICENSEfor more information.ContactShashank Bansal -shashankbansal56@gmail.comAcknowledgementsTraining DatasetThe original model was trained on 980 defaced MRI scans from 36 different studies that are publicly available atOpenNeuro.orgBuilt WithnobrainerIXI Dataset