Validating AI-Drafted Visual Stimuli Before They Enter a PsychoPy Study

Generative image tools are increasingly used to draft visual stimuli for cognitive and perceptual experiments—mood boards, placeholder scenes, sketch-guided mockups, or quick variants of a stimulus set. Before any of these drafts become part of a PsychoPy experiment, they need the same scrutiny as any other stimulus material, plus a few extra checks specific to AI generation. The following is a working checklist rather than a claim about any particular tool’s performance.

Provenance and consent
Keep a record of how each image was produced: the generator, the prompt or reference image, and the date. If a generated image resembles a real person, a recognizable brand, or copyrighted artwork, treat it as a licensing question, not a technical one. Many labs default to purely synthetic, non-identifiable content for this reason, especially when stimuli will be shared in a public repository alongside the experiment.

Licensing before distribution
If the experiment or its stimuli will be posted to OSF, GitHub, or a journal’s supplementary materials, confirm the generator’s terms allow that kind of redistribution and reuse. This is worth checking early, since it can affect whether a stimulus set can be shared at all, independent of scientific validity.

Fixed dimensions and canvas consistency
AI outputs frequently vary in aspect ratio between generations. Before importing into a Grating, Image, or Polygon-based routine, standardize every image to the same pixel dimensions and canvas position. Inconsistent cropping across a stimulus set introduces uncontrolled variance in apparent size, which matters for tasks sensitive to visual angle.

Color management
Generated images can carry embedded color profiles that differ from your display’s calibration. Convert everything to a single, known color space before use, and re-check contrast and luminance values if the experiment depends on precise stimulus contrast rather than approximate appearance.

Text legibility
If stimuli include generated text—labels, signage, or UI mockups—inspect it at the actual presentation size and viewing distance, not just at full resolution on an editing screen. AI-generated text can look correct when zoomed in and become illegible or subtly garbled at experimental scale.

Crop consistency across conditions
When a stimulus set spans multiple conditions (e.g., emotional expressions, object categories), confirm that framing, zoom level, and background remain consistent across the set. Even small differences in crop can act as a confound if participants pick up on incidental cues rather than the intended manipulation.

Randomization-ready filenames
Use a consistent, parseable naming convention (condition, item number, version) so that PsychoPy’s file-listing and randomization routines behave predictably. Avoid spaces, inconsistent capitalization, or generator-assigned filenames that don’t map cleanly onto your conditions file.

Piloting before data collection
Run a small pilot with the actual stimulus files, on the actual display, before committing to a full study. This surfaces problems—clipped edges, unexpected color shifts, or text that renders differently than expected—that are easy to miss when reviewing images outside the experiment software.

Timing caveats
Do not assume anything about load times or frame timing based on file size or format alone; that depends on the runtime environment, not on how the image was created. If precise timing matters, verify it using PsychoPy’s own timing checks in your target environment rather than assumptions carried over from the drafting stage.

Artifact detection
Check for generation artifacts: warped edges, repeated textures, inconsistent lighting direction, or anatomically implausible details if human or animal figures are involved. These are easy to overlook in a quick preview but can become a distraction or confound once presented repeatedly to participants.

Accessibility
Consider color-blind-safe palettes, sufficient contrast, and alt-text descriptions if stimuli or instructions will ever be presented outside the controlled lab environment, or reused in a version of the study intended for broader accessibility compliance.

Version logging and reproducibility
Treat each accepted stimulus as a versioned asset: log the prompt, generator, edit history, and final file hash alongside the experiment code. This makes it possible to explain, months later, exactly how a given image was produced and why it was chosen over earlier drafts.

Once this workflow is in place—naming conventions, a color-management step, a piloting pass—some builders like to separate the drafting stage from the finalizing stage entirely, using a general-purpose editor to iterate on composition, text overlays, or multi-reference variants before the assets ever reach PsychoPy.

Whatever tool is used for drafting, the validation steps above stay the same, and none of them can be skipped safely. AI generation can speed up the early exploration of stimulus ideas, but it does not remove the need for careful dimension checks, licensing review, pilot testing, and version tracking before a single image is trusted inside a real study.

I edited this post to remove the advertising link, but decided to keep the bulk of it as a potential start of a discussion about the use of AI to generate experimental stimuli.