nnUNet | Image datasets | Machine Learning library

 by   MIC-DKFZ Python Version: 1.7.1 License: Apache-2.0

kandi X-RAY | nnUNet Summary

kandi X-RAY | nnUNet Summary

nnUNet is a Python library typically used in Artificial Intelligence, Machine Learning applications. nnUNet has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can install using 'pip install nnUNet' or download it from GitHub, PyPI.

[2020_10_21] Update: We now have documentation for common questions and common issues. We now also provide reference epoch times for several datasets and tips on how to identify bottlenecks.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              nnUNet has a medium active ecosystem.
              It has 3743 star(s) with 1286 fork(s). There are 76 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 298 open issues and 905 have been closed. On average issues are closed in 40 days. There are 17 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of nnUNet is 1.7.1

            kandi-Quality Quality

              nnUNet has 0 bugs and 0 code smells.

            kandi-Security Security

              nnUNet has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              nnUNet code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              nnUNet is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              nnUNet releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 22318 lines of code, 917 functions and 269 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed nnUNet and discovered the below as its top functions. This is intended to give you an instant insight into nnUNet implemented functionality, and help decide if they suit your requirements.
            • Predict cases with AMOS2022
            • Load postprocessing
            • Perform a single step
            • Restore a trained model from a checkpoint
            • Load model and checkpoint files
            • Score model based on rank and rank
            • Convert labels back to Brats
            • Apply threshold to folder_in to folder_out
            • Evaluate BTS folder
            • Plan the experiment
            • Compute the properties for a stage
            • Get default augmentation
            • Summarize a list of models
            • Restore the trained model from a checkpoint
            • Ensembles the training folder
            • Performs a single step of the optimizer
            • Resample data using preprocessor
            • Predict a model from a folder
            • Compute properties for a given stage
            • Sets preprocessing configuration
            • Run training
            • Validate the model
            • Verify that the dataset is valid
            • Collect and prepare and prepare the results for each experiment
            • Validate the network
            • Validate the dataset
            • Generate training batch
            • Generate a training batch
            Get all kandi verified functions for this library.

            nnUNet Key Features

            No Key Features are available at this moment for nnUNet.

            nnUNet Examples and Code Snippets

            copy iconCopy
            nnUNet_train 2d nnUNetTrainerV2 Task600_Thyroid2D 0
            nnUNet_train 2d nnUNetTrainerV2 Task600_Thyroid2D 1
            nnUNet_train 2d nnUNetTrainerV2 Task600_Thyroid2D 2
            nnUNet_train 2d nnUNetTrainerV2 Task600_Thyroid2D 3
            nnUNet_train 2d nnUNetTrainerV2 Task600_Th  
            5. Get the number of FLOPs
            Pythondot img2Lines of Code : 6dot img2License : Permissive (Apache-2.0)
            copy iconCopy
            python get_flops.py -m CONFIGURATION
            
            from fvcore import FlopCountAnalysis
            
            # The input_size of the baseline model is 1*1*80*192*160
            inputs = (torch.randn(input_size),)
            flops = FlopCountAnalysis(model, inputs)
              
            4. Get the number of parameters
            Pythondot img3Lines of Code : 5dot img3License : Permissive (Apache-2.0)
            copy iconCopy
            python get_params.py -m CONFIGURATION
            
            from torchsummary import summary
            
            # The input_size of the baseline model is 1*80*192*160
            summary(model, input_size)
              
            Python os: [Errno 13] Permission Denied
            Pythondot img4Lines of Code : 4dot img4License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            os.mkdir(os.path.join("/", *splits[:i+1]))
            
            base = "/home/pere/Tortuosity/nnUNet_base"
            

            Community Discussions

            QUESTION

            Different behavior of Singularity image on different machines?
            Asked 2020-Aug-28 at 08:20

            I try to run my python3 based Singularity image on a remote machine, but I get the following error that I do not get with other machines:

            ...

            ANSWER

            Answered 2020-Aug-28 at 08:20

            This is often due to environmental variables being passed on, or not passed on, to the container without noticing. To ensure this is not an issue, you can use -e or --cleanenv. This will prevent any variables not prefixed with SINGULARITYENV_ from being loaded into the container.

            That said, the warning WARNING: skipping mount of sysfs: no such file or directory is also concerning: singularity was unable to mount /sys into the image because it doesn't exist on the host server. That particular python error also seems to be specific to windows 10. Singularity doesn't currently support windows, even with the magic of WSL2.

            Source https://stackoverflow.com/questions/63619799

            QUESTION

            Problem to extend a Singularity image from an existing docker image
            Asked 2020-Aug-28 at 08:08

            I try to extend the pytorch docker image with my definition file nnunet.def:

            ...

            ANSWER

            Answered 2020-Aug-28 at 08:08

            Short answer: the value of $PATH in %post is different from when you're running in shell, so it doesn't know where to look.

            If you look at where pip is located (which pip) in either the docker or singularity image, it is at /opt/conda/bin/pip. The default path used in %post is /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin.

            When you see an error stating that a command is not available when run as part of a script but it is when you run interactively, it is almost always an environmental issue and PATH, PYTHONPATH, PERL5LIB, etc. are the frequent culprits.

            If you add export PATH=/opt/conda/bin:$PATH to the beginning of the %post block it should solve this issue.

            Source https://stackoverflow.com/questions/63619623

            QUESTION

            Python os: [Errno 13] Permission Denied
            Asked 2020-Jan-09 at 12:22

            I am trying to get a deep learning network (https://github.com/MIC-DKFZ/nnUNet) to work with my own dataset and I am having trouble with the paths. I have used several approaches to define my paths. The authors import the following packages for this issue:

            import os

            from batchgenerators.utilities.file_and_folder_operations import maybe_mkdir_p, join

            With this, I have tried the following lines, separately:

            base = os.environ["nnUNet_base"]

            base = join("Tortuosity", "nnUNet_base")

            base = "Tortuosity/nnUNet_base"

            I have the nnUNet_base directory inside the Tortuositydirectory. With the first approach it seems that it is not registering the directory correctly (I ask for print("base =", base) and in return I get None. For the second and third approaches, I obtain the following error:

            ...

            ANSWER

            Answered 2020-Jan-09 at 12:22

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install nnUNet

            nnU-Net has been tested on Linux (Ubuntu 16, 18 and 20; centOS, RHEL). We do not provide support for other operating systems. nnU-Net requires a GPU! For inference, the GPU should have 4 GB of VRAM. For training nnU-Net models the GPU should have at least 10 GB (popular non-datacenter options are the RTX 2080ti, RTX 3080 or RTX 3090). Due to the use of automated mixed precision, fastest training times are achieved with the Volta architecture (Titan V, V100 GPUs) when installing pytorch the easy way. Since pytorch comes with cuDNN 7.6.5 and tensor core acceleration on Turing GPUs is not supported for 3D convolutions in this version, you will not get the best training speeds on Turing GPUs. You can remedy that by compiling pytorch from source (see here) using cuDNN 8.0.2 or newer. This will unlock Turing GPUs (RTX 2080ti, RTX 6000) for automated mixed precision training with 3D convolutions and make the training blistering fast as well. Note that future versions of pytorch may include cuDNN 8.0.2 or newer by default and compiling from source will not be necessary. We don't know the speed of Ampere GPUs with vanilla vs self-compiled pytorch yet - this section will be updated as soon as we know. For training, we recommend a strong CPU to go along with the GPU. At least 6 CPU cores (12 threads) are recommended. CPU requirements are mostly related to data augmentation and scale with the number of input channels. They are thus higher for datasets like BraTS which use 4 image modalities and lower for datasets like LiTS which only uses CT images.
            Install PyTorch. You need at least version 1.6
            Install nnU-Net depending on your use case: For use as standardized baseline, out-of-the-box segmentation algorithm or for running inference with pretrained models: pip install nnunet For use as integrative framework (this will create a copy of the nnU-Net code on your computer so that you can modify it as needed): git clone https://github.com/MIC-DKFZ/nnUNet.git cd nnUNet pip install -e .
            nnU-Net needs to know where you intend to save raw data, preprocessed data and trained models. For this you need to set a few of environment variables. Please follow the instructions here.
            (OPTIONAL) Install hiddenlayer. hiddenlayer enables nnU-net to generate plots of the network topologies it generates (see Model training). To install hiddenlayer, run the following commands: pip install --upgrade git+https://github.com/FabianIsensee/hiddenlayer.git@more_plotted_details#egg=hiddenlayer

            Support

            We have collected solutions to common questions and problems. Please consult these documents before you open a new issue. nnU-Net is developed and maintained by the Applied Computer Vision Lab (ACVL) of the Helmholtz Imaging Platform.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install nnunet

          • CLONE
          • HTTPS

            https://github.com/MIC-DKFZ/nnUNet.git

          • CLI

            gh repo clone MIC-DKFZ/nnUNet

          • sshUrl

            git@github.com:MIC-DKFZ/nnUNet.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link