HF RL Explorer

Task: Convert PIL Image to NumPy Array and Back

Task: Convert PIL Image to NumPy Array and Back: a task in Terminal-Lego-15k (Harbor dataset). Write a Python script that demonstrates bidirectional conversion between PIL (Pillow) Image objects and NumPy arrays. The script should convert a PIL Image to a NumPy array, perform a pixel-wise…

The task

Write a Python script that demonstrates bidirectional conversion between PIL (Pillow) `Image` objects and NumPy arrays. The script should convert a PIL Image to a NumPy array, perform a pixel-wise transformation, and then convert the modified NumPy array back into a PIL Image and save it.

Part of PrimeIntellect/Terminal-Lego-15k.