CLIP Similarity Analysis

MagicEasel — drawing-to-inspiration-image pipeline · 24 participants · Environmental & Personal conditions · audit 2026-08-03


Contents

Overview

MagicEasel watches a participant's drawing, identifies objects in it, samples an object from the participant's surrounding environment, perturbs its description into an image-generation prompt, and returns an inspiration image. This analysis measures how semantically related — by CLIP cosine similarity — four stages of that process are to the participant's selected drawing object.

All four comparisons use the selected drawing-object text as their fixed reference. Only the item being compared changes.

2,032retained generation rows
1,304rows with all four scores
728blank-score rows
23contributing participants
1,141Environmental retained
692Environmental scored
891Personal retained
612Personal scored

The 728 blank-score rows are generations for which the drawing detector returned an empty list. They are retained in the CSV but contribute no CLIP values. The two conditions differ in their object source: Environmental draws from 15 shared objects; Personal draws from participant-provided photos.

CSV columnSource being comparedScore type
clip_environment_text_vs_drawing_textText of the selected environment objecttext–text
clip_environment_photo_vs_drawing_textPhoto of the selected environment objectimage–text
clip_image_prompt_vs_drawing_textActual image-generation prompt sent to the generatortext–text
clip_generated_image_vs_drawing_textGenerated inspiration imageimage–text

Text-to-text and image-to-text scores have different numerical distributions. Cross-type comparisons (e.g., environment-text vs. generated-image) are not meaningful; same-type cross-condition comparisons are.

Pipeline

One generation follows this sequence. The selected drawing text (step 3) is the fixed CLIP reference for all four scores.

flowchart LR
    A["Drawing capture"] --> B["Object detection"]
    B --> C["Drawing target"]
    C --> D["Env object + photo"]
    D --> E["Image prompt"]
    E --> F["Generated image"]
    style C stroke:#B13254,stroke-width:2px
        
drag to pan · scroll to zoom
Fig. 1 — MagicEasel pipeline from drawing capture to inspiration image. The drawing target (crimson border) is the CLIP reference used by all four scores.

The text-embedding model used during step 4 to select the environment object is part of the original experiment. CLIP is a separate model applied afterward for this analysis.

CLIP model: openai/clip-vit-large-patch14 (L/14). Processor: openai/clip-vit-base-patch32 (B/32). Metric: raw cosine similarity between L2-normalized embeddings — not a percentage.

Dataset Coverage

The chart below shows, for each participant, how many of the retained rows contain all four CLIP scores (scored, darker) versus how many have blank scores due to empty drawing detections (blank, lighter). P4 is excluded entirely: its 86 archived generations cannot be reconstructed without a usable experiment log.

Fig. 2 — Retained rows per participant split by scored vs blank-score, for Environmental (brown) and Personal (crimson) conditions. P3 Personal = 0 because per-generation files are missing.

Condition-wide Means

Observed Personal means are higher for environment text, image prompt, and generated image. Environmental environment-photo mean is slightly higher. These are arithmetic means with no statistical test — no uncertainty analysis is included, and each participant contributes repeated rows.

0.619Env text · Environmental
0.636Env text · Personal
0.635Prompt · Environmental
0.657Prompt · Personal
0.136Env photo · Environmental
0.135Env photo · Personal
0.121Gen image · Environmental
0.124Gen image · Personal
Fig. 3 — Condition-wide mean CLIP similarities by score type. Text-to-text scores (env text, image prompt) are numerically higher than image-to-text scores (env photo, gen image) — this reflects score-type distribution differences, not one type being "better." Environmental n=692, Personal n=612.
Comparison source Environmental (n=692) Personal (n=612) Combined (n=1,304)
Environment text0.619309670.636199400.62723645
Environment photo0.135982200.134709680.13538497
Image prompt0.634976050.656774020.64520638
Generated image0.120681420.124151910.12231021

Per-Participant Comparison

Each point is one participant (21 with both conditions). The dashed diagonal marks equal Environmental and Personal means. Points above the diagonal have a higher Personal mean; points below have a higher Environmental mean. Hover a point to see the participant ID and exact values. P3, P13 are Environmental-only; P4 is excluded.

Fig. 4a — Per-participant environment-text CLIP score: Environmental mean (x-axis) vs Personal mean (y-axis). Text-to-text comparison. Most participants sit above the diagonal, indicating higher Personal means.
Fig. 4b — Per-participant generated-image CLIP score: Environmental mean (x) vs Personal mean (y). Image-to-text comparison. Mixed: roughly half above and half below the diagonal.

Participant-Condition Means

Click any column header to sort. Rows with N scored < 5 are flagged — their means are averages over very few generations and should be interpreted with caution. P13 Personal has no scored rows because every retained generation had an empty detection list.

PID Condition N scored Env text Env photo Image prompt Gen image

Data Quality

Pairing method breakdown

How drawing targets were associated with their generated output depends on whether requests were processed sequentially or concurrently. The vast majority were unique in their log position.

Fig. 5 — Pairing-method distribution across all 2,032 retained rows.
Pairing methodRows
Unique pending target1,298
Start-timestamp override2
Probability-pattern override4
No drawing target728

The six override rows (P3, P16, P20) had two concurrent requests whose log messages interleaved. Seeds uniquely identify the generated output; probability patterns or request-start timestamps identify the drawing target.

Specific exceptions

P4 — no usable experiment log

data2/P04_0618/out.log is a five-line, 840-byte log from a later failed launch. P4's 86 generated images, captures, and JSON files exist, but the drawing text, environment selection, and prompt cannot be reconstructed. All 86 are excluded.

P3 Personal — per-generation files missing

