Skip to content

Preprocessing functions need to take grayscale inputs as well #3

Description

@aashnapulla

Currently, most preprocessing functions assume 3-channel RGB images. This causes errors when grayscale images (shape (H, W)) are passed. Some datasets are already in grayscale, and many models (e.g., edge detection, classical CV tasks) expect grayscale inputs.
Functions like median_filter, Gaussian_blur, and resize should be updated to:

  • Accept both grayscale and RGB images.
  • Handle channel dimension consistently (e.g., add a dummy channel if grayscale, or branch logic).
  • Ensure output dtype/shape matches the input format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions