AlbumentationsX vs PIL/Pillow Benchmark

Compare JPEG-to-CUDA throughput and peak GPU memory. The Summary page covers library tradeoffs, and the Transform Mapping page covers supported operations.

RGB input pipeline results

Every path reads RGB JPEGs, prepares the recipe, and delivers a synchronized CUDA batch. CPU and GPU labels identify where augmentation runs; normalization runs on GPU for every path.

Mean relative throughput on the same 26 recipes. AlbumentationsX = 1×; higher is faster.
Mean relative throughput on the same 26 recipes. AlbumentationsX = 1×; higher is faster. Scroll horizontally to see the full chart. Open the image for full size.
Same 26 recipes for every row. Throughput is the arithmetic mean of per-recipe ratios to AlbumentationsX; memory is the median of per-recipe peak-memory medians.
Measured pathThroughput / AXGPU memory (MiB)
AlbumentationsX CPU1.00×1,852
Pillow CPU0.71×1,814

Each comparison uses its own shared recipe set. Averages from different sets cannot rank all libraries. The table below includes every measured recipe for these paths, including recipes outside the summary set. Recipe names are shortened; hover over a name for its full pipeline.

Benchmark metric

Higher throughput is better. Values are medians across seeds. Hover for the observed range. A dash means no measured result.

R01Resize2244,7512,390
R02RandomCrop2244,7403,768
R03RandomResizedCrop4,7852,721
R04HorizontalFlip4,7233,759
R05VerticalFlip4,9073,567
R06Pad+RandomCrop2244,3973,659
R07Rotate3,3523,555
R08Affine3,0492,647
R09Perspective2,879—
R10Elastic1,990—
R11ColorJitter3,523—
R12ChannelShuffle5,026—
R13Grayscale5,1573,687
R14RGBShift4,348—
R15GaussianBlur4,6792,393
R16GaussianNoise3,288—
R17Invert5,0763,540
R18Posterize5,1103,493
R19Solarize4,6073,506
R20Sharpen4,223—
R21AutoContrast4,2633,513
R22Equalize3,9863,245
R23Erasing4,938—
R24JpegCompression4,2323,183
R25RandomGamma4,969—
R26PlankianJitter4,538—
R27MedianBlur3,805241
R28MotionBlur4,223—
R29CLAHE2,373—
R30Brightness4,6223,519
R31Contrast4,6423,198
R32Blur4,8213,048
R33ChannelDropout4,972—
R34LinearIllumination3,866—
R35CornerIllumination4,090—
R36GaussianIllumination3,930—
R37Hue4,274—
R38PlasmaBrightness2,461—
R39PlasmaContrast2,162—
R40PlasmaShadow2,489—
R41Rain4,069—
R42SaltAndPepper4,147—
R43Saturation4,1363,470
R44Snow3,857—
R45OpticalDistortion3,110—
R46Shear2,6582,550
R47ThinPlateSpline858—
R48PhotoMetricDistort3,369—
R49ColorJiggle3,526—
R50LongestMaxSize+RandomCrop2243,658—
R51SmallestMaxSize+RandomCrop2243,221—
R52Transpose4,9423,676
R53RandomRotate905,002—
R54RandomJigsaw4,662—
R55EnhanceEdge4,3892,601
R56EnhanceDetail4,7202,700
R57UnsharpMask3,1202,132

Measurement setup and limits

Throughput measures batch consumption and final CUDA synchronization. GPU memory is sampled from pipeline construction through cleanup.
Throughput measures batch consumption and final CUDA synchronization. GPU memory is sampled from pipeline construction through cleanup. Scroll horizontally to see the full chart. Open the image for full size.

g2-standard-16, nvidia-l4; 10,000 selected ImageNet JPEGs. Batch size 256, 15 workers, prefetch factor 2; persistent workers enabled. Output: cuda float16, BCHW 256×3×224×224.

Seeds: 137, 138, 139. Each observation follows 1 warm-up batch and times 32 batches, ending with CUDA synchronization. Pipeline construction and worker startup are outside throughput timing; prefetch effects remain. JPEG files are prewarmed, so this measures filesystem reads and decoding with a warm page cache.

NVML samples peak process GPU memory every 50 ms, from pipeline construction through final synchronization and cleanup. Brief peaks can be missed. The measurements include no model and do not establish training speed or augmentation quality. Seeds do not guarantee identical augmentation draws across libraries. Observed ranges describe variation between runs; they are not confidence intervals.

In this published run, DALI Crop includes resizing the short side, and DALI Affine omits rotation and shear.

Run 3f8e2e315710528399b8e82e2359ab85c58c809644595b68a92fb9d83492cc8c · 759 measurements · measured source 5fc35f6 · machine-readable results · paper and methodology. This is the run reported in the paper.

Related Pages