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 most augmentation stages run. Every path normalizes on GPU.

Pillow against AX on 46 shared recipes, per recipe
Pillow against AX on 46 shared recipes, per recipe Scroll horizontally to see the full chart. Open the image for full size.

Each comparison uses its own shared recipe set. Compare paths within each chart. 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.

R01Resize2243,1931,9052,781
R02RandomCrop2243,4182,9683,077
R03RandomResizedCrop3,1611,8612,706
R04HorizontalFlip3,3902,9653,040
R05VerticalFlip3,2452,9963,056
R06Pad+RandomCrop2243,2252,7602,802
R07Rotate2,9231,9312,737
R08Affine2,9781,9402,706
R09Perspective2,7491,8382,598
R10Elastic2,101——
R11ColorJitter2,499——
R12ChannelShuffle3,2232,9272,958
R13Grayscale3,2262,8482,983
R14RGBShift3,0362,7382,780
R15GaussianBlur3,0501,3792,615
R16GaussianNoise2,282——
R17Invert3,3652,8332,974
R18Posterize3,3082,8092,969
R19Solarize3,1912,8522,933
R20Sharpen3,076——
R21AutoContrast2,8592,6542,771
R22Equalize2,7682,6552,687
R23Erasing3,231——
R24JpegCompression2,8652,4992,517
R25RandomGamma3,1952,8062,847
R26PlankianJitter3,014——
R27MedianBlur2,9412742,881
R28MotionBlur2,968——
R29CLAHE2,199——
R30Brightness3,1752,8072,785
R31Contrast3,1242,6512,665
R32Blur3,1892,2842,769
R33ChannelDropout3,2602,8882,982
R34LinearIllumination2,738——
R35CornerIllumination2,813——
R36GaussianIllumination2,662——
R37Hue2,737——
R38PlasmaBrightness1,792——
R39PlasmaContrast1,588——
R40PlasmaShadow1,733——
R41Rain2,702——
R42SaltAndPepper3,166——
R43Saturation3,0332,7082,893
R44Snow2,406——
R45OpticalDistortion2,721——
R46Shear2,9571,8872,691
R47ThinPlateSpline2,104——
R48PhotoMetricDistort2,439——
R49ColorJiggle2,504——
R50LongestMaxSize+RandomCrop2242,7368942,068
R51SmallestMaxSize+RandomCrop2242,5425791,701
R52Transpose3,3332,9753,044
R53RandomRotate903,2492,9583,037
R54RandomJigsaw3,076——
R55EnhanceEdge3,0951,9562,656
R56EnhanceDetail3,1181,9802,743
R57UnsharpMask2,9281,5672,480
R58CenterCrop3,4093,0053,067
R59Resize256+Crop3,1111,6902,635
R60Resize224+CropAndPad3,1441,8952,754
R61LetterBox3,1512,0362,820
R62PadIfNeeded+RandomCrop2243,2402,9733,065
R63Resize224+RGBToBGR3,0591,8472,718
R64Resize224+Dithering6171,7692,564
R65Resize224+MorphologicalDilation3,082——
R66Resize224+MorphologicalErosion3,067——
R67RandomScale+RandomCrop2242,6737992,008
R68Resize224+RandomSizedCrop3,0131,3762,489
R69Resize224+CoarseDropout2,9501,8982,754
R70Resize224+Emboss2,9251,4692,620
R71Resize224+PixelSpread2,493——
R72Resize224+ShiftScaleRotate2,8231,3832,483

Measurement setup and limits

When a batch arrives late, the GPU sits idle and completes fewer steps in the same time.
When a batch arrives late, the GPU sits idle and completes fewer steps in the same time. Scroll horizontally to see the full chart. Open the image for full size.

The timeline illustrates input stalls with a fixed model step duration.

g2-standard-16, nvidia-l4; 49,999 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, 140, 141. Each observation follows 30 warm-up batches and times 100 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 d84d75894f2a0b5ad879c5df1c06ca1ec82690486652c62ed50295a241e19a1a · 2105 measurements · measured source fd09812 · machine-readable results · paper and methodology. This is the run reported in the paper.

Related Pages