Skip to content

Preserve the channel axis in HSL conversions - #125

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:masterfrom
sylvesterkaczmarek:fix/hsl-channel-axis
Open

Preserve the channel axis in HSL conversions#125
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:masterfrom
sylvesterkaczmarek:fix/hsl-channel-axis

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Preserve channel_axis in both HSL conversions. The functions currently split the requested input axis but always stack their output on the last axis; hsl_to_rgb also assumes channels-last when broadcasting achromatic pixels.

Use the requested axis for both stacking and broadcasting. Add comparisons with Python's colorsys across positive/negative axes, batched images, gray/color pixels, and eager/JIT execution.

Validation

JAX_PLATFORMS=cpu python -m pytest -q -n 2 dm_pix

1,362 passed, 99 skipped. On unpatched master, 24 new cases fail and the 8 channels-last controls pass. git diff --check passes. No GPU/TPU execution was run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant