Skip to content

❓ read_image gives differently shaped arrays based on as_tensor argument. #3316

@JeGa

Description

@JeGa

Your Question

Is it intended, that read_image returns different shapes (order of c, h, w), depending on the as_tensor parameter?

print(read_image(image_file_path, as_tensor=True).shape)
# torch.Size([3, 490, 326])
print(read_image(image_file_path, as_tensor=False).shape)
# (490, 326, 3)

Forum Check

  • I have searched the discussions forum for an answer to my question.

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