Search code examples
jax

Use JAX to convert TIFF images to JPG?


I need to convert 3 million images of size 4 MB from TIFF to JPG. Could I use JAX?

The reason I ask is that I have an NVIDIA DGX Cloud environment with JAX set up. I'd like to do this conversion task in this environment because I'm hoping it could accelerate the process vs using a CPU-based approach. I am also new to JAX and DGX, so I wonder if this could be a learning opportunity.

Research Done

I looked at the jax.image module and pix. These offer functions related to matrix manipulation (e.g. sizing, deforming, etc.).

I also see from the documentation that

JAX is a language for expressing and composing transformations of numerical programs. JAX is also able to compile numerical programs for CPU or accelerators (GPU/TPU). JAX works great for many numerical and scientific programs, but only if they are written with certain constraints....

It would therefore not surprise me that JAX does not (easily) support image type conversion. I wanted to ask the question in case there was something I'm missing.


Solution

  • No, it is not possible to perform JPEG compression in JAX.