Skip to content

[question] how to use dali resize in "not_larger" mode? #2542

@pokerc

Description

@pokerc

Hi there, for example, here i have two images, image_a with shape (500,500,3) and image_b with shape (1100,750,3).
I use "not_larger" mode in ops.Resize, like below:
resize = ops.Resize(device='cpu', mode="not_larger", size=960)
and the output shapes are image_a with shape (960,960,3) and image_b with shape (960,655,3) .
I want to know where there is any method to keep the origin shape when the longer size in one image is smaller than 960.
In other words i want to resize image_b to (960,655,3) because its too larger, but i want to keep image_a as the shape it used to be, and that is (500,500,3).

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions