Releases
v0.0.2
2026-10-22 01:02 UTC
Fair comparison of JEV, Clef-Flash and CLIP with the same labeled images, descriptions from a blind loop, Platt calibration of every method and paired tests, with the analysis document beyond_clip_analysis.qmd.
| ID | Decision | Proposed by | Decided by |
|---|---|---|---|
| D64 | Tag commit 33ffd59 as v0.0.1 (pre-alpha) before any change to the code for the redesign. | Fadel M. Megahed | Fadel M. Megahed |
| D65 | Do the redesign of the experiment and of its presentation on a separate branch (fair-comparison), not on main. | Fadel M. Megahed | Fadel M. Megahed |
| D66 | Write R code in 80 to 90% tidyverse style (stringr for text) and use yardstick for the classification metrics; keep the code simple. | Fadel M. Megahed | Fadel M. Megahed |
| D67 | Calibrate CLIP too, on the same images as the decision models, and test the calibrated CLIP model. | Fadel M. Megahed | Fadel M. Megahed |
| D68 | Report accuracy, balanced accuracy, specificity, sensitivity, precision, F1 and MCC for each method. | Fadel M. Megahed | Fadel M. Megahed |
| D69 | Each method uses one learning set of 50 images per class (pans: 10) and one separate calibration set of 25 images per class; all methods use the same images (option B). | Fadel M. Megahed | Fadel M. Megahed |
| D70 | The learning set of each dataset is its CLIP baseline set (pan_10, extrusion_50, textiles_50, pipe_staple_50, microstructure_50); the references of JEV and Clef-Flash come from it. | Claude Code | Fadel M. Megahed |
| D71 | Compare the methods with paired tests on the same test images. | Claude Code | Fadel M. Megahed |
| D72 | Add detail to the replication record: a timeline, the tags and the results. | Fadel M. Megahed | Fadel M. Megahed |
| D73 | The record is an honest guide to the co-work with Claude Code and shows the intellectual contributions and decisions of the researchers. | Fadel M. Megahed | Fadel M. Megahed |
| D74 | The description loop is blind: its instructions carry no dataset knowledge from the researchers (not the hypotheses of docs/GOAL.md). | Claude Code | Fadel M. Megahed |
| D75 | The 37 back-filled decision rows (D2 to D38) show with the mark "not checked by a person"; fmm checks them before the tag v0.1.0. | Claude Code | Fadel M. Megahed |
| D76 | Approve the design plans/2026-10-20-fair-comparison-design.md, with the Claude calls of its section 13. | Claude Code | Fadel M. Megahed |
| D77 | Approve the plans plans/2026-10-20-record-additions-plan.md and plans/2026-10-20-fair-comparison-plan.md; run their code tasks subagent-driven, and the gated tasks with fmm in the session. | Claude Code | Fadel M. Megahed |
| D78 | Record the execution time of every scoring run (per image and per run, for JEV, Clef-Flash and CLIP) and report time per image for each method in the analysis document. | Fadel M. Megahed | Fadel M. Megahed |
| D79 | Report the cost of each JEV call and configuration: the per-call log already holds tokens and an estimated cost; the analysis document sums it by configuration and per image, and the record compares the logged total with the TypeSafe account after the runs. | Fadel M. Megahed | Fadel M. Megahed |
| D80 | In the interactive tables of the analysis document, stripe the rows by case study (dataset), not row by row. | Fadel M. Megahed | Fadel M. Megahed |
| D81 | Run one fresh, isolated loop agent for each model and dataset (8 agents), each in its own sandbox, started by scripts/fair_run_loop.sh with restricted Claude Code settings (no user settings, plugins, hooks or MCP servers; only Read, Write, Edit, Glob, Grep, Bash and TodoWrite; Bash pre-approved only for the scoring command and simple read commands; model pinned). | Claude Code | Claude Code |
| D82 | Platt calibration may reverse a method whose raw scores run backwards: keep standard Platt, report the Platt slope of every configuration, and mark each reversed configuration in the tables and the text, with its raw AUC next to it. | Claude Code | Fadel M. Megahed |
| D83 | Approve the loop instructions scripts/fair_loop_instructions.md (filled into LOOP.md in each sandbox) as written. | Claude Code | Fadel M. Megahed |
| D84 | Approve up to 50,000 JEV calls for the fair comparison (loops, checks, calibration and test runs); the account holds over USD 20, so the budget row caps the cost at USD 20. This lifts the 7,000-call cap of D26 and the USD 5 budget of D44. | Fadel M. Megahed | Fadel M. Megahed |
| D85 | Freeze the JEV descriptions of the four blind loops: extrusion candidate 3 (design AUC 0.783), textiles candidate 2 (0.991), pipe staple candidate 1, the generic description (0.994), microstructure candidate 2 (0.945). | Claude Code | Claude Code |
| D86 | Freeze the Clef-Flash descriptions of the four blind loops: extrusion candidate 2 (design AUC 0.764), textiles candidate 4 (0.928), pipe staple candidate 2 (0.997), microstructure candidate 3 (0.936). | Claude Code | Claude Code |
| D87 | Run the one-time test runs of every configuration of design section 5.6 (JEV, Clef-Flash) and of the CLIP zero_final variant, after the calibration results. | Claude Code | Fadel M. Megahed |
| D88 | Report the P2 row of JEV pipe staple as the run-to-run variation of JEV. Its final and generic texts are the same, and the two runs gave slightly different probabilities. This corrects the impact statement of D85, which says that this P2 difference is zero. | Claude Code | Claude Code |
| D89 | Keep the test result of CLIP zero_final on textiles as it is, with a flag. All its probabilities are 0.999 or more; the clamp at 0.995 makes the Platt inputs equal, so Platt gives 0.5 to every image. Do not change the calibration code after the test results. | Claude Code | Claude Code |
| D90 | Push the branch fair-comparison and open a pull request to main. The merge waits for the approval of fmm. | Claude Code | Fadel M. Megahed |
| D91 | Merge the pull request #1 (fair-comparison) into main with a merge commit. The branch commits that the ledger and the records name stay on main. | Claude Code | Fadel M. Megahed |
| D92 | Tag the fair comparison as v0.0.2, not v0.1.0. | Fadel M. Megahed | Fadel M. Megahed |
| ID | Result | Value |
|---|---|---|
| H9 | Fair comparison P1: JEV (final description, k = 2; pans generic) against the CLIP baseline (50 learning images per class, pans 10), both with Platt scaling on the same calibration set: much better on pipe staple and pans, equal on extrusion and textiles, slightly lower on microstructure | test balanced accuracy: extrusion 0.750 vs 0.715, textiles 0.965 vs 0.975, pipe staple 0.940 vs 0.570, microstructure 0.902 vs 0.933 (difference -0.031, interval -0.058 to -0.004; Holm p = 0.17), pans 1.000 vs 0.641 |
| H10 | Fair comparison P1: Clef-Flash (final description, k = 2; pans generic) against the CLIP baseline: better on pipe staple and pans, equal on extrusion, lower on textiles and microstructure | test balanced accuracy: extrusion 0.710, textiles 0.840, pipe staple 0.990, microstructure 0.867, pans 0.885 |
| H11 | P2: the description from the blind loop improves the decision models (final against generic, both k = 2) | JEV: extrusion +0.130, textiles +0.145, microstructure +0.147 (Holm p < 0.001 each); Clef-Flash: pipe staple +0.530 (p < 0.001), microstructure +0.064 (p = 0.002), textiles +0.085 and extrusion +0.035 (not significant after Holm) |
| H12 | P3 and the reference curve: two references per class bring most of the gain over none; on pans and pipe staple, the size of the gain depends on the calibration method | JEV, k = 2 minus k = 0: extrusion +0.090, textiles +0.090, pipe staple +0.210, pans +0.231 (Holm p <= 0.018), microstructure +0.013 (not significant); JEV at k = 4 adds at most +0.016 over k = 2; with isotonic regression (sensitivity analysis, metrics.csv): pipe staple +0.440 (the k = 0 side has a negative Platt slope, D82), pans +0.038 |
| H13 | Pans, P1: the CLIP baseline ranks the test images almost perfectly, but Platt scaling on the leave-one-out scores of 10 + 10 images in L sets its threshold too high | CLIP baseline on pans: AUC 0.999; balanced accuracy 0.641 after Platt (isotonic regression gives the same), 0.910 with the raw rule of the CLIP paper |
| H14 | JEV gives slightly different probabilities when it scores the same prompt twice (pipe staple: final and generic texts are the same) | AUC on C 0.983 and 0.979; test sensitivity 0.92 and 0.94, specificity 0.96 and 0.94; balanced accuracy difference 0.000 (-0.030 to 0.030) |
| H15 | Time and cost on the test sets | median time per image: JEV 175 to 290 ms (pans 970 ms), Clef-Flash 173 to 257 ms (pans 1,212 ms, local GPU), CLIP baseline 10 to 13 ms (pans 98 ms, local GPU); 6,012 JEV test calls cost about USD 0.53 |
v0.0.1
2026-10-20 23:32 UTC
Pre-alpha. JEV tuned on validation and tested once; comparison with CLIP and Clef-Flash; calibration; the MSEC 2027 abstract and the replication document.
| ID | Decision | Proposed by | Decided by |
|---|---|---|---|
| D1 | Keep a replication record with the replication-materials skill. | Fadel M. Megahed | Fadel M. Megahed |
| D2 | Make all manifest paths relative to the local imgs/ folder. | Fadel M. Megahed | Fadel M. Megahed |
| D3 | Pin the model to jev-1.13.0 in the runner, because jev-latest can change. | Claude Code | Claude Code |
| D4 | Run batch 1: a baseline and a repeat baseline for microstructure, textiles and extrusion. | Claude Code | Fadel M. Megahed |
| D5 | Freeze 50 validation images per class. | Claude Code | Fadel M. Megahed |
| D6 | Add an opt-in upscale argument (default FALSE) to the JEV client. | Claude Code | Fadel M. Megahed |
| D7 | Set up the replication record after the experiments. | Claude Code | Fadel M. Megahed |
| D8 | Make a panelled progress chart like the autoresearch chart. | Fadel M. Megahed | Fadel M. Megahed |
| D9 | Include center crop and downsizing as experiments to reduce tokens. | Fadel M. Megahed | Fadel M. Megahed |
| D10 | Run the rest of the queue for the three priority datasets, with a cap of 1,000 calls. | Claude Code | Fadel M. Megahed |
| D11 | Judge criteria, reference and size changes by AUC (+0.02) and tune the threshold last. | Claude Code | Fadel M. Megahed |
| D12 | Choose each threshold as the midpoint of the widest run of thresholds with the maximum validation BA. | Claude Code | Claude Code |
| D13 | Tune pipe_staple and pan before one final test of all datasets. | Claude Code | Fadel M. Megahed |
| D14 | Stop pan tuning while its validation images have copies in the test set. | Claude Code | Claude Code |
| D15 | Delete the duplicate pan images from the test folder. | Fadel M. Megahed | Fadel M. Megahed |
| D16 | Raise the paid-call cap to 5,000. | Fadel M. Megahed | Fadel M. Megahed |
| D17 | Delete all files with the word copy in their names. | Fadel M. Megahed | Fadel M. Megahed |
| D18 | Keep a smaller pan image size when it is no worse, because the aim is to save tokens. | Claude Code | Claude Code |
| D19 | Use the bright-clip wording for pipe_staple; at the AUC ceiling, compare BA at tuned thresholds. | Claude Code | Fadel M. Megahed |
| D20 | Match the test sizes of the prior CLIP study, not its few-shot learning sizes. | Fadel M. Megahed | Fadel M. Megahed |
| D21 | Delete pan test image 21.JPG, which the prior test folder does not have. | Claude Code | Fadel M. Megahed |
| D22 | Add the real textile images as a transfer test. | Claude Code | Fadel M. Megahed |
| D23 | Run the one-time final test for the frozen configurations. | Claude Code | Fadel M. Megahed |
| D24 | Run CLIP on the same partition, a zero-shot JEV ablation and a calibration check. | Fadel M. Megahed | Fadel M. Megahed |
| D25 | Give the zero-shot ablation its own validation threshold, with the same rule. | Claude Code | Claude Code |
| D26 | Raise the paid-call cap to 7,000 if needed. | Fadel M. Megahed | Fadel M. Megahed |
| D27 | Run CLIP in a separate, pinned conda environment. | Claude Code | Claude Code |
| D28 | Replicate CLIP with the learning-set size that the CLIP paper reports for each experiment. | Fadel M. Megahed | Fadel M. Megahed |
| D29 | Compare Platt scaling with isotonic regression. | Fadel M. Megahed | Fadel M. Megahed |
| D30 | Drop the real-textile transfer example. | Fadel M. Megahed | Fadel M. Megahed |
| D31 | Exclude copies of test images from the CLIP learning pool. | Claude Code | Claude Code |
| D32 | Wait with the repository, because the scope and name can change with Clef-Flash. | Fadel M. Megahed | Fadel M. Megahed |
| D33 | Back-fill the decisions of this session into the record. | Claude Code | Fadel M. Megahed |
| D34 | Run Clef-Flash locally with the same protocol. | Claude Code | Fadel M. Megahed |
| D35 | Delete only the extrusion pool frames that copy test frames. | Claude Code | Fadel M. Megahed |
| D36 | Send images to Clef-Flash as an ordered list with a text legend, because its SystemOne server ignores TypeSafe assets. | Claude Code | Claude Code |
| D37 | Submit the MSEC 2027 title and abstract in the rewrite of the owner. | Fadel M. Megahed | Fadel M. Megahed |
| D38 | Add Ying-Ju (Tessa) Chen as a co-author. | Fadel M. Megahed | Fadel M. Megahed |
| D39 | Name the R package decisionqc and the research repository decision-models-for-industrial-image-qc. | Claude Code | Fadel M. Megahed |
| D40 | Organize the repository before the first push. | Fadel M. Megahed | Fadel M. Megahed |
| D41 | Make the research repository public, so the record website works on the free plan. | Claude Code | Fadel M. Megahed |
| D42 | License the repository under MIT. | Claude Code | Fadel M. Megahed |
| D43 | Cite the CLIP study as the 2026 Journal of Quality Technology article, which is open access. | Fadel M. Megahed | Fadel M. Megahed |
| D44 | Set the JEV budget to about USD 5, the free credit for a new user. | Fadel M. Megahed | Fadel M. Megahed |
| D45 | Use APA 7 style for citations, with the published metadata of each work. | Fadel M. Megahed | Fadel M. Megahed |
| D46 | Use short, direct section headers in all documents. | Fadel M. Megahed | Fadel M. Megahed |
| D47 | Make one Quarto document that reproduces all paper figures and tables; it reads saved predictions by default and has switches to re-run the paid and GPU steps. | Claude Code | Fadel M. Megahed |
| D48 | Produce tables T1 to T7, figures F1 to F7 and the appendix table of all trials. | Claude Code | Fadel M. Megahed |
| D49 | Use theme_bw with Dark2, annotations and a polished font; save each figure as PNG, PDF and SVG in one-column and two-column sizes. | Claude Code | Fadel M. Megahed |
| D50 | Use Outfit for figure titles and Cabin for all other figure text. | Fadel M. Megahed | Fadel M. Megahed |
| D51 | Name groups in their chart color in the subtitle (ggtext) in place of a legend. | Fadel M. Megahed | Fadel M. Megahed |
| D52 | Round reported numbers half up (0.725 to 0.73), as in the submitted abstract, because floating point makes round() and sprintf() give 0.72. | Claude Code | Claude Code |
| D53 | Show all tables of the replication document as interactive DT tables; keep the CSV and LaTeX files for the paper. | Fadel M. Megahed | Fadel M. Megahed |
| D54 | In figures F3 and F4, give each method its own row or column, with larger points and no vertical nudging. | Fadel M. Megahed | Fadel M. Megahed |
| D55 | Publish figure F1 with its image sources on the figure; its AutoVI (pipe staple) tiles stay under CC BY-NC-SA 4.0. | Fadel M. Megahed | Fadel M. Megahed |
| D56 | Keep beyond_clip_analysis.html in the repository and show it on the record website as an extra page (replication-materials 1.1.0). | Fadel M. Megahed | Fadel M. Megahed |
| D57 | Put "(Few-Shot)" in parentheses in the title: Beyond CLIP: Calibrated (Few-Shot) Defect Detection With Structured Decision Models. | Fadel M. Megahed | Fadel M. Megahed |
| D58 | Also report CLIP with the learning sets of the CLIP paper at a threshold tuned like ours, next to the rule of that paper. | Fadel M. Megahed | Fadel M. Megahed |
| D59 | Tune that CLIP threshold by leave-one-out on the learning set (identical frames left out together), because the learning sets hold most of our validation images (all 16 for pans). | Claude Code | Claude Code |
| D60 | In the interactive T4, mark each JEV and Clef-Flash result against the best CLIP result on the same dataset: up, level or down at a margin of 0.02 balanced accuracy. | Fadel M. Megahed | Claude Code |
| D61 | Record the R packages in an renv lockfile (renv.lock) without activating renv in the project, because the project folder is in Dropbox. | Fadel M. Megahed | Claude Code |
| D62 | The benchmark is a CLIP baseline with 50 learning images per class (pans: 10), the low end of the abstract of the CLIP paper, with the defect images split evenly over the defect types; it replaces the best CLIP result as the reference of the glyphs, and the other columns stay. | Fadel M. Megahed | Fadel M. Megahed |
| D63 | Add a dot-chart column to the interactive T4: one row per method, balanced accuracy on a common axis, dashed line at the CLIP baseline (inline SVG, no script). | Fadel M. Megahed | Fadel M. Megahed |
| ID | Result | Value |
|---|---|---|
| H1 | JEV with 2 to 4 references: test balanced accuracy on the five datasets | 0.73 to 1.00 (pans 1.00, extrusion 0.73, textiles 0.86, pipe staple 0.98, microstructure 0.92) |
| H2 | JEV against CLIP with the same references: equal or better on all five datasets | microstructure equal (0.92 and 0.92); JEV better on the other four |
| H3 | JEV against CLIP with the learning sets of the CLIP paper (20 to 700 labeled images): JEV better on three datasets, CLIP slightly better on two | pipe staple 0.98 vs 0.57, pans 1.00 vs 0.91, microstructure 0.92 vs 0.85; textiles 0.86 vs 0.975, extrusion 0.73 vs 0.82 |
| H4 | Calibration of the JEV probabilities on the test sets | raw ECE 0.11 to 0.23; isotonic regression 0.01 to 0.04 on four of the five datasets |
| H5 | Clef-Flash with the frozen JEV configurations: test balanced accuracy | 0.68 to 0.99 |
| H6 | Benchmark of the analysis document: the best CLIP result on the test set for each dataset | pans 0.94, extrusion 0.83, textiles 0.98, pipe staple 0.61, microstructure 0.96 |
| H7 | JEV with references against the CLIP baseline (50 learning images per class, pans 10; rule of the CLIP paper): JEV higher on four datasets, lower on textiles | pans 1.00 vs 0.91, extrusion 0.73 vs 0.70, textiles 0.86 vs 0.98, pipe staple 0.98 vs 0.57, microstructure 0.92 vs 0.84 |
| H8 | Validation size (JEV with references): test balanced accuracy settles at about 10 to 20 validation images per class; the calibration error keeps falling up to 50 | mean test balanced accuracy at 20 and at 50 per class: extrusion 0.726 and 0.725, textiles 0.848 and 0.855, pipe staple 0.991 and 0.980, microstructure 0.920 and 0.920 (pans have 8 per class only) |