r/learnmachinelearning • u/ScarlyLamorna • 23d ago
Help Data augmentation question. How do I characterise an original and augmented datasets where the augmentation parameters were zoom and crop? [P]
For context, I am a new postgraduate student in machine learning (but not a very good one). I have produced some augmented datasets (TIFF files where each file contains one object to be detected / classified) which I used in training deep learning models. I used fairly aggressive cropping (random crops between 0 and 90%) and more moderate zooms (random values between 0 and 20%). My supervisor wants me to characterise these datasets to see how augmentation has changed it.
Sorry if this is a rookie question, but which statistics should I use? My supervisor says the stats I use should indicate changes in size and shape but I honestly don't know where to start.
If anyone can recommend a decent software/program to produce the stats and histograms as well, that would be great.
Thanks in advance!
1
u/Massive_Distance_616 23d ago
Your supervisor said size and shape, so I’d measure those directly on each image in both datasets and compare the distributions.
Per image: width, height, area and aspect ratio.
Per object (if you have masks or bounding boxes): the fraction of the object still visible after the crop, which matters a lot with crops up to 90%, since a heavily cropped object may no longer be recognisable.
Count how many augmented images lose the object entirely or keep too little of it to be a valid label. Then plot overlaid histograms of original against augmented for each, and report mean, standard deviation and a few percentiles. If you know which augmented image came from which original, you can also compare them as pairs.
You can do all of it with Python: Pillow or
tifffileto read the TIFFs, pandas to collect the numbers, and matplotlib or seaborn for the histograms.One thing to check is whether your zoom and crop pipeline resizes everything back to a fixed size at the end, because then image dimensions will look identical and the change will show up only in object size and visible fraction.
1
u/No-Cherry-3308 23d ago
Compare distributions, not averages. If you have masks or boxes, run scikit-image
regionpropson both sets and pull object area, bounding-box aspect ratio, eccentricity and solidity, plus the object's size relative to the frame, since zoom mostly shifts that. Plot original vs augmented as overlaid histograms in matplotlib and put a number on each shift with a KS test or Wasserstein distance from scipy. For an overall view, embed both sets with a pretrained CNN and compare them with UMAP or FID.