"""Results-only PDF and full-resolution HTML for the integrated learned batch.""" import argparse,io,json from pathlib import Path from PIL import Image,ImageOps from reportlab.pdfgen import canvas from reportlab.lib import colors from reportlab.lib.utils import ImageReader from reportlab.platypus import Table,TableStyle,Paragraph from reportlab.lib.styles import ParagraphStyle ROOT=Path(__file__).resolve().parents[1] parser=argparse.ArgumentParser() parser.add_argument('--input',type=Path,default=ROOT/'private_benchmarks/learned_batch') OUT=parser.parse_args().input rows=json.loads((OUT/'results.json').read_text());by={r['sample']:r for r in rows} W,H=595.28,841.89;M=42 ink=colors.HexColor('#193540');teal=colors.HexColor('#087E80');gray=colors.HexColor('#526975') c=canvas.Canvas(str(OUT/'Real_Iris_Evaluation.pdf'),pagesize=(W,H));c.setTitle('Real Iris Evaluation - 23 September 2026');c.setAuthor('Iris Registration POC') style=ParagraphStyle('body',fontName='Helvetica',fontSize=10,leading=15,textColor=gray) def text(s,x,y,width=511,size=10): p=Paragraph(s,ParagraphStyle('p',parent=style,fontSize=size,leading=size*1.45));_,ht=p.wrap(width,H);p.drawOn(c,x,y-ht);return y-ht def title(s,x,y,size=15): c.setFont('Helvetica-Bold',size);c.setFillColor(ink);c.drawString(x,y,s) def page(name,number): c.setFillColor(teal);c.rect(0,H-8,W,8,fill=1,stroke=0) title('REAL CLIENT IRIS EVALUATION / 23 SEPTEMBER 2026',M,H-43,9) title(name,M,H-88,25) c.setStrokeColor(colors.HexColor('#D8E4E8'));c.line(M,47,W-M,47) text('PRELIMINARY RESULTS - NOT INDEPENDENTLY ACCURACY-VALIDATED',M,34,size=7) text(f'{number} / 4',W-65,34,width=30,size=8) def pic(path,x,top,size,caption): with Image.open(path) as im: im=ImageOps.contain(im.convert('RGB'),(1000,1000));buf=io.BytesIO();im.save(buf,format='JPEG',quality=93);buf.seek(0) c.drawImage(ImageReader(buf),x,top-size,width=size,height=size,preserveAspectRatio=True,anchor='c') text(caption,x,top-size-6,width=size,size=8) page('Measured consistency on six pairs',1) y=text('All six real pairs in the supplied folder were evaluated. Five produce alignment previews requiring review. Sample 1 remains unaligned and its reference is preserved.',M,H-113)-26 title('Automatic consistency within pixel tolerances',M,y,14);y-=18 values=[['Sample','Within 1 px','Within 2 px','Within 3 px','Within 5 px','Verified / proposed']] for row in rows: m=row['metrics'];e=m['evaluation'];p=e['within_px_percent'] values.append([row['sample']]+[f'{p[str(t)]:.2f}%' if p else 'N/A' for t in [1,2,3,5]]+[f"{m['verified_matches']} / {m.get('raw_matches',m['matches'])}"]) t=Table(values,colWidths=[43,77,77,77,77,160],rowHeights=[34]+[34]*6) t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,0),ink),('TEXTCOLOR',(0,0),(-1,0),colors.white),('FONTNAME',(0,0),(-1,0),'Helvetica-Bold'),('FONTNAME',(0,1),(-1,-1),'Helvetica'),('FONTSIZE',(0,0),(-1,-1),9),('VALIGN',(0,0),(-1,-1),'MIDDLE'),('LEFTPADDING',(0,0),(-1,-1),7),('ROWBACKGROUNDS',(0,1),(-1,-1),[colors.white,colors.HexColor('#EFF5F6')])])) _,ht=t.wrap(511,H);t.drawOn(c,M,y-ht);y-=ht+26 for heading,body in [ ('What these percentages mean','Each percentage is the fraction of patch-verified automatic correspondences whose held-out prediction falls within the stated distance. Coordinates are measured in the 2200 x 2200 native-resolution iris crops. The 1, 2, 3 and 5 pixel columns expose the effect of tolerance; none is an agreed production acceptance threshold.'), ('What these percentages do not mean','These are not independently verified anatomical accuracy, whole-iris coverage, or a probability that a finished image is correct. Only a subset of proposed correspondences survived checking. All six pairs have been used during development and automatic method selection; there is no separate unseen validation set. Client-finished images were not used as source pixels.'), ('Remaining limitations','Sample 1 has too little verified evidence to score. The consistency figures depend on pixel tolerance and the verified subset; they do not establish 95% anatomical accuracy. Glare and occlusions remain, and the previews are not finished client composites. Independent landmark review and additional real test pairs are still required.')]: title(heading,M,y,12);y=text(body,M,y-12,size=9.5)-21 c.showPage() for page_no,samples in [(2,['2','3']),(3,['4','5']),(4,['6','1'])]: page('Alignment previews',page_no) y=H-139 for sample in samples: row=by[sample];m=row['metrics'];ok=m['status']!='unaligned' title('Sample '+sample+' / '+('Review required' if ok else 'Not aligned'),M,y,15) text(row['reference']+' + '+row['moving'],M,y-12,size=9) top=y-39;size=160 keys=[('reference','Reference original'),('adjusted','Aligned second image'),('overlay','Alignment overlay')] if ok else [('reference','Reference original'),('moving','Second original')] for i,(key,caption) in enumerate(keys):pic(OUT/sample/(key+'.png'),M+i*175,top,size,caption) bottom=top-size-34 text('Uses source-image detail only. Inspect fine structures at full resolution; reflections and uncertain regions still need review.' if ok else 'Insufficient verified correspondence. No generated replacement or unsupported merge is shown.',M,bottom,size=9) y-=315 c.showPage() c.save() headers=''.join('

{row["reference"]} + {row["moving"]}
Six real pairs; five review previews; one unresolved. No independently validated anatomical accuracy claim. Percentages below measure held-out automatic correspondence consistency on the patch-verified subset. They do not describe whole-iris coverage. Sample 1 is not measurable. Pixel tolerance and the evaluated subset materially affect the percentages. All six are development pairs. Click images for native-resolution PNGs.
Download PDF · Independent landmark review