P3 was assigned Personal in S1. Its log shows the brandt-objects environment in two windows (44 launches total). However, the original captures and generated directories are absent from both DATA.zip and MagicEasel_bundle.zip. This appears to be a copy/export omission. No synthetic P3 Personal rows are created.

Four Environmental rows that used Personal environments

These transition records are excluded because the recorded active environment does not match the intended condition: P11 2026-06-22_10-26-34_timed (esther-objects), P16 2026-06-23_15-20-55_timed (laura-objects), P23 2026-06-25_17-18-01_timed and 2026-06-25_17-18-29_timed (sneha-objects).

Three P1 Personal rows with use_sampled_image = false

The first three retained Personal rows for P1 (2026-06-15_14-51-16_timed, 14-51-17_timed, 14-51-18_timed) have use_sampled_image = false. The generated images were not photo-conditioned in those three cases, but the rows remain in the CSV.

P5 Personal photos — HEIF data with .jpg names

All 15 files in Personal objects-Rakshanda contain HEIF image data despite having .jpg extensions. The scoring script registers a HEIF decoder (pillow-heif==1.1.1). One log stem is IMG_8151_chk while its archived source is IMG_8151.jpg; one explicit alias resolves it.

Sensitivity check for interleaved targets

A what-if comparison swapped the P16 and P20 target assignments and recomputed the 692-row Environmental means using the smaller openai/clip-vit-base-patch32 model:

Comparison sourceChange (correct − swapped)
Environment text+0.000177
Environment photo+0.000031
Image prompt+0.000019
Generated image−0.000091

Condition-wide differences are small because only 4 of 692 rows change. Within the four affected rows the largest mean difference is 0.0306; the P20 environment-text pair changes by 0.0443.

The six interleaved-request assignments in full
Output record Drawing target Selected env object Image prompt Seed Method
P3 16-01-39_timedhanda tote bag; envrionment 9.jpgbackpack1068050079Start timestamp
P3 16-01-41_timedlampa desk lamp; envrionment 3.jpgoffice chair1301420986Start timestamp
P16 15-41-25_timedperson walkingblack flip flops; envrionment 8.jpgdoor mat1140801244Probability pattern
P16 15-41-26_timedstairsa white folding chair; envrionment 10.jpgpicnic basket1539856523Probability pattern
P20 10-35-15_timedbamboo planta white folding chair; envrionment 10.jpga plastic lunch tray39818095Probability pattern
P20 10-35-16_timedblack handsa black cup; envrionment 1.jpgwooden saucer2122450072Probability pattern

Reproduction

Install dependencies

python -m pip install -r requirements-clip.txt

The averaging script uses only Python's standard library and does not require CLIP once clip_scores.csv exists.

Recalculate row-level scores

python calculate_clip_scores.py \ --data-dir data2 \ --output clip_scores.csv \ --device auto \ --batch-size 16

The checked run produced 2,032 data rows and 58 columns. File size: 1,960,759 bytes. SHA-256: ee11a0be2bf4f4f09405e3222177523f613022da9025976d73f8e4f925fb5baf.

Recalculate participant-condition means

python summarize_clip_scores.py clip_scores.csv

Prints the Markdown table in Section 5.3. Ignores all-blank rows; rejects rows with only some of the four scores; formats means to eight decimal places.

CLIP model and preprocessing

ItemValue
Model weightsopenai/clip-vit-large-patch14 rev 32bd64288804d66eefd0ccbe215aa642df71cc41
Processoropenai/clip-vit-base-patch32 rev 3d74acf9a28c67741b2f4f2ea7635f0aaf6f0268
MetricRaw cosine similarity between L2-normalized embeddings
Text inputExact logged text, no template added
Inferencefloat32, evaluation mode, torch.inference_mode
Image decodingPillow + pillow-heif==1.1.1

Shared Environmental Objects

The shared set contains 15 photos used across all Environmental sessions. Note: the misspelling envrionment (missing the second 'n') is part of the archived filenames and log values — code must preserve it when resolving paths.

Photo stemDetected object text
envrionment 1a black cup
envrionment 2a striped laundry bag
envrionment 3a desk lamp
envrionment 4a stapler
envrionment 5a clothes hanger
envrionment 6a metal water bottle
envrionment 7a closed umbrella
envrionment 8a pair of black flip flops on a wooden floor
envrionment 9a tote bag
envrionment 10a white folding chair
envrionment 11a suitcase
envrionment 12a tissue box
envrionment 13a white electrical plug
envrionment 14a remote control
envrionment 15a scarf

Study Design Reference

The intended group contains the 24 participants listed below. P12, P22, earlier pilots, and _template directories exist in data2 but are outside this group. Background (Design / Non-Design) is descriptive metadata and does not affect score calculation.

PIDBackgroundS1 conditionS2 condition
P1DesignEnvironmentalPersonal
P2DesignEnvironmentalPersonal
P3DesignPersonalEnvironmental
P4Non-DesignPersonalEnvironmental
P5Non-DesignEnvironmentalPersonal
P6DesignEnvironmentalPersonal
P7DesignPersonalEnvironmental
P8Non-DesignPersonalEnvironmental
P9Non-DesignEnvironmentalPersonal
P10Non-DesignEnvironmentalPersonal
P11DesignPersonalEnvironmental
P13Non-DesignEnvironmentalPersonal
P14DesignEnvironmentalPersonal
P15Non-DesignPersonalEnvironmental
P16Non-DesignPersonalEnvironmental
P17Non-DesignEnvironmentalPersonal
P18DesignEnvironmentalPersonal
P19Non-DesignPersonalEnvironmental
P20Non-DesignPersonalEnvironmental
P21Non-DesignEnvironmentalPersonal
P23DesignPersonalEnvironmental
P24DesignPersonalEnvironmental
P25DesignPersonalEnvironmental
P26DesignEnvironmentalPersonal