Skip to content

Feature Request: implement rot90 #6102

@MauricePasternak

Description

@MauricePasternak

System information

  • TensorFlow.js version (you are using):
    3.13.0

  • Are you willing to contribute it (Yes/No):
    No

Describe the feature and the current behavior/state.
This feature currently exists in the Python Tensorflow codebase: https://www.tensorflow.org/api_docs/python/tf/image/rot90

Although, for generalizability, it would be great if the behavior followed more closely to numpy's approach: https://numpy.org/doc/stable/reference/generated/numpy.rot90.html

Will this change the current api? How?
It will add an additional API function and documentation needed for said function.

Who will benefit with this feature?
Generally benefits anyone who would like to perform precise 90/180/270 rotations on tensors/arrays for data prep and/or data augmentation purposes. Example use case, MRI voxel data loaded is often loaded differently between image types and it would be convenient to have a rotation function to standardize all loaded images.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions