This question evaluates algorithmic and systems engineering skills related to batch image processing, parallelization, I/O versus CPU trade-offs, and deterministic output association within the Coding & Algorithms domain.

You are given m input images and n processing pipelines.
Write a function/program that produces m × n output images by applying every pipeline to every input image.
(image_id, pipeline_id)
.
image_paths: List[str]
(size m)
pipelines: List[List[Callable[[Image], Image]]]
(size n, each of length k)
output_dir: str
m*n
images to
output_dir
with deterministic names like
img{idx}_pipe{j}.png
, or return a list of output file paths.
m, n
can be large enough that runtime and I/O efficiency matter.
m
and
n
?