Skip to content

AttributeError: module 'monai.networks.nets' has no attribute 'BasicUNet' #61

@Jingnan-Jia

Description

@Jingnan-Jia

Describe the bug
The code from A U-Net model for lung lesion segmentation from CT images could not be runned.

The error information is: TypeError: __init__() got an unexpected keyword argument 'to_onehot_y'.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://github.com/Project-MONAI/tutorials/tree/master/3d_segmentation/challenge_baseline/
  2. Install MONAI by pip install monai. NOTE: this is important. Different install methods lead to different errors TypeError: __init__() got an unexpected keyword argument 'to_onehot_y' #60
  3. Run commands python run_net.py train --data_folder "COVID-19-20_v2/Train" --model_folder "runs"

Expected behavior
Start training of the model.

Screenshots
image

Environment (please complete the following information):

  • OS: CentOS
  • Python version: 3.6
  • MONAI version [e.g. git commit hash]: 0.3.0
  • CUDA/cuDNN version:
  • GPU models and configuration

Additional context
https://covid-segmentation.grand-challenge.org/Resource/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions