Skip to content

Official OcclusionSensitivity example is not workable #2030

@bbb801

Description

@bbb801

Dear Sir,

I just copied and pasted the commands from MONAI official documentation (see: https://docs.monai.io/en/latest/visualize.html?highlight=OcclusionSensitivity)

It is here: It is for the use of 3d OcclusionSensitivity.
image

I ran the code and used the correct version of Monai (0.5.0). I did not revise anything but got an error. I ran:

densenet 3d

import torch
from monai.networks.nets import DenseNet
from monai.visualize import OcclusionSensitivity

model_3d = DenseNet(spatial_dims=3, in_channels=1, out_channels=3, init_features=2, growth_rate=2, block_config=(6,))
occ_sens = OcclusionSensitivity(nn_module=model_3d, n_batch=10, stride=2)
occ_map, most_probable_class = occ_sens(torch.rand(1, 1, 6, 6, 6), b_box=[-1, -1, 2, 3, -1, -1, -1, -1])

See the following figure:
image

Could you provide some sugeestions? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions