All entries

    Test an Image Classifier Against Compression and Resizing

    Measure the effect of resizing and JPEG compression with paired tests on the same images.

    A tram-side lab compares resized film images and score plots
    Conceptual pixel-art illustration.

    Measure the effect of resizing and JPEG compression with paired tests on the same images.

    Build the example

    Choose a permitted test set, then create deterministic transforms at two resolutions and two JPEG qualities. Preserve the original IDs. Run the exact same model and threshold on every variant, and keep the transform order fixed because compression before resizing differs from compression afterward.

    Create a table with one row per image and columns for original score, JPEG quality, target size and transformed score. Compare score deltas with label flips at the frozen threshold. If many scores move without crossing the threshold, record that behavior too. A stable accuracy number can hide important sensitivity to image handling.

    Watch the failure boundary

    Run the clean image through the same decoding and color conversion as the transformed inputs. A hidden difference in preprocessing can otherwise masquerade as a compression effect. For each test slice, keep an image that changes prediction and an image that remains stable so readers can see what to investigate.

    Verify the behavior

    Compare predicted labels and score changes per image. If a manipulation class fails after heavy compression, check whether the same effect appears in authentic images. Publish transform settings, per-slice counts and a clean baseline so someone can distinguish overall score drift from one fragile subgroup.

    FURTHER READING

    Sources

    Technical references checked .

    END OF ENTRY / 65
    Eeshan Singh with Big Ben in London
    BEHIND THE JOURNAL

    Eeshan Singh

    I’m Eeshan Singh Pokharia, an AI Full Stack Developer and CoFounder of UltraFit360. I work across AI features, full-stack product development, and web and mobile experiences—from Figma and frontend interactions to the systems behind them.

    Run the clean image through the same decoding and color conversion as the transformed inputs. A hidden difference in preprocessing can otherwise masquerade as a compression effect. For each test slice, keep an image that changes prediction and an image that remains stable so readers can see what to investigate.

    Meet the author
    THE CONVERSATION

    Your side of the story.