Skip to content

image size problem #40

@zhaoxin111

Description

@zhaoxin111

Hi,I find a bug in gradcam.py
The Image package use w,h mode. However, the precessed image is a tensor with 1,c,h,w. So,the order of w and h need to be switched when using Image.resize.

Line 88,change
cam = np.uint8(Image.fromarray(cam).resize((input_image.shape[2],
input_image.shape[3]), Image.ANTIALIAS))
to
cam = np.uint8(Image.fromarray(cam).resize((input_image.shape[3],
input_image.shape[2]), Image.ANTIALIAS))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions