Spaces:
Running
Running
Publish PixelWorld-style image editing dashboard
Browse filesFiles changed (7)
1[{"time": 1795960418.8347867, "rows": 46}, {"time": 1795970794.4970958, "rows": 223}, {"time": 1796016589.727462, "rows": 972}, {"time": 1796016643.1938415, "rows": 974}, {"time": 1796016681.0278246, "rows": 976}, {"time": 1796016742.250352, "rows": 977}, {"time": 1796017054.9451861, "rows": 979}, {"time": 1796017162.2105708, "rows": 981}, {"time": 1796017570.202842, "rows": 985}, {"time": 1796017638.250147, "rows": 988}, {"time": 1796017663.6860976, "rows": 989}, {"time": 1796017772.2532384, "rows": 989}, {"time": 1796017942.5891643, "rows": 989}, {"time": 1796018255.4165354, "rows": 991}, {"time": 1796018566.7773194, "rows": 993}, {"time": 1796018765.400266, "rows": 995}, {"time": 1796019169.9715514, "rows": 997}, {"time": 1796019433.673293, "rows": 998}, {"time": 1796019855.7426317, "rows": 998}, {"time": 1796024346.6752627, "rows": 999}, {"time": 1796030969.611076, "rows": 999}, {"time": 1796031198.0051932, "rows": 999}, {"time": 1796031624.2434008, "rows": 1000}, {"time": 1796031914.9511704, "rows": 1000}, {"time": 1796032459.722046, "rows": 1000}, {"time": 1796032777.5843792, "rows": 1001}, {"time": 1796033192.0444176, "rows": 1001}, {"time": 1796034202.6556056, "rows": 1003}, {"time": 1796034510.9101176, "rows": 1005}, {"time": 1796034769.1179934, "rows": 1006}, {"time": 1796035159.2727737, "rows": 1009}, {"time": 1796035467.37726, "rows": 1011}, {"time": 1796035763.296109, "rows": 1014}, {"time": 1796036142.3708885, "rows": 1016}, {"time": 1796036469.3096437, "rows": 1019}, {"time": 1796036792.5422156, "rows": 1019}, {"time": 1796037099.4546485, "rows": 1020}, {"time": 1796037360.7194316, "rows": 1020}, {"time": 1796037469.3314764, "rows": 1020}, {"time": 1796037941.924832, "rows": 1021}, {"time": 1796040666.0974362, "rows": 1021}, {"time": 1796041006.4131265, "rows": 1021}, {"time": 1796041384.3100429, "rows": 1021}, {"time": 1796041701.4487557, "rows": 1021}, {"time": 1796041954.9790654, "rows": 1021}, {"time": 1796042253.8858135, "rows": 1021}, {"time": 1796042509.6923103, "rows": 1021}, {"time": 1796042741.3147557, "rows": 1021}, {"time": 1796043257.0270288, "rows": 1021}, {"time": 1796043609.1735191, "rows": 1022}, {"time": 1796044583.3911927, "rows": 1022}, {"time": 1796045095.203487, "rows": 1023}, {"time": 1796045429.2659698, "rows": 1023}, {"time": 1796045706.2223814, "rows": 1023}, {"time": 1796046822.985169, "rows": 1023}, {"time": 1796047772.4128573, "rows": 1024}, {"time": 1796047791.5510833, "rows": 1024}, {"time": 1796048072.404893, "rows": 1024}, {"time": 1796048420.7276282, "rows": 1024}, {"time": 1796048800.2545717, "rows": 1026}, {"time": 1796048913.6754222, "rows": 1026}, {"time": 1796049812.0579016, "rows": 1027}, {"time": 1796050125.4024658, "rows": 1027}, {"time": 1796050497.9449797, "rows": 1029}, {"time": 1796050733.4899848, "rows": 1029}, {"time": 1796050887.399322, "rows": 1029}, {"time": 1796051515.307925, "rows": 1032}, {"time": 1796051651.4160562, "rows": 1033}, {"time": 1796051841.3488133, "rows": 1033}, {"time": 1796052182.054691, "rows": 1034}, {"time": 1796052501.046762, "rows": 1035}, {"time": 1796052849.4887679, "rows": 1035}, {"time": 1796053163.2362828, "rows": 1038}, {"time": 1796053316.038486, "rows": 1038}, {"time": 1796053433.6375086, "rows": 1038}, {"time": 1796053849.6498263, "rows": 1041}, {"time": 1796054118.9319148, "rows": 1042}, {"time": 1796054177.3346908, "rows": 1042}, {"time": 1796054486.5497475, "rows": 1044}, {"time": 1796054644.9093723, "rows": 1044}, {"time": 1796055375.558106, "rows": 1044}, {"time": 1796055812.6809855, "rows": 1045}, {"time": 1796056241.3804283, "rows": 1046}, {"time": 1796056542.4334998, "rows": 1047}, {"time": 1796056756.4708312, "rows": 1047}, {"time": 1796057454.68612, "rows": 1049}, {"time": 1796058381.9672425, "rows": 1051}, {"time": 1796059407.4857268, "rows": 1054}, {"time": 1796060877.7312903, "rows": 1056}, {"time": 1796061104.4675674, "rows": 1057}, {"time": 1796061327.567683, "rows": 1057}, {"time": 1796061754.120682, "rows": 1058}, {"time": 1796062288.442848, "rows": 1058}, {"time": 1796062732.011178, "rows": 1060}, {"time": 1796063332.365712, "rows": 1066}, {"time": 1796063612.6583083, "rows": 1066}, {"time": 1796063773.8864963, "rows": 1067}, {"time": 1796063984.4840164, "rows": 1068}]1[{"time": 1795960418.8347867, "rows": 46}, {"time": 1795970794.4970958, "rows": 223}, {"time": 1796016589.727462, "rows": 972}, {"time": 1796016643.1938415, "rows": 974}, {"time": 1796016681.0278246, "rows": 976}, {"time": 1796016742.250352, "rows": 977}, {"time": 1796017054.9451861, "rows": 979}, {"time": 1796017162.2105708, "rows": 981}, {"time": 1796017570.202842, "rows": 985}, {"time": 1796017638.250147, "rows": 988}, {"time": 1796017663.6860976, "rows": 989}, {"time": 1796017772.2532384, "rows": 989}, {"time": 1796017942.5891643, "rows": 989}, {"time": 1796018255.4165354, "rows": 991}, {"time": 1796018566.7773194, "rows": 993}, {"time": 1796018765.400266, "rows": 995}, {"time": 1796019169.9715514, "rows": 997}, {"time": 1796019433.673293, "rows": 998}, {"time": 1796019855.7426317, "rows": 998}, {"time": 1796024346.6752627, "rows": 999}, {"time": 1796030969.611076, "rows": 999}, {"time": 1796031198.0051932, "rows": 999}, {"time": 1796031624.2434008, "rows": 1000}, {"time": 1796031914.9511704, "rows": 1000}, {"time": 1796032459.722046, "rows": 1000}, {"time": 1796032777.5843792, "rows": 1001}, {"time": 1796033192.0444176, "rows": 1001}, {"time": 1796034202.6556056, "rows": 1003}, {"time": 1796034510.9101176, "rows": 1005}, {"time": 1796034769.1179934, "rows": 1006}, {"time": 1796035159.2727737, "rows": 1009}, {"time": 1796035467.37726, "rows": 1011}, {"time": 1796035763.296109, "rows": 1014}, {"time": 1796036142.3708885, "rows": 1016}, {"time": 1796036469.3096437, "rows": 1019}, {"time": 1796036792.5422156, "rows": 1019}, {"time": 1796037099.4546485, "rows": 1020}, {"time": 1796037360.7194316, "rows": 1020}, {"time": 1796037469.3314764, "rows": 1020}, {"time": 1796037941.924832, "rows": 1021}, {"time": 1796040666.0974362, "rows": 1021}, {"time": 1796041006.4131265, "rows": 1021}, {"time": 1796041384.3100429, "rows": 1021}, {"time": 1796041701.4487557, "rows": 1021}, {"time": 1796041954.9790654, "rows": 1021}, {"time": 1796042253.8858135, "rows": 1021}, {"time": 1796042509.6923103, "rows": 1021}, {"time": 1796042741.3147557, "rows": 1021}, {"time": 1796043257.0270288, "rows": 1021}, {"time": 1796043609.1735191, "rows": 1022}, {"time": 1796044583.3911927, "rows": 1022}, {"time": 1796045095.203487, "rows": 1023}, {"time": 1796045429.2659698, "rows": 1023}, {"time": 1796045706.2223814, "rows": 1023}, {"time": 1796046822.985169, "rows": 1023}, {"time": 1796047772.4128573, "rows": 1024}, {"time": 1796047791.5510833, "rows": 1024}, {"time": 1796048072.404893, "rows": 1024}, {"time": 1796048420.7276282, "rows": 1024}, {"time": 1796048800.2545717, "rows": 1026}, {"time": 1796048913.6754222, "rows": 1026}, {"time": 1796049812.0579016, "rows": 1027}, {"time": 1796050125.4024658, "rows": 1027}, {"time": 1796050497.9449797, "rows": 1029}, {"time": 1796050733.4899848, "rows": 1029}, {"time": 1796050887.399322, "rows": 1029}, {"time": 1796051515.307925, "rows": 1032}, {"time": 1796051651.4160562, "rows": 1033}, {"time": 1796051841.3488133, "rows": 1033}, {"time": 1796052182.054691, "rows": 1034}, {"time": 1796052501.046762, "rows": 1035}, {"time": 1796052849.4887679, "rows": 1035}, {"time": 1796053163.2362828, "rows": 1038}, {"time": 1796053316.038486, "rows": 1038}, {"time": 1796053433.6375086, "rows": 1038}, {"time": 1796053849.6498263, "rows": 1041}, {"time": 1796054118.9319148, "rows": 1042}, {"time": 1796054177.3346908, "rows": 1042}, {"time": 1796054486.5497475, "rows": 1044}, {"time": 1796054644.9093723, "rows": 1044}, {"time": 1796055375.558106, "rows": 1044}, {"time": 1796055812.6809855, "rows": 1045}, {"time": 1796056241.3804283, "rows": 1046}, {"time": 1796056542.4334998, "rows": 1047}, {"time": 1796056756.4708312, "rows": 1047}, {"time": 1796057454.68612, "rows": 1049}, {"time": 1796058381.9672425, "rows": 1051}, {"time": 1796059407.4857268, "rows": 1054}, {"time": 1796060877.7312903, "rows": 1056}, {"time": 1796061104.4675674, "rows": 1057}, {"time": 1796061327.567683, "rows": 1057}, {"time": 1796061754.120682, "rows": 1058}, {"time": 1796062288.442848, "rows": 1058}, {"time": 1796062732.011178, "rows": 1060}, {"time": 1796063332.365712, "rows": 1066}, {"time": 1796063612.6583083, "rows": 1066}, {"time": 1796063773.8864963, "rows": 1067}, {"time": 1796063984.4840164, "rows": 1068}, {"time": 1796064275.0524974, "rows": 1070}, {"time": 1796064465.3957152, "rows": 1071}]
12345678910112 unmodified lines1415161718192015 unmodified lines36373839404142389 unmodified lines432433434435436437508 unmodified lines94694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019100 unmodified lines11201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160222 unmodified lines1383138413851386138713881389139013911392139313943 unmodified lines13981399140014011402140314043030 unmodified lines4435443644374438443944404441444244434444444544464447233 unmodified lines468146824683468446854686468755 unmodified lines4743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547661 unmodified line476847694770477147724773477494 unmodified lines48694870487148724873487448754876487748784879488048814882488348842 unmodified lines4887488848894890489148924893489448954896489748984899490049014902280 unmodified lines51835184518551865187518851895190519151925193519451955196519751985199520036 unmodified lines523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272343 unmodified lines56165617561856195620562156226 unmodified lines5629563056315632563356345635563656375638563956401 unmodified line5642564356445645564656475648{"updated": "2026-11-30T18:39:54.391159+00:00","production_updated": 1796063984.4840164,"production": {"rows": 1068,"rft": 893,"ti": 175,"attempts": 4180,"final_qualified": 0,"workers": 8,"active": true,2 unmodified lines},"teachers": {"GPT-6.2-Sol": {"rft": 608,"ti": 114},"GPT-6.1-Sol": {15 unmodified lines"rft": 122},"anyedit": {"rft": 190,"ti": 19}},389 unmodified lines{"time": 1796063984.4840164,"rows": 1068}],"models": [508 unmodified lines],"training_cases": [{"id": "ultraedit_11035__rft_paper5","teacher": "GPT-6.2-Sol","mode": "rft","source_name": "ultraedit","source": "paper_assets/e9/e91299a7977a16d7ced4.jpg","output": "paper_assets/1e/1e60720d502be457dff1.jpg","instruction": "Replace the pizzas with exotic fruit platters","code": "def edit(image):\n from PIL import Image, ImageDraw, ImageFilter, ImageChops\n import numpy as np\n import cv2\n import math\n import random\n\n src = image.convert('RGB')\n w, h = image.size\n S = 4\n N = 512 * S\n full = (N, N)\n rng = random.Random(141)\n noise = np.random.default_rng(713)\n tau = 2 * math.pi\n aacos = math.cos\n ssin = math.sin\n L = Image.Resampling.LANCZOS\n\n def make_platter(cx, cy, sx, sy, distant=False):\n art = Image.new('RGBA', full)\n clip = Image.new('L', full)\n\n def xy(x,y):\n return (round((cx + sx*x)*S), round((cy + sy*y)*S))\n\n def points(poly):\n return [xy(x,y) for x,y in poly]\n\n def oval(x,y,rx,ry,ang=0,n=64):\n ca, sa = aacos(ang), ssin(ang)\n return [(x+rx*aacos(t*tau/n)*ca-ry*ssin(t*tau/n)*sa,\n y+rx*aacos(t*tau/n)*sa+ry*ssin(t*tau/n)*ca) for t in range(n)]\n\n def solid(poly, col):\n ImageDraw.Draw(art).polygon(points(poly), fill=tuple(col)+(255,))\n\n def dot(x,y,rx,ry,col,ang=0):\n solid(oval(x,y,rx,ry,ang,12),col)\n\n def stroke(poly,col,width):\n ImageDraw.Draw(art).line(points(poly), fill=tuple(col)+(255,), width=max(1,round(width*S*min(sx,sy))))\n\n def paint(poly,col,grad=22,grain=4):\n p = points(poly)\n x0 = max(0,min(x for x,y in p)); x1 = min(N,max(x for x,y in p)+1)\n y0 = max(0,min(y for x,y in p)); y1 = min(N,max(y for x,y in p)+1)\n bw,bh = x1-x0,y1-y0\n if bw<1 or bh<1:\n return\n m = Image.new('L',(bw,bh))\n ImageDraw.Draw(m).polygon([(x-x0,y-y0) for x,y in p],fill=255)\n v,u = np.ogrid[0:bh,0:bw].astype(np.float32) if False else (np.linspace(0,1,bh,dtype=np.float32)[:,None],np.linspace(0,1,bw,dtype=np.float32)[None,:])\n coarse = cv2.resize(noise.normal(0,1,(6,9)).astype(np.float32),(bw,bh),interpolation=cv2.INTER_CUBIC)\n t = grad*(0.56-0.34*u-0.91*v+0.23*np.exp(-8*((u-.29)**2+(v-.24)**2)))\n t = t + grain*(.68*coarse+.33*noise.standard_normal((bh,bw)))\n rgb = np.clip(np.array(col)[None,None,:]+t[:,:,None],0,255).astype(np.uint8)\n art.paste(Image.fromarray(rgb).convert('RGBA'),(x0,y0),m)\n\n def cast(poly,opacity,blur,inside=True):\n p=points(poly)\n r=max(.7,blur*S*(sx+sy)/2)\n margin=int(3*r)+3\n x0=max(0,min(x for x,y in p)-margin); x1=min(N,max(x for x,y in p)+margin+1)\n y0=max(0,min(y for x,y in p)-margin); y1=min(N,max(y for x,y in p)+margin+1)\n m=Image.new('L',(x1-x0,y1-y0))\n ImageDraw.Draw(m).polygon([(x-x0,y-y0) for x,y in p],fill=opacity)\n m=m.filter(ImageFilter.GaussianBlur(r))\n if inside:\n m=ImageChops.multiply(m,clip.crop((x0,y0,x1,y1)))\n shade=Image.new('RGBA',m.size,(56,36,33,0)); shade.putalpha(m)\n art.alpha_composite(shade,(x0,y0))\n\n def tray(rx,ry,dy=0):\n out=[]\n for j in range(150):\n t=tau*j/150\n c,s=aacos(t),ssin(t)\n x=rx*math.copysign(abs(c)**.66,c)\n y=ry*math.copysign(abs(s)**.70,s)+dy+.012*x\n out.append((x,y))\n return out\n\n cast(tray(109,39,6),99,2.3,False)\n paint(tray(109,40,3.8),(107,111,108),34,2)\n paint(tray(110,40,1.7),(176,182,176),30,2)\n paint(tray(110,39.4,-.4),(222,221,210),28,1.5)\n paint(tray(104.5,35.4,-.8),(164,174,165),25,1.8)\n inner=tray(101.8,33.5,.25)\n paint(inner,(201,204,184),20,2)\n ImageDraw.Draw(clip).polygon(points(tray(107,37.3)),fill=255)\n\n def kiwi(x,y,rx,ry,a):\n cast(oval(x+1,y+3,rx+1,ry+1,a),68,1.5)\n ca,sa=aacos(a),ssin(a)\n def q(u,v): return x+u*ca-v*sa,y+u*sa+v*ca\n paint(oval(x,y+2.8,rx,ry,a),(111,91,51),35,7)\n paint(oval(x,y,rx,ry,a),(133,118,68),24,5)\n paint(oval(x,y,rx*.93,ry*.89,a),(151,176,65),34,6)\n paint(oval(x-.15,y-.1,rx*.77,ry*.71,a),(166,190,79),25,6)\n for i in range(34):\n t=tau*i/34+rng.uniform(-.06,.06)\n c,s=aacos(t),ssin(t)\n r=rng.uniform(.74,.9)\n stroke([q(rx*.18*c,ry*.19*s),q(rx*r*c,ry*r*s)],rng.choice([(184,200,105),(199,209,127),(145,170,59)]),rng.uniform(.24,.55))\n r=rng.uniform(.38,.57)\n px,py=q(rx*r*c,ry*r*s)\n dot(px,py,rng.uniform(.36,.64),rng.uniform(.23,.43),(51,51,33),t+a)\n paint(oval(x-.3,y-.25,rx*.23,ry*.25,a),(216,220,153),13,3)\n\n def mango(x,y):\n cast(oval(x+1,y+5,31,16,-.11),93,2.1)\n paint(oval(x,y+4,30,13,-.13),(167,89,39),37,7)\n paint(oval(x,y+1,29,12.5,-.13),(221,137,45),27,5)\n for j in range(4):\n v=(j-1.5)*5.35\n for i in range(6):\n u=(i-2.5)*8.94\n if abs(u)>20 and abs(v)>7: continue\n px=x+u+.14*v+rng.uniform(-.65,.65)\n py=y+v-.11*u+rng.uniform(-.6,.6)\n height=3.4+4.8*max(0,1-(u/31)**2-(v/13)**2)+rng.uniform(-.8,.8)\n left=4.05+rng.uniform(-.35,.35); d=2.55+rng.uniform(-.22,.22)\n top=[(px-left-.5,py-d-height+.5),(px+left-1,py-d-height-.35),(px+left+.6,py+d-height-.5),(px-left+.4,py+d-height+.45)]\n p,q,r,s=top\n paint([q,r,(r[0]+.35,r[1]+height),(q[0]+.2,q[1]+height)],(202+rng.randrange(17),121+rng.randrange(24),25),19,3)\n paint([s,r,(r[0]+.35,r[1]+height),(s[0]-.1,s[1]+height)],(223+rng.randrange(18),147+rng.randrange(22),31+rng.randrange(11)),29,4)\n paint(top,(244+rng.randrange(10),180+rng.randrange(29),52+rng.randrange(20)),21,4)\n\n def papaya(x,y,rx,ry,a):\n ca,sa=aacos(a),ssin(a)\n def q(u,v): return (x+u*ca-v*sa,y+u*sa+v*ca)\n def boat(k,depth=0):\n p=[]\n for i in range(75):\n t=tau*i/75; c=aacos(t)\n xx,yy=q(rx*k*c,ry*k*ssin(t)*(1+.25*c))\n p.append((xx,yy+depth))\n return p\n cast(boat(1.05,5),95,2.0)\n paint(boat(1,5.5),(170,117,45),40,7)\n paint(boat(1,2),(220,144,46),38,6)\n paint(boat(.965),(241,153,57),38,5)\n paint(boat(.87),(242,137,52),39,6)\n px,py=q(2.3,.2)\n paint(oval(px,py,rx*.60,ry*.54,a),(193,93,36),40,7)\n paint(oval(px+.2,py,rx*.55,ry*.43,a),(116,65,33),22,6)\n kernels=[]\n for k in range(65):\n ang=rng.uniform(0,tau); r=math.sqrt(rng.random())\n kernels.append((2.4+rx*.525*r*aacos(ang),ry*.39*r*ssin(ang)))\n for u,v in sorted(kernels,key=lambda p:p[1]):\n xx,yy=q(u,v); rad=rng.uniform(.62,1.40)\n dot(xx,yy+.23,rad,rad*.69,(66,42,32),.18)\n dot(xx,yy-.1,rad*.85,rad*.60,rng.choice([(69,55,48),(85,62,47),(60,48,44),(76,58,46)]),.18)\n if rng.random()<.65:\n dot(xx-rad*.25,yy-rad*.27,rad*.26,rad*.16,(136,112,89))\n\n def dragon(x,y,rx,ry,a):\n ca,sa=aacos(a),ssin(a)\n def q(u,v): return (x+u*ca-v*sa,y+u*sa+v*ca)\n cast(oval(x+1,y+5,rx+1,ry+1,a),86,1.55)\n paint(oval(x,y+3.7,rx,ry,a),(161,47,80),41,6)\n for j in range(9):\n t=.10+(math.pi-.19)*j/8\n u,v=rx*aacos(t),ry*ssin(t)\n p=q(u*.88,v*.84+1.6); z=q(u*.995+1,v+4.8+rng.uniform(0,1.2)); r=q(u*.81+2.2,v*.98+2.9)\n paint([p,z,r],rng.choice([(184,67,97),(202,82,108),(166,86,78),(149,129,65)]),30,4)\n paint(oval(x,y,rx,ry,a),(199,64,117),31,5)\n paint(oval(x-.2,y-.22,rx*.913,ry*.88,a),(224,125,152),28,4)\n paint(oval(x-.35,y-.24,rx*.85,ry*.76,a),(236,227,216),21,3.6)\n for k in range(int(rx*4.4)):\n t=rng.uniform(0,tau); r=math.sqrt(rng.random())\n xx,yy=q(rx*.816*r*aacos(t),ry*.723*r*ssin(t))\n rr=rng.uniform(.27,.66)\n dot(xx,yy,rr,rr*rng.uniform(.44,.78),rng.choice([(54,48,46),(71,61,57),(100,86,82),(61,54,52)]),rng.uniform(-.85,.85))\n\n def passion(x,y,rx,ry,a):\n cast(oval(x+1,y+5.7,rx+1,ry+1,a),89,1.7)\n paint(oval(x,y+3.5,rx*.98,ry*1.06,a),(112,57,72),36,6)\n paint(oval(x,y,rx,ry,a),(150,83,102),26,5)\n paint(oval(x-.13,y-.2,rx*.88,ry*.84,a),(221,192,151),25,4)\n paint(oval(x-.18,y+.28,rx*.73,ry*.64,a),(201,129,40),22,6)\n ca,sa=aacos(a),ssin(a)\n for i in range(34):\n t=rng.uniform(0,tau); r=math.sqrt(rng.random()); u=rx*.685*r*aacos(t); v=ry*.57*r*ssin(t)\n xx=x+u*ca-v*sa; yy=y+u*sa+v*ca+.2\n d=rng.uniform(.63,1.7)\n dot(xx,yy,d,d*.66,rng.choice([(229,153,48),(239,171,56),(232,185,79),(217,143,44)]),t)\n dot(xx+.12,yy+.16,d*.42,d*.26,(105,78,42),t)\n if i%3==0: dot(xx-.30,yy-.34,d*.39,d*.19,(250,210,119),t)\n\n def star(x,y,rx,ry,a):\n ca,sa=aacos(a),ssin(a)\n def q(u,v): return (x+u*ca-v*sa,y+u*sa+v*ca)\n def outline(k,d=0):\n result=[]\n for i in range(95):\n t=tau*i/95\n r=k*(.71+.30*aacos(5*(t+.29)))\n u,v=q(rx*r*aacos(t),ry*r*ssin(t))\n result.append((u,v+d))\n return result\n cast(outline(1.05,3.7),73,1.35)\n paint(outline(1,2.8),(171,141,55),29,5)\n paint(outline(1),(179,170,71),30,4)\n paint(outline(.91),(230,199,90),27,5)\n for j in range(5):\n t=tau*j/5-.29\n c,s=aacos(t),ssin(t)\n stroke([q(rx*.19*c,ry*.19*s),q(rx*.39*c,ry*.39*s),q(rx*.79*c,ry*.79*s)],(235,211,122),.55)\n if j in (0,2,3):\n u,v=q(rx*.26*c,ry*.25*s)\n dot(u,v,1.0,.51,(155,117,59),t)\n\n if not distant:\n kiwi(-66,-25,15.6,7.7,-.14)\n kiwi(-50,-25,15,7.2,.12)\n kiwi(-57,-17,15.5,7.7,.21)\n mango(-7,-22)\n passion(28,-24,14.4,7.7,-.17)\n dragon(62,-20,23.5,10.9,-.19)\n dragon(57,-6,24.4,11.4,.16)\n papaya(-62,0,36.5,12.4,.15)\n star(82,4,15,8.5,-.22)\n passion(-7,5,16,8.1,-.12)\n star(70,12,18,9.3,.13)\n passion(-19,15,15.6,8.6,.16)\n kiwi(-43,18,15.6,7.6,-.16)\n star(54,20,17,8.6,-.05)\n dragon(20,19.5,22.5,10,-.13)\n else:\n kiwi(-68,-19,18,9,-.2)\n mango(-18,-20)\n dragon(47,-19,25,12,.13)\n papaya(-55,4,37,13,-.11)\n passion(8,4,19,10,.12)\n star(79,0,16,10,-.21)\n dragon(48,13,26,10,-.13)\n kiwi(-24,23,16,7.2,.15)\n\n small = art.resize((512,512),L)\n raw = np.asarray(small,dtype=np.float32)/255.\n raw[:,:,:3] *= raw[:,:,3:4]\n raw = cv2.GaussianBlur(raw,(0,0),.61 if distant else .47)\n raw[:,:,:3] /= np.maximum(raw[:,:,3:4],.00001)\n return Image.fromarray(np.uint8(np.clip(raw*255+.5,0,255)),'RGBA')\n\n front = make_platter(279,381,1,1)\n back = make_platter(305.5,184,.394,.236,True)\n old_front=[(168,367),(173,357),(184,348),(204,341),(223,337),(245,332),(268,330),(300,331),(326,333),(351,337),(370,343),(380,352),(386,364),(386,380),(387,396),(387,407),(374,415),(350,420),(321,423),(288,425),(253,425),(218,425),(186,424),(176,420),(172,410),(170,398),(168,386)]\n old_back=[(260,184),(267,180),(280,177),(298,175),(319,174),(338,174),(347,177),(351,181),(347,186),(337,190),(318,193),(295,194),(276,193),(266,190)]\n removal = Image.new('L',(w,h))\n pen = ImageDraw.Draw(removal)\n for outline in (old_front,old_back):\n pen.polygon([(round(x*w/512),round(y*h/512)) for x,y in outline],fill=255)\n pix=np.asarray(src)\n fixed=cv2.inpaint(pix,np.asarray(removal),max(1.4,3.4*min(w,h)/512),cv2.INPAINT_TELEA)\n softened=removal.filter(ImageFilter.GaussianBlur(max(.3,.66*min(w,h)/512)))\n base=Image.composite(Image.fromarray(fixed),src,softened).convert('RGBA')\n base.alpha_composite(back.resize((w,h),L))\n base.alpha_composite(front.resize((w,h),L))\n return base.convert('RGB')","scores": {"instruction_adherence": 5,"preservation": 5,"visual_quality": 4,"target_extent_score": 5,"target_extent_complete": true,"pass": true,"reason": "The visible pizzas on the table have been replaced with fruit platters, including the large foreground pizza and the smaller one farther back. The edit is localized to the requested objects with no meaningful changes to people or the surrounding restaurant scene. The fruit platters are somewhat synthetic-looking but visually coherent enough.","rubric_version": "full_visible_target_v1","annotated_target_box": null,"difference_evidence": {"scope": "full_image","changed_pixel_fraction": 0.08348846435546875,"mean_absolute_rgb_delta": 4.89117956161499,"mean_signed_rgb_delta": 3.570368528366089,"mean_delta_among_changed_pixels": 58.58509063720703,"changed_pixels_outside_box": null},"judge_evidence_version": "aligned_rgb_delta_v1","raw_reward": 0.9749999999999999,"reward": 0.9749999999999999,"reward_eligible": true,"reward_version": "semantic_gates_v3_extent"},"time": 1796063924.1980703},{"id": "ultraedit_2999__rft_paper5","teacher": "GPT-6.2-Sol","mode": "rft","source_name": "ultraedit","source": "paper_assets/a6/a6500e322ad52481e6dc.jpg","output": "paper_assets/01/01565e4d1cf540465ab7.jpg","instruction": "Change the background to a snowy landscape","code": "import math\nimport numpy as np\nimport cv2\nfrom PIL import Image, ImageDraw\n\n\ndef edit(image):\n image = image.convert('RGB')\n w, h = image.size\n src = np.asarray(image).copy()\n g = max(0.2, min(w, h) / 512.0)\n rng = np.random.default_rng(142317)\n\n # The contour follows the ears, ossicones, muzzle, jaw and both sides of the neck.\n contour = [(268,273),(267,267),(270,258),(274,250),(280,240),(287,231),(296,222),(303,215),(310,207),(316,200),(322,191),(326,182),(332,173),(337,164),(340,153),(341,143),(340,137),(344,132),(353,131),(363,132),(367,122),(370,112),(371,103),(371,96),(374,89),(380,84),(387,81),(394,80),(400,83),(402,89),(399,97),(395,103),(393,112),(394,122),(392,132),(392,141),(396,137),(399,130),(405,122),(410,119),(414,121),(416,130),(415,141),(415,150),(419,156),(426,162),(433,169),(438,177),(442,186),(446,196),(450,207),(453,218),(456,231),(458,244),(461,259),(462,271),(465,286),(468,302),(471,317),(474,332),(477,347),(480,365),(484,381),(488,397),(493,411),(499,424),(505,434),(511,441),(517,452),(517,517),(452,517),(449,506),(446,493),(442,478),(439,464),(436,450),(433,434),(430,418),(427,401),(425,383),(424,365),(424,349),(422,331),(421,313),(419,297),(417,281),(414,266),(409,255),(404,249),(399,246),(390,246),(379,250),(367,254),(352,256),(338,257),(326,256),(319,259),(312,268),(305,274),(298,279),(290,281),(283,278),(277,279),(272,276)]\n pts = np.rint(np.asarray(contour) * np.array([w, h]) / 512.).astype(np.int32)\n guide = np.zeros((h, w), np.uint8)\n cv2.fillPoly(guide, [pts], 1)\n\n def signed(mask):\n return cv2.distanceTransform(mask, cv2.DIST_L2, 5) - cv2.distanceTransform(1-mask, cv2.DIST_L2, 5)\n\n ds = signed(guide)\n rows = np.arange(h, dtype=np.float32)[:, None] * (512.0/h)\n band = g * np.where(rows < 156, 4.1, np.where(rows < 295, 5.5, 7.0))\n seg = np.where(guide > 0, cv2.GC_PR_FGD, cv2.GC_PR_BGD).astype(np.uint8)\n seg[ds > band] = cv2.GC_FGD\n seg[ds < -band] = cv2.GC_BGD\n try:\n cv2.grabCut(src, seg, None, np.zeros((1,65), np.float64), np.zeros((1,65), np.float64), 5, cv2.GC_INIT_WITH_MASK)\n mask = (seg % 2).astype(np.uint8)\n n, ids, stats, _ = cv2.connectedComponentsWithStats(mask, 8)\n if n > 1:\n mask = (ids == 1 + np.argmax(stats[1:, cv2.CC_STAT_AREA])).astype(np.uint8)\n else:\n mask = guide\n n, holes, stats, _ = cv2.connectedComponentsWithStats(1-mask, 8)\n for k in range(1, n):\n if stats[k, cv2.CC_STAT_AREA] <= max(2, int(10*g*g)):\n mask[holes == k] = 1\n except cv2.error:\n mask = guide\n dm = signed(mask)\n d = .86*dm + .14*ds\n a = np.clip(.5 + d / max(1.4, 2.7*g), 0, 1)\n sf = src.astype(np.float32)\n\n def edge_mean(m):\n m = m.astype(np.float32)\n sig = max(.8, 2.45*g)\n t = cv2.GaussianBlur(m, (0,0), sig)\n c = cv2.GaussianBlur(sf*m[:,:,None], (0,0), sig)\n return c / np.maximum(t[:,:,None], 1.e-5), t\n\n ef, wf = edge_mean(dm > 1.55*g)\n eb, wb = edge_mean(dm < -1.55*g)\n delta = ef-eb\n contrast = np.sum(delta*delta, axis=2)\n observed = np.clip(np.sum((sf-eb)*delta, axis=2)/(contrast+1.e-4), 0, 1)\n edge = (a > 0) & (a < 1) & (wf > .035) & (wb > .035)\n gain = np.clip((contrast-400)/3700, 0, .72) * edge\n a = a + gain*(observed-a)\n fix = (.78*edge*(1-a)/np.maximum(.36,a))[:,:,None]\n subject = np.clip(sf + np.clip((sf-eb)*fix, -58, 58), 0, 255)\n\n # Render the new landscape from a continuous height field in perspective.\n def noise(ny, nx, width, height):\n q = rng.uniform(-1., 1., (ny,nx)).astype(np.float32)\n return cv2.resize(q, (width,height), interpolation=cv2.INTER_CUBIC)\n\n f = .86\n horizon = .494\n eye = 3.75\n xmin, xmax, zmax = -158., 158., 245.\n nw, nh = 1152, 960\n dx, dz = (xmax-xmin)/(nw-1), zmax/(nh-1)\n X = np.linspace(xmin, xmax, nw, dtype=np.float32)[None,:]\n Z = np.linspace(0, zmax, nh, dtype=np.float32)[:,None]\n n0 = noise(9,13,nw,nh)\n n1 = noise(23,36,nw,nh)\n n2 = noise(74,103,nw,nh)\n n3 = noise(197,251,nw,nh)\n base = (.46*np.sin(.119*X+.074*Z) + .26*np.cos(.27*X-.115*Z+.7*np.sin(.12*X)) + .30*np.sin(.158*Z-.088*X) + .66*n0 + .22*n1 + .068*n2 + .019*n3)\n base += .48*np.exp(-((X+5.2+.19*(Z-10))/5.5)**2-((Z-10.5)/7.3)**2)\n base += .60*np.exp(-((X-9.6+.35*(Z-20))/10)**2-((Z-19)/7.9)**2)\n base += .022*np.sin(.35*X+2.06*Z+1.7*n1)*np.exp(-Z/24)\n mountains = np.zeros((nh,nw), np.float32)\n peaks = [(-110,180,46,46,65),(-77,168,50,36,52),(-52,169,45,32,62),(-24,169,52,33,67),(4,176,43,31,68),(26,172,46,38,58),(55,173,55,42,63),(83,187,52,41,70),(111,185,47,42,64),(-67,114,28,38,54),(-46,116,32,32,64),(-28,108,37,31,60),(-16,116,29.5,25,53),(-4,124,25,30,64),(17,133,27,30,58),(40,122,38,33,64),(64,124,33,41,65)]\n for j,(cx,cz,elev,rx,rz) in enumerate(peaks):\n zz = Z-cz\n xx = X-cx + (.12*math.sin(j*4.0))*zz\n px = (xx+2.35*n0+1.05*n1)/rx\n pz = (zz+2.6*n1+.65*n2)/rz\n angle = np.arctan2(pz, px)\n radius = (np.abs(px)**1.38 + np.abs(pz)**1.38)**(1/1.38)\n spokes = (.070*np.sin(6*angle+j+1.5*radius) + .039*np.sin(13*angle+2.7*j-3*radius) + .018*np.sin(23*angle+j+3.5*radius))\n r = radius*(1+spokes)\n shape = elev*np.maximum(0, 1-r)**1.08\n shape += np.clip(shape/8,0,1)*(1.68*n1+.62*n2+.14*n3)\n np.maximum(mountains, shape, out=mountains)\n terrain = (base+mountains).astype(np.float32)\n mz, mx = np.gradient(cv2.GaussianBlur(terrain,(0,0),.75), dz, dx)\n mx, mz = mx.astype(np.float32), mz.astype(np.float32)\n material = (.51*n1+.34*n2+.15*n3).astype(np.float32)\n\n u = (np.arange(w,dtype=np.float32)+.5)/w\n v = (np.arange(h,dtype=np.float32)+.5)/h\n rays = ((u-.5)*(w/h)/f).astype(np.float32)\n zz = np.concatenate([np.linspace(1.5,29.95,370),np.linspace(30,244.5,1000)]).astype(np.float32)\n gx = (zz[:,None]*rays[None,:]-xmin)/dx\n gz = np.broadcast_to((zz/dz)[:,None],gx.shape).copy()\n ray_height = cv2.remap(terrain,gx,gz,cv2.INTER_LINEAR,borderMode=cv2.BORDER_REPLICATE)\n proj = horizon + f*(eye-ray_height)/zz[:,None]\n top = np.minimum.accumulate(proj,axis=0)\n depth = np.empty((h,w),np.float32)\n for i in range(w):\n k = np.searchsorted(-top[:,i], -v)\n valid = k < len(zz)\n k = np.clip(k,1,len(zz)-1)\n k[~valid] = max(1,int(np.argmin(proj[:,i])))\n bef, aft = proj[k-1,i], proj[k,i]\n t = np.clip((bef-v)/np.maximum(bef-aft,.000001),0,1)\n depth[:,i] = zz[k-1]+t*(zz[k]-zz[k-1])\n coverage = np.clip(.5+(v[:,None]-top[-1,:][None,:])*h,0,1)\n ground_x = depth*rays[None,:]\n sx = ((ground_x-xmin)/dx).astype(np.float32)\n sz = (depth/dz).astype(np.float32)\n\n def surface(q):\n return cv2.remap(q,sx,sz,cv2.INTER_LINEAR,borderMode=cv2.BORDER_REPLICATE)\n\n nx, nz, ht, grit = -surface(mx), -surface(mz), surface(terrain), surface(material)\n slope = np.sqrt(nx*nx+nz*nz)\n light = (.60*nx+.76-.25*nz)/np.sqrt(1+slope*slope)\n illum = np.clip(.52+.495*light+.058*grit,.20,1)\n snow = np.array([151,177,201],np.float32) + illum[:,:,None]*np.array([96,73,50],np.float32)\n snow += (2.1*grit)[:,:,None]\n exposed = np.clip((slope-.86+.47*grit)/1.02,0,.82)*np.clip((ht-6.)/11.,0,1)\n stone = np.array([97,110,125],np.float32) + np.clip(.42+.62*light+.2*grit,0,1)[:,:,None]*np.array([83,81,78],np.float32)\n ground = snow*(1-exposed[:,:,None])+stone*exposed[:,:,None]\n fog = .55*(1-np.exp(-(depth/125.)**1.4))\n ground = ground*(1-fog[:,:,None])+np.array([206,222,234],np.float32)*fog[:,:,None]\n\n # An overcast sky with broad cloud sheets and a bright break to the right.\n vv = v[:,None]\n cloud = .62*noise(8,5,w,h)+.27*noise(21,11,w,h)+.11*noise(44,26,w,h)\n wisps = .47*noise(16,4,w,h)+.28*noise(29,9,w,h)+.13*noise(61,17,w,h)\n warmglow = np.exp(-((u[None,:]-.72)/.44)**2-((vv-.15)/.24)**2)\n grad = np.minimum(vv/.58,1.)**.78\n sky = np.array([190,207,224],np.float32)+grad[:,:,None]*np.array([43,34,24],np.float32)\n cloudlight = 11*cloud+12*np.maximum(wisps+.10,0)+13*warmglow\n sky = sky+cloudlight[:,:,None]*np.array([1.,.92,.76],np.float32)\n\n def elevation(x,z):\n i, j = (x-xmin)/dx,z/dz\n xi, zi = int(i), int(j)\n p,q = i-xi,j-zi\n return float((1-p)*((1-q)*terrain[zi,xi]+q*terrain[zi+1,xi])+p*((1-q)*terrain[zi,xi+1]+q*terrain[zi+1,xi+1]))\n\n # Groves are placed in world space, rather than stamped at a fixed image scale.\n trees = []\n for x,z,t in [(-4.65,11.7,2.58),(-5.65,13.7,2.85),(-3.8,14.65,2.20),(-2.94,16.4,1.68),(-5.48,17.1,2.52),(-1.9,25.5,1.36),(8.1,21.7,2.14),(7.2,24.4,1.59)]:\n trees.append((x,z,t))\n for cx,cz,sx0,sz0,count in [(-29,54,9,7,60),(-10,62,12,5,48),(12,59,12,7,67),(32,61,9,8,47),(-10,33,4.5,4.0,36),(13,40,6,5,35)]:\n for j in range(count):\n x,z = cx+sx0*rng.normal(),cz+sz0*rng.normal()\n if not 18 < z < 86 or abs(x*f/z) > .555*w/h:\n continue\n if elevation(x,z) > 5.5 or any((x-a0)**2+(z-b0)**2 < .74**2 for a0,b0,_ in trees):\n continue\n trees.append((x,z,float(rng.uniform(1.15,3.6)*rng.uniform(.86,1.17))))\n\n shadows = np.zeros((h,w),np.float32)\n for x,z,t in trees:\n if z > 33:\n continue\n ax, az = ground_x-x,depth-z\n along, across = -.94*ax+.342*az,.342*ax+.94*az\n wide = .12+.09*np.clip(along,0,3)+.13*t\n shadow = .17*np.exp(-.5*(across/wide)**2) * np.clip(1-along/(1.25*t),0,1) * np.clip((along+.21)/.53,0,1)\n np.maximum(shadows,shadow,out=shadows)\n ground = ground*(1-shadows[:,:,None])+shadows[:,:,None]*np.array([125,157,187],np.float32)\n bg = sky*(1-coverage[:,:,None])+ground*coverage[:,:,None]\n scene_depth = np.where(coverage > .55,depth,1.e5)\n\n def spruce(size,z):\n aa = 3\n margin = 2\n half = int(math.ceil(size*.31))+margin\n sw, sh = 2*half+1,int(math.ceil(size))+2*margin+1\n layer = Image.new('RGBA',(sw*aa,sh*aa))\n draw = ImageDraw.Draw(layer)\n atmo = .75*(1-math.exp(-z/119))\n lean = rng.uniform(-.052,.052)\n spread = rng.uniform(.145,.244)\n vapour = np.array([199,218,230])\n\n def rgba(c):\n return tuple(np.rint(np.clip(np.asarray(c)*(1-atmo)+vapour*atmo,0,255)).astype(int))+(255,)\n\n def poly(p,c):\n draw.polygon([(int(round((half+x*size)*aa)),int(round((margin+y*size)*aa))) for x,y in p], fill=rgba(c))\n\n def axis(y):\n return lean*(1-y)**1.3 + .009*math.sin(y*8)\n\n poly([(axis(.96)-.013,1),(axis(.15)-.003,.15),(axis(.048),.048),(axis(.96)+.013,1)], [91,91,85])\n levels = int(np.clip(size*.46+5,12,35))\n for pp in np.linspace(.94,.06,levels):\n p0 = pp+rng.uniform(-.020,.020)\n dirs = [-1,1] if rng.random()<.52 else [1,-1]\n for s in dirs:\n p = p0+rng.uniform(-.022,.022)\n length = spread*p**.82*rng.uniform(.56,1.10)\n fall = rng.uniform(.026,.084)*(.45+.55*p)\n mass = rng.uniform(.021,.056)*(.55+.45*p)\n us = [0.,.16,.32,.47,.61,.75,.87,1.]\n branch = []\n underside = []\n for b in us:\n x = axis(p)+s*length*b\n y = p + fall*b - .026*b**6\n thick = mass*(1-b)**.57\n branch.append((x,y-thick*rng.uniform(.64,1.18)))\n underside.append((x,y+thick*rng.uniform(.52,1.36)))\n shade = rng.uniform(-13,11)+(6 if s>0 else -3)\n poly(branch+underside[::-1], np.array([54,79,84])+shade)\n if rng.random() < .83:\n start,end = int(rng.integers(0,3)),int(rng.integers(5,8))\n crust = branch[start:end]\n ragged = [(x,y+(1-us[k])**.55*mass*rng.uniform(.51,.97)) for k,(x,y) in enumerate(crust,start)]\n tone = rng.uniform(-17,13)+(8 if s>0 else -4)\n poly(crust+ragged[::-1],np.array([210,226,234])+tone)\n if p > .23 and rng.random()<.53:\n bx,by = branch[int(rng.integers(3,6))]\n poly([(bx-s*.015,by+.011),(bx+s*length*.25,by-.016),(bx+s*length*.12,by+.020),(bx-s*.022,by+.028)],np.array([75,100,106])+shade*.8)\n poly([(axis(.0),0),(axis(.12)-.031,.157),(axis(.12)+.030,.151)], [83,105,108])\n poly([(axis(.0),0),(axis(.10)-.022,.119),(axis(.10)+.014,.105)], [215,229,235])\n return np.asarray(layer.resize((sw,sh),Image.Resampling.LANCZOS)),half,margin\n\n for x,z,t in sorted(trees,key=lambda q:-q[1]):\n hp = f*t*h/z\n if hp < 2.1:\n continue\n rootx = .5*w+f*x*h/z\n rooty = h*(horizon+f*(eye-elevation(x,z))/z)\n tile,mid,pad = spruce(hp,z)\n tx,ty = int(round(rootx-mid)),int(round(rooty-hp-pad))\n x0,y0,x1,y1 = max(0,tx),max(0,ty),min(w,tx+tile.shape[1]),min(h,ty+tile.shape[0])\n if x1 <= x0 or y1 <= y0:\n continue\n cut = tile[y0-ty:y1-ty,x0-tx:x1-tx]\n visibility = np.clip((scene_depth[y0:y1,x0:x1]-z+.80)/1.1,0,1)\n opacity = (cut[:,:,3].astype(np.float32)/255*visibility)[:,:,None]\n bg[y0:y1,x0:x1] = bg[y0:y1,x0:x1]*(1-opacity)+cut[:,:,:3]*opacity\n\n bg = cv2.GaussianBlur(bg,(0,0),max(.38,.74*g))\n bg += rng.normal(0,.66,(h,w,1)).astype(np.float32)\n result = bg*(1-a[:,:,None])+subject*a[:,:,None]\n return Image.fromarray(np.rint(np.clip(result,0,255)).astype(np.uint8),'RGB')\n","scores": {"instruction_adherence": 5,"preservation": 4,"visual_quality": 4,"pass": true,"target_extent_score": 5,"target_extent_complete": true,"reason": "The original leafy background is fully replaced with a snowy mountain landscape, matching the instruction. The giraffe is largely preserved, though there are some edge artifacts and slight compositing/halo issues around the cutout. Overall the edit is complete and visually plausible enough to pass.","rubric_version": "full_visible_target_v1","annotated_target_box": null,"difference_evidence": {"scope": "full_image","changed_pixel_fraction": 0.8734092712402344,"mean_absolute_rgb_delta": 108.85941314697266,"mean_signed_rgb_delta": 99.8993148803711,"mean_delta_among_changed_pixels": 124.6373519897461,"changed_pixels_outside_box": null},"judge_evidence_version": "aligned_rgb_delta_v1","raw_reward": 0.925,"reward": 0.925,"reward_eligible": true,"reward_version": "semantic_gates_v3_extent"},"time": 1796063712.894387},{"id": "anyedit_s202_635__rft_paper5",100 unmodified lines},"time": 1796063186.0777602},{"id": "anyedit_s201_2035__rft_paper5","teacher": "GPT-6.2-Sol","mode": "rft","source_name": "anyedit","source": "paper_assets/a6/a6823b9a1987a8d5b9b1.jpg","output": "paper_assets/3f/3feb6acc939400105537.jpg","instruction": "replace the mountain with a city skyline","code": "def edit(image):\n from PIL import Image, ImageDraw\n import numpy as np\n import cv2\n import math\n import random\n\n src = image.convert('RGB')\n w, h = src.size\n orig = np.asarray(src).copy()\n a = orig.astype(np.float32)\n sx, sy = w / 512.0, h / 512.0\n xx, yy = np.meshgrid((np.arange(w, dtype=np.float32) + .5) / sx, (np.arange(h, dtype=np.float32) + .5) / sy)\n unit = max(.25, min(sx, sy))\n rng = random.Random(61)\n\n def smooth(t):\n t = np.clip(t, 0, 1)\n return t * t * (3 - 2 * t)\n\n # Sample the original clear sky, then extend its soft color field behind the ridge.\n ridge = [(0,88),(13,75),(31,69),(44,67),(58,65),(77,59),(96,53),(110,56),(122,59),(131,64),(143,56),(158,52),(171,54),(186,59),(201,61),(215,58),(235,51),(251,46),(269,45),(285,44),(299,48),(317,54),(334,61),(352,69),(372,72),(393,69),(416,67),(430,74),(449,81),(465,86),(482,97),(498,101),(512,104)]\n rx, ry = zip(*ridge)\n edge = np.interp(xx[0], rx, ry)[None, :]\n clear = (yy < edge - 15) & ((xx < 244) | (xx > 283)) & (a[:, :, 0] > 220) & (a[:, :, 2] < a[:, :, 0] + 5)\n def basis(x, y):\n x = (x - 256) / 256\n y = y / 80\n return np.stack((np.ones_like(x), x, x*x, y, x*y), axis=-1)\n if np.count_nonzero(clear) > 30:\n q = basis(xx[clear], yy[clear])[::3]\n c = a[clear][::3]\n fit = np.linalg.lstsq(q, c, rcond=None)[0]\n inlier = np.max(np.abs(q @ fit - c), axis=1) < 7\n if np.count_nonzero(inlier) > 15:\n fit = np.linalg.lstsq(q[inlier], c[inlier], rcond=None)[0]\n sky = np.clip(basis(xx, np.minimum(yy, 95)) @ fit, 0, 255).astype(np.float32)\n else:\n sky = np.broadcast_to(np.array([250, 247, 236], np.float32), a.shape).copy()\n haze = smooth((yy - 68) / 390)[..., None]\n sky = sky * (1 - .88 * haze) + np.array([212, 225, 234], np.float32) * (.88 * haze)\n replace = smooth((yy - edge + 16) / 9).astype(np.float32)\n scene = a * (1 - replace[..., None]) + sky * replace[..., None]\n touched = replace.copy()\n\n # All architectural geometry is in source-relative 512-unit coordinates.\n ss = 3\n def point(x, y):\n return (int(round(x * sx * ss)), int(round(y * sy * ss)))\n def new_layer():\n return Image.new('RGBA', (w * ss, h * ss), (0, 0, 0, 0))\n def color(rgb, delta=0):\n return tuple(int(max(0, min(255, v + delta))) for v in rgb) + (255,)\n def poly(d, p, c):\n d.polygon([point(x, y) for x, y in p], fill=c)\n def box(d, x, y, X, Y, c):\n if X >= x and Y >= y:\n d.rectangle([point(x, y), point(X, Y)], fill=c)\n def line(d, p, c, thickness=.55):\n d.line([point(x, y) for x, y in p], fill=c, width=max(1, round(thickness * unit * ss)))\n\n def building(d, x, top, bw, foot, depth, tone, style=0, crown=0, quiet=False):\n right = x + bw\n rise = min(4.3, depth * .37)\n poly(d, [(right,top),(right+depth,top-rise),(right+depth,foot-2),(right,foot)], color(tone,-14 if not quiet else -9))\n box(d, x, top, right, foot, color(tone))\n poly(d, [(x,top),(x+depth,top-rise),(right+depth,top-rise),(right,top)], color(tone,14))\n line(d, [(x,top+.25),(right,top+.25)], color(tone,13), .75)\n line(d, [(x+.65,top+1),(x+.65,foot)], color(tone,8), .8)\n line(d, [(right-.3,top+.5),(right-.3,foot)], color(tone,-6), .6)\n pitch = rng.uniform(5.1, 8.0) if quiet else rng.uniform(4.8, 7.4)\n if style in (1, 3):\n pitch += .9\n cols = max(2, round(bw / (4.2 if style in (0, 2) else 5.7)))\n margin = 2.0 if style != 3 else 3.4\n bay = (bw - 2 * margin) / cols\n start = top + rng.uniform(3.5,6)\n row = 0\n for y in np.arange(start, foot-2, pitch):\n if style == 0:\n box(d, x+margin, y, right-margin, y+pitch*.53, color(tone, rng.uniform(-15,-7)))\n if style == 2 and row % 3 == 1:\n line(d, [(x+1,y-.8),(right-1,y-.8)], color(tone,7), .58)\n if style == 3:\n box(d, x+margin, y, right-margin, y+pitch*.43, color(tone,-6))\n for k in range(cols):\n if rng.random() < (.16 if style == 0 else .1):\n continue\n u = x + margin + k * bay\n delta = rng.uniform(-12, 6) if style == 0 else rng.uniform(-23, -8)\n if quiet:\n delta *= .58\n if rng.random() < .07:\n delta = rng.uniform(1, 8)\n gap = (.6 if style == 0 else 1.45)\n box(d, u+.3, y+.2, u+bay-gap, y+pitch*rng.uniform(.34,.59), color(tone,delta))\n if depth > 4:\n poly(d, [(right+1,y),(right+depth-1,y-rise*.8),(right+depth-1,y-rise*.8+pitch*.36),(right+1,y+pitch*.36)], color(tone,-20 if not quiet else -13))\n row += 1\n if style in (0, 2):\n for k in range(1,cols):\n u = x + margin + k * bay\n line(d, [(u,top+2),(u,foot)], color(tone,5 if style == 0 else 7), .46 if style == 0 else .75)\n if crown in (1, 2, 3):\n cx = x + bw * (.20 if crown == 1 else .30)\n cw = bw * (.56 if crown == 1 else .42)\n ch = (rng.uniform(3,6) if crown == 1 else rng.uniform(7,12))\n box(d, cx, top-ch, cx+cw, top-.2, color(tone,-1))\n poly(d, [(cx+cw,top-ch),(cx+cw+depth*.54,top-ch-1.5),(cx+cw+depth*.54,top-1.4),(cx+cw,top-.2)], color(tone,-13))\n poly(d, [(cx,top-ch),(cx+depth*.54,top-ch-1.5),(cx+cw+depth*.54,top-ch-1.5),(cx+cw,top-ch)], color(tone,15))\n if crown > 1:\n box(d, cx+cw*.23, top-ch-4, cx+cw*.76, top-ch, color(tone,-5))\n line(d, [(cx+cw*.54,top-ch-4),(cx+cw*.54,top-ch-(12 if crown == 2 else 8))], color(tone,-15), .65)\n elif bw > 21 and rng.random() < .55:\n u = x + bw * rng.uniform(.2,.67)\n box(d, u, top-2.6, u+bw*.21, top-.7, color(tone,-4))\n line(d, [(u,top-2.6),(u+bw*.21,top-2.6)], color(tone,14), .55)\n\n def blend_layer(layer, softness, veil):\n nonlocal scene, touched\n rgba = np.asarray(layer.resize((w,h), Image.Resampling.LANCZOS)).astype(np.float32)\n alpha = rgba[:,:,3:4] / 255\n prem = np.concatenate((rgba[:,:,:3] * alpha, alpha), axis=2)\n if softness * unit > .13:\n prem = cv2.GaussianBlur(prem, (0,0), softness * unit, borderType=cv2.BORDER_REPLICATE)\n alpha = prem[:,:,3:4]\n mist = (veil * (.32 + .68*smooth((yy-140)/370)))[...,None]\n rgb = prem[:,:,:3]*(1-mist) + np.array([206,222,234],np.float32)*mist*alpha\n scene = scene*(1-alpha) + rgb\n touched = 1 - (1-touched)*(1-alpha[:,:,0])\n\n far = new_layer()\n d = ImageDraw.Draw(far)\n for j in range(2):\n x = -28 + j*9\n while x < 518:\n bw = rng.uniform(13, 33)\n top = rng.uniform(199, 295) + j*46\n tone = rng.choice([(186,200,214),(197,207,217),(180,198,215),(197,202,208),(190,207,218)])\n building(d, x, top, bw, rng.uniform(404,486), rng.uniform(3,7), tone, rng.randrange(4), rng.choice([0,0,1]), True)\n x += bw * rng.uniform(.70,1.13)\n blend_layer(far, 1.04, .30)\n\n # Irregular skyline of masonry offices and glass towers, with a few distinctive crowns.\n mid = new_layer()\n d = ImageDraw.Draw(mid)\n towers = [\n (-13,218,32,406,6,(175,194,212),2,1),\n (20,170,36,407,9,(167,186,205),1,1),\n (55,211,28,429,6,(178,190,203),3,0),\n (84,111,36,403,8,(158,179,199),2,2),\n (122,188,23,417,6,(183,191,201),1,1),\n (149,146,37,411,10,(161,184,203),0,0),\n (191,179,32,414,7,(173,193,210),3,1),\n (226,158,25,385,7,(180,194,206),1,1),\n (286,188,38,401,7,(174,190,205),0,0),\n (325,170,27,397,7,(180,195,211),1,0),\n (354,126,31,404,8,(160,182,203),0,3),\n (387,199,34,427,6,(187,197,208),2,0),\n (418,154,32,426,8,(163,184,204),2,1),\n (452,220,27,425,6,(182,194,204),3,0),\n (479,180,25,428,8,(171,190,206),0,1),\n (507,228,22,415,6,(185,195,205),1,0)\n ]\n for b in sorted(towers, key=lambda t: t[3]):\n building(d, *b)\n blend_layer(mid, .67, .19)\n\n lower = new_layer()\n d = ImageDraw.Draw(lower)\n for row in range(3):\n x = -rng.uniform(8,25)\n while x < 522:\n bw = rng.uniform(21,45)\n top = rng.uniform(302,360) + row*rng.uniform(49,56)\n foot = 437 + row*47 + rng.uniform(-8,13)\n tone = rng.choice([(180,193,204),(167,187,204),(173,188,202),(191,198,207),(178,196,210),(187,195,201)])\n building(d, x, top, bw, foot, rng.uniform(5,10), tone, rng.randrange(4), rng.choice([0,1,1]))\n x += bw*rng.uniform(.78,1.07)\n blend_layer(lower, .76, .24)\n noise = np.random.default_rng(91).normal(0,.72,(h,w,1)).astype(np.float32)\n scene += noise * touched[...,None]\n\n # Trace the foreground and refine only a narrow strip around its contour.\n matte = Image.new('L', (w*ss,h*ss), 0)\n m = ImageDraw.Draw(matte)\n main = [(96,360),(97,342),(99,325),(103,307),(109,289),(116,273),(125,257),(136,242),(149,229),(163,218),(178,209),(195,201),(212,195),(230,190),(243,188),(252,187),(264,186.8),(278,188),(294,190),(312,194),(329,199),(346,207),(361,216),(376,227),(389,239),(401,252),(411,267),(419,283),(425,301),(429,321),(431,340),(432,354),(450,358),(453,360),(453,366),(449,369),(451,389),(460,391),(463,395),(463,401),(459,406),(457,409),(459,490),(462,495),(466,496),(468,502),(469,512),(64,512),(65,504),(67,500),(71,497),(74,410),(75,407),(70,403),(69,397),(76,394),(77,374),(75,373),(74,369),(75,366),(83,363)]\n poly(m, main, 255)\n finial = [(263,3),(265,10),(264,26),(266,34),(266,38),(270,41),(272.5,45),(273,50),(270,54),(267,56.5),(268,59),(273.2,61),(272,65),(269.5,67),(272,69),(271,73),(268,77),(266,81),(266.5,88),(269,94),(272.5,100),(277,107),(280.5,114),(282.5,121),(282,127),(283,130),(280.5,136),(277.7,138.5),(277.7,175),(280,178),(283,180.5),(284,188.5),(242.5,189),(242.5,181.5),(246,177.5),(248,174),(248.3,140),(246,137),(244,133),(244,126),(246,119),(248,112),(252,104),(256,97),(259,89),(260,81),(258.5,77),(255.8,73),(254.8,68),(255.8,65.5),(252.8,63.5),(252.7,61),(258,59),(260,56),(256.6,53.6),(254,50),(253.6,46),(256.1,42),(260.3,39),(261.6,34),(262.4,24),(262.2,12),(261,8)]\n poly(m, finial, 255)\n poly(m, [(255.5,142),(258.3,146),(258.3,151),(255.9,156),(255.5,163),(257,168.5),(256.5,174.5),(254.6,174.5),(254.6,148)], 0)\n poly(m, [(270.6,141.5),(272.2,144),(272.8,173.8),(270.2,174.2),(269.8,169),(271.1,164),(270.8,158),(268.8,152),(270.1,147)], 0)\n prior = np.asarray(matte.resize((w,h),Image.Resampling.LANCZOS)).astype(np.float32)/255\n obj = (prior >= .48).astype(np.uint8)\n din = cv2.distanceTransform(obj, cv2.DIST_L2, 5)\n dout = cv2.distanceTransform(1-obj, cv2.DIST_L2, 5)\n band = np.where(yy < 190, 1.9, np.where(yy < 355, 4.3, 2.9)) * unit\n g = np.where(obj > 0, cv2.GC_PR_FGD, cv2.GC_PR_BGD).astype(np.uint8)\n g[din > band] = cv2.GC_FGD\n g[dout > band] = cv2.GC_BGD\n try:\n cv2.grabCut(orig, g, None, np.zeros((1,65),np.float64), np.zeros((1,65),np.float64), 2, cv2.GC_INIT_WITH_MASK)\n solid = ((g == cv2.GC_FGD) | (g == cv2.GC_PR_FGD)).astype(np.float32)\n refined = cv2.GaussianBlur(solid,(0,0),max(.35,.54*unit),borderType=cv2.BORDER_REPLICATE)\n trust = np.where(yy < 190, .39, np.where(yy < 355, .94, .64)).astype(np.float32)\n fg = np.clip(prior*(1-trust) + refined*trust,0,1)\n fg = smooth((fg-.035)/.93)\n except cv2.error:\n fg = prior.copy()\n # Retain the small structures at ground level beyond the dome's base.\n extra = Image.new('L', (w*ss,h*ss), 0)\n e = ImageDraw.Draw(extra)\n poly(e, [(0,501),(4,501),(8,505),(10,512),(0,512)], 255)\n poly(e, [(469,508),(478,506),(487,506),(491,503),(499,503),(499,499),(504,498),(504,493),(508,491),(512,491),(512,512),(468,512)], 255)\n fg = np.maximum(fg,np.asarray(extra.resize((w,h),Image.Resampling.LANCZOS),dtype=np.float32)/255)\n out = scene*(1-fg[...,None]) + a*fg[...,None]\n return Image.fromarray(np.clip(np.rint(out),0,255).astype(np.uint8), 'RGB')","scores": {"instruction_adherence": 5,"preservation": 5,"visual_quality": 4,"target_extent_score": 5,"target_extent_complete": true,"pass": true,"reason": "The mountain background has been fully replaced with a city skyline across the visible background area. The blue domed building and other unrelated foreground content are well preserved, and the edit looks coherent, though the skyline is somewhat hazy and artificial.","rubric_version": "full_visible_target_v1","annotated_target_box": null,"difference_evidence": {"scope": "full_image","changed_pixel_fraction": 0.4936561584472656,"mean_absolute_rgb_delta": 15.530391693115234,"mean_signed_rgb_delta": 4.751102447509766,"mean_delta_among_changed_pixels": 31.459938049316406,"changed_pixels_outside_box": null},"judge_evidence_version": "aligned_rgb_delta_v1","raw_reward": 0.9749999999999999,"reward": 0.9749999999999999,"reward_eligible": true,"reward_version": "semantic_gates_v3_extent"},"time": 1796062382.8281834},{"id": "maskedit_scene_s42_82__ti_paper5","teacher": "GPT-6.1-Sol",222 unmodified lines},"GPT-6.1-Sol": {"scheduled": 1053,"computed": 979,"output_unavailable": 72,"metric_pending": 0,"metric_unrecorded": 2,"mean_clip_i": 0.9435473352944644,"mean_dino": 0.9145348066572515}}},3 unmodified lines"total_bytes": 693376865},"experiments": {"checked": "2026-11-30T18:40:11.492389+00:00","sft": [{"id": "star_comparison_rft_v1",3030 unmodified lines"pie_bench": true,"imgedit": true},"elapsed_seconds": 2971.692930698395,"workers": 8,"audit_version": 3,"durable_completed_rows": 11700,"counts": {"eligible_pending_full_test_protection": 10057,"excluded": 1643}}},233 unmodified lines"comparison_scope": "PIE-Bench++ annotations; do not compare directly with original PIE leaderboard"},"magicbrush_pixel_metrics": {"updated": 1796063357.0606718,"protocol": "magicbrush_pinned_all_turn_l1_l2_v1","benchmark": "MagicBrush","scheduled": 1053,55 unmodified lines},"Qwen3.8-27B": {"scheduled": 1053,"recorded": 488,"computed": 436,"output_unavailable": 52,"metric_pending": 0,"generation_pending": 565,"mean_l1": 0.04905005867890437,"mean_l2": 0.021305925692325325,"all_outputs_computed": false},"Qwen3.5-9B": {"scheduled": 1053,"recorded": 693,"computed": 345,"output_unavailable": 348,"metric_pending": 0,"generation_pending": 360,"mean_l1": 0.0721226234595541,"mean_l2": 0.03667815302926127,"all_outputs_computed": false}},1 unmodified line"learned_metrics": "official CLIP-I, CLIP-T and DINO remain pending"},"official_suite_results": {"updated": 1796064011.5684996,"judge_model": "GPT-5.6-Sol","judge_protocol": "paper_gpt56sol_two_image_low_v3","suites": {94 unmodified lines"final_comparison_ready": false},"Qwen3.8-27B": {"attempted": 513,"recorded": 513,"judged": 173,"method_failure": 22,"generation_pending": 540,"service_pending": 0,"execution_pending": 0,"score_pending": 0,"identity_pending": 0,"result_pending": 318,"method_failures": 22,"completed": 195,"image_pass": 2,2 unmodified lines"final_comparison_ready": false},"Qwen3.5-9B": {"attempted": 728,"recorded": 728,"judged": 167,"method_failure": 113,"generation_pending": 325,"service_pending": 0,"execution_pending": 54,"score_pending": 0,"identity_pending": 0,"result_pending": 394,"method_failures": 113,"completed": 280,"image_pass": 0,280 unmodified lines"Qwen-Image-2.1": {"attempted": 700,"recorded": 700,"judged": 0,"method_failure": 0,"generation_pending": 0,"service_pending": 0,"execution_pending": 0,"score_pending": 0,"identity_pending": 0,"result_pending": 700,"method_failures": 0,"completed": 0,"image_pass": 0,"mean_score_on_judged": null,"overall_pass_rate": null,"final_comparison_ready": false},36 unmodified lines"DeepSeek-V4.1-Flash": {"attempted": 700,"recorded": 700,"judged": 135,"method_failure": 3,"generation_pending": 0,"service_pending": 2,"execution_pending": 0,"score_pending": 0,"identity_pending": 0,"result_pending": 560,"method_failures": 3,"completed": 138,"image_pass": 3,"mean_score_on_judged": 2.324074074074074,"overall_pass_rate": null,"final_comparison_ready": false},"GLM-5.4": {"attempted": 700,"recorded": 700,"judged": 0,"method_failure": 0,"generation_pending": 0,"service_pending": 0,"execution_pending": 0,"score_pending": 0,"identity_pending": 0,"result_pending": 700,"method_failures": 0,"completed": 0,"image_pass": 0,"mean_score_on_judged": null,"overall_pass_rate": null,"final_comparison_ready": false},343 unmodified lines"snapshot": "mixed_22768_a052b5e5031a","physical_volume": "aidp-data-multimodal-hl1","hash_verified": true,"combined_retained_rows": 23836,"early_sets": [{"label": "早期纯 RFT 对照",6 unmodified lines],"final_paper_audit": "pending","unified": {"retained_rows": 35842,"duplicate_export_rows": 8601,"initial_screen_checked": 35763,"initial_screen_flagged": 2967,"pending_final_audit": 32796,"new_pending_initial_screen": 79,"missing_source_image_paths": 0,"final_qualified_rows": 0,"updated": "2026-11-30T05:47:54.854877+00:00",1 unmodified line"dedup_policy": "same source path, system, instruction, answer and RFT/TI mode; RGB/near-duplicate audit remains pending"}},"evaluation_updated": 1796064011.5684996,"suites": [{"name": "MagicBrush",12345678910112 unmodified lines1415161718192015 unmodified lines36373839404142389 unmodified lines432433434435436437438439440441508 unmodified lines95095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058100 unmodified lines115911601161116211631164222 unmodified lines1387138813891390139113921393139413951396139713983 unmodified lines14021403140414051406140714083030 unmodified lines4439444044414442444344444445444644474448444944504451233 unmodified lines468546864687468846894690469155 unmodified lines4747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947701 unmodified line477247734774477547764777477894 unmodified lines48734874487548764877487848794880488148824883488448854886488748882 unmodified lines4891489248934894489548964897489848994900490149024903490449054906280 unmodified lines51875188518951905191519251935194519551965197519851995200520152025203520436 unmodified lines524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276343 unmodified lines56205621562256235624562556266 unmodified lines5633563456355636563756385639564056415642564356441 unmodified line5646564756485649565056515652{"updated": "2026-11-30T18:44:36.395825+00:00","production_updated": 1796064275.0524974,"production": {"rows": 1070,"rft": 895,"ti": 175,"attempts": 4198,"final_qualified": 0,"workers": 8,"active": true,2 unmodified lines},"teachers": {"GPT-6.2-Sol": {"rft": 610,"ti": 114},"GPT-6.1-Sol": {15 unmodified lines"rft": 122},"anyedit": {"rft": 192,"ti": 19}},389 unmodified lines{"time": 1796063984.4840164,"rows": 1068},{"time": 1796064275.0524974,"rows": 1070}],"models": [508 unmodified lines],"training_cases": [{"id": "anyedit_s200_3843__rft_paper5","teacher": "GPT-6.2-Sol","mode": "rft","source_name": "anyedit","source": "paper_assets/bb/bbf4b335c0418c5343be.jpg","output": "paper_assets/1d/1d937ededd694694cf7e.jpg","instruction": "replace the watch with a phone","code": "def edit(image):\n import math\n import numpy as np\n import cv2\n from PIL import Image\n\n src = np.asarray(image.convert('RGB'))\n w, h = image.size\n X, Y = np.meshgrid((np.arange(w, dtype=np.float32) + .5) * 512 / w,\n (np.arange(h, dtype=np.float32) + .5) * 512 / h)\n\n def smooth(z):\n z = np.clip(z, 0, 1)\n return z*z*(3-2*z)\n\n def g(z, c, s):\n return np.exp(-0.5*((z-c)/s)**2)\n\n # The envelope includes both the outer silhouette and the open strap loop.\n envelope = np.array([(74,263),(83,218),(100,180),(122,139),(144,110),\n (176,83),(211,69),(260,68),(307,71),(345,83),(373,107),\n (389,139),(408,153),(416,188),(417,243),(412,275),(417,326),\n (401,345),(386,377),(362,414),(331,443),(303,462),(263,470),\n (219,465),(181,450),(147,427),(124,402),(107,371),(87,343),(76,309)], np.float32)\n mask = np.zeros((h,w), np.float32)\n cv2.fillPoly(mask, [np.rint(envelope * [w/512,h/512]).astype(np.int32)], 1.)\n mask = cv2.GaussianBlur(mask, (0,0), max(.6,4.6*w/512), sigmaY=max(.6,4.6*h/512))\n mask = smooth((mask-.012)/.87)\n r1 = np.sqrt(((X-151)/231)**2 + ((Y-426-.10*(X-151))/43)**2)\n r2 = np.sqrt(((X-251)/133)**2 + ((Y-455+.036*(X-251))/39)**2)\n repair = np.maximum(mask, np.maximum(1-smooth((r1-.63)/.48), 1-smooth((r2-.61)/.48)))\n\n # Robust, low-order clean plate reconstructed only from unmasked source pixels.\n def basis(x,y):\n return np.stack((np.ones_like(x),x,y,x*y,x*x,y*y,x*x*y,x*y*y,x*x*x,y*y*y),axis=-1)\n\n xx, yy = (X-256)/256, (Y-256)/256\n step = max(1,min(w,h)//155)\n valid = (repair[::step,::step] < .0001)\n bx, by = xx[::step,::step][valid], yy[::step,::step][valid]\n obs = src[::step,::step][valid].astype(np.float32)\n if len(obs) >= 24:\n mat = basis(bx,by)\n wt = np.ones((len(obs),1),np.float32)\n for _ in range(4):\n coef = np.linalg.lstsq(mat*wt,obs*wt,rcond=None)[0]\n err = np.mean(mat@coef-obs,axis=1)\n wt = (1/np.sqrt(1+(err/1.8)**2))[:,None]\n plate = np.clip(basis(xx,yy)@coef, 0, 255)\n else:\n plate = np.full_like(src, 248, dtype=np.float32)\n bg = src.astype(np.float32)*(1-repair[...,None])+plate*repair[...,None]\n\n # The front plane is defined in handset coordinates, then projected into the scene.\n W, H, R = 184., 384., 22.\n corners = np.float32([[145,94],[311,60],[342,404],[166,448]])\n M = cv2.getPerspectiveTransform(np.float32([[0,0],[W,0],[W,H],[0,H]]), corners)\n def project(u,v,t=0.):\n den = M[2,0]*u+M[2,1]*v+M[2,2]\n scale = .91 + .12*v/H + .035*u/W\n return np.array([(M[0,0]*u+M[0,1]*v+M[0,2])/den + 13.3*t*scale,\n (M[1,0]*u+M[1,1]*v+M[1,2])/den + 6.3*t*scale])\n\n arcs = []\n for cx,cy,start in [(W-R,R,-90),(W-R,H-R,0),(R,H-R,90),(R,R,180)]:\n th = np.deg2rad(np.linspace(start,start+90,25))\n arcs.append(np.stack((cx+R*np.cos(th),cy+R*np.sin(th)),axis=1))\n contour = []\n for i, arc in enumerate(arcs):\n contour.extend(arc)\n end, nxt = arc[-1], arcs[(i+1)%4][0]\n count = int(np.linalg.norm(nxt-end)/4)+1\n contour.extend(end+(nxt-end)*k/count for k in range(1,count))\n back = np.array([project(u,v,1) for u,v in contour])\n contact = back[back[:,1].argmax()]\n\n # Soft floor shadow, with the darkest part directly under the low corner.\n cx, cy = contact\n dx = X-cx\n dy = Y-cy\n shadow = (.162*g(dx,1,17)*g(dy,1-.11*dx,3.4)\n +.071*g(dx,-10,46)*g(dy,3+.08*dx,9.5)\n +.035*g(dx,-39,73)*g(dy,4+.065*dx,19))\n shadow = np.maximum(0, shadow-.00075)\n bg *= 1-shadow[...,None]*np.array([1.015,1.,.985], np.float32)\n\n ss = max(1,min(3,1800//max(w,h)))\n sw, sh = w*ss, h*ss\n S = np.array([sw/512,sh/512])\n frame = np.zeros((sh,sw,4),np.uint8)\n\n def fill(pts, color):\n pts = np.rint(np.asarray(pts)*S*16).astype(np.int32)\n cv2.fillConvexPoly(frame,pts,tuple(int(np.clip(c,0,255)) for c in color)+(255,),lineType=cv2.LINE_8,shift=4)\n\n fill(back,[30,32,34])\n # Shaded cross-section of the rounded graphite frame.\n bands = np.linspace(0,1,35)\n for i,p in enumerate(contour):\n q = contour[(i+1)%len(contour)]\n a,b = project(*p),project(*q)\n da,db = back[i]-a,back[(i+1)%len(contour)]-b\n tang = b-a\n if tang[1]*da[0]-tang[0]*da[1] <= 0:\n continue\n v = (p[1]+q[1])*.5\n normal_right = (q[1]-p[1])/max(1e-5,np.linalg.norm(q-p))\n right = max(0.,normal_right)\n length_light = 8*g(v,67,60)+5*g(v,245,84)-8*g(v,377,40)\n for j in range(len(bands)-1):\n t0,t1 = bands[j:j+2]\n t = (t0+t1)*.5\n lum = 39 + 22*right + length_light\n lum += -19*g(t,.024,.044)+39*g(t,.17,.078)+8*g(t,.48,.19)-20*g(t,.76,.12)+20*g(t,.93,.051)-9*g(t,1,.028)\n fill([a+da*t0,b+db*t0,b+db*t1,a+da*t1],[lum-2,lum,lum+3])\n\n def rounded(x0,y0,x1,y1,rx,ry):\n pts=[]\n for cx0,cy0,lo in [(x1-rx,y0+ry,-90),(x1-rx,y1-ry,0),(x0+rx,y1-ry,90),(x0+rx,y0+ry,180)]:\n for angle in np.linspace(lo,lo+90,9):\n ang=math.radians(angle)\n pts.append((cx0+rx*math.cos(ang),cy0+ry*math.sin(ang)))\n return pts\n\n def rail_pill(t0,v0,t1,v1,rx,ry,light,raise_u=0.):\n fill([project(W+raise_u,v,t) for t,v in rounded(t0,v0,t1,v1,rx,ry)], light)\n\n for v0,v1 in [(84,119),(146,173)]:\n rail_pill(.29,v0-1,.77,v1+1,.17,2.7,[24,26,29])\n rail_pill(.34,v0,.70,v1,.13,2.4,[84,87,92],.72)\n rail_pill(.43,v0+.65,.72,v1-.65,.12,1.9,[58,61,65],.78)\n rail_pill(.385,v0+2,.447,v1-2,.026,1.1,[109,112,116],.8)\n for v in (42,346):\n fill([project(W,v,.06),project(W,v+1.2,.06),project(W,v+1.2,.97),project(W,v,.97)],[45,46,48])\n\n # The bottom rail has a small charging recess and speaker perforations.\n def bottom_pill(u0,t0,u1,t1,ru,rt,col):\n fill([project(u,H,t) for u,t in rounded(u0,t0,u1,t1,ru,rt)],col)\n bottom_pill(84,.29,100,.75,2.2,.20,[77,79,82])\n bottom_pill(85,.34,99,.72,2.,.17,[18,19,21])\n bottom_pill(88,.49,96,.56,.7,.031,[52,54,58])\n for u in (111,115.4,119.8,124.2,128.6):\n bottom_pill(u,.39,u+2,.67,.93,.135,[26,28,31])\n\n # Procedural glass and bezel, shaded in the plane of the display.\n Q = 4\n pad = 2\n tw,th = int((W+2*pad)*Q)+1,int((H+2*pad)*Q)+1\n U,V = np.meshgrid(np.arange(tw,dtype=np.float32)/Q-pad,np.arange(th,dtype=np.float32)/Q-pad)\n def sdf(x,y,x0,y0,x1,y1,r):\n a = np.abs(x-(x0+x1)*.5)-((x1-x0)*.5-r)\n b = np.abs(y-(y0+y1)*.5)-((y1-y0)*.5-r)\n return np.hypot(np.maximum(a,0),np.maximum(b,0))+np.minimum(np.maximum(a,b),0)-r\n\n d = sdf(U,V,0,0,W,H,R)\n z = -d\n left = 1-smooth(U/W)\n high = 1-smooth(V/H)\n rim = 35+22*left+11*high\n rim += (48+35*left)*g(z,.76,.52)-22*g(z,.02,.30)+14*g(z,1.71,.26)\n bezel = 14+7*high+3*left+8*g(z,2.36,.37)\n base = rim*(1-smooth((z-1.72)/.67))+bezel*smooth((z-1.72)/.67)\n face = base[...,None]+np.array([-1.,.4,2.],np.float32)\n\n inner = sdf(U,V,4.5,4.8,W-4.5,H-5.7,17.8)\n sheen = 12.3 + 13.5*np.maximum(0,1-V/H)**1.8 + 3.6*left\n sheen += 7.5*(1-smooth((V-(143-.40*U)+7)/24))*g(U,58,116)\n sheen += 3.1*g(U+.26*V,41,29)*g(V,97,155)\n sheen += 2.1*g(V,366,18)*g(U,123,66)\n sheen += 2.8*g(inner,-.44,.32)*(.35+.65*left)\n glass = sheen[...,None]*np.array([.947,1.,1.064],np.float32)+np.array([0.,.35,1.05],np.float32)\n screen_mix = smooth((.32-inner)/.72)[...,None]\n face = face*(1-screen_mix)+glass*screen_mix\n\n def tint(col,weight):\n a = np.clip(weight,0,1)[...,None]\n face[:] = face*(1-a)+np.asarray(col,np.float32)*a\n\n # Recessed earpiece and the small front-camera lens.\n slot = sdf(U,V,80.5,2.28,103.5,3.67,.68)\n tint([8,9,11],smooth((.28-slot)/.5))\n tint([50,53,57],.53*g(V,2.37,.20)*smooth((U-80.8)/1.8)*smooth((103.2-U)/1.8))\n cam = np.hypot(U-92,V-14.5)\n tint([51,54,58],.61*g(cam,3.02,.30))\n tint([8,9,12],smooth((2.86-cam)/.43))\n tint([25,32,42],.67*g(cam,0,1.23))\n tint([76,91,105],.54*g(U,91.52,.34)*g(V,13.96,.32))\n tint([44,54,61],.37*g(U,92.48,.34)*g(V,15.09,.25))\n noise = np.random.default_rng(9).normal(0,.24,(th,tw)).astype(np.float32)\n face = np.clip(face+noise[...,None],0,255)\n alpha = smooth(.5-d*Q)\n tex = np.concatenate((face*alpha[...,None],(alpha*255)[...,None]),axis=2).astype(np.float32)\n to_uv = np.array([[1/Q,0,-pad],[0,1/Q,-pad],[0,0,1]],np.float64)\n to_pixels = np.diag([S[0],S[1],1.])\n front = cv2.warpPerspective(tex,to_pixels@M@to_uv,(sw,sh),flags=cv2.INTER_LINEAR,borderMode=cv2.BORDER_CONSTANT)\n scene = front+frame.astype(np.float32)*(1-front[...,3:4]/255.)\n phone = cv2.resize(scene,(w,h),interpolation=cv2.INTER_AREA) if ss!=1 else scene\n out = phone[...,:3]+bg*(1-phone[...,3:4]/255.)\n return Image.fromarray(np.clip(np.rint(out),0,255).astype(np.uint8),'RGB')","scores": {"instruction_adherence": 5,"preservation": 4,"visual_quality": 5,"target_extent_score": 5,"target_extent_complete": true,"pass": true,"reason": "The visible watch, including face and band, has been fully replaced by a realistic phone. The background and overall product-photo style are mostly preserved, with only expected shadow/composition changes from the replacement. The result is visually coherent and high quality.","rubric_version": "full_visible_target_v1","annotated_target_box": null,"difference_evidence": {"scope": "full_image","changed_pixel_fraction": 0.47252655029296875,"mean_absolute_rgb_delta": 45.467620849609375,"mean_signed_rgb_delta": 1.6239484548568726,"mean_delta_among_changed_pixels": 96.22235870361328,"changed_pixels_outside_box": null},"judge_evidence_version": "aligned_rgb_delta_v1","raw_reward": 0.95,"reward": 0.95,"reward_eligible": true,"reward_version": "semantic_gates_v3_extent"},"time": 1796064162.8906367},{"id": "anyedit_s202_341__rft_paper5","teacher": "GPT-6.2-Sol","mode": "rft","source_name": "anyedit","source": "paper_assets/37/374e2201ac7fc38bfeb7.jpg","output": "paper_assets/67/6713dab6f51a04096dec.jpg","instruction": "replace the diagram with a picture of a cat","code": "def edit(image):\n from PIL import Image, ImageDraw, ImageFilter, ImageChops\n import numpy as np\n import cv2\n import math\n import random\n\n w, h = image.size\n src = np.asarray(image.convert('RGB'), dtype=np.float32)\n x = (np.arange(w, dtype=np.float32) + .5) * 512 / w\n y = (np.arange(h, dtype=np.float32) + .5) * 512 / h\n def sample(a, b):\n sel = (x >= a) & (x <= b)\n if not sel.any():\n sel[np.argmin(abs(x-(a+b)/2))] = True\n rows = np.median(src[:, sel, :], axis=1).astype(np.float32)\n return cv2.GaussianBlur(rows[:, None, :], (1, 0), 1, sigmaY=max(1, h/95))\n left, right = sample(95, 115), sample(393, 414)\n f = np.clip((x-105)/299, 0, 1)[None, :, None]\n field = left*(1-f) + right*f\n def smooth(a):\n a = np.clip(a, 0, 1)\n return a*a*(3-2*a)\n erase = (smooth(np.minimum(x-114, 390-x)/12)[None, :] * smooth(np.minimum(y-29, 479-y)/12)[:, None])[:, :, None]\n clean = Image.fromarray(np.uint8(np.clip(src*(1-erase)+field*erase+.5,0,255)), 'RGB')\n\n ss = 3\n n = 512*ss\n canvas = Image.new('RGBA', (n,n))\n rng = random.Random(42)\n nrng = np.random.default_rng(49)\n noise = cv2.resize(nrng.normal(0,1,(360,360)).astype(np.float32),(n,n),interpolation=cv2.INTER_CUBIC)\n noise = .72*noise + .28*nrng.normal(0,1,(n,n)).astype(np.float32)\n def color(s):\n return tuple(int(s[i:i+2],16) for i in (0,2,4))\n def points(s):\n a = s.split(); j = 0; out = []; x0 = y0 = 0\n while j < len(a):\n op = a[j]; j += 1\n if op in ('M','L'):\n x0,y0 = map(float,a[j:j+2]); j += 2\n out.append((x0,y0))\n elif op == 'C':\n ax,ay,bx,by,ex,ey = map(float,a[j:j+6]); j += 6\n steps = max(9,min(44,int((math.hypot(ax-x0,ay-y0)+math.hypot(bx-ax,by-ay)+math.hypot(ex-bx,ey-by))/3)))\n for k in range(1,steps+1):\n t = k/steps; u = 1-t\n out.append((u**3*x0+3*u*u*t*ax+3*u*t*t*bx+t**3*ex, u**3*y0+3*u*u*t*ay+3*u*t*t*by+t**3*ey))\n x0,y0 = ex,ey\n elif op == 'Z':\n out.append(out[0])\n return [(round(xx*ss),round(yy*ss)) for xx,yy in out]\n def mask(s):\n m=Image.new('L',(n,n)); ImageDraw.Draw(m).polygon(points(s),fill=255); return m\n def oval(x0,y0,x1,y1):\n m=Image.new('L',(n,n)); ImageDraw.Draw(m).ellipse(tuple(round(v*ss) for v in (x0,y0,x1,y1)),fill=255); return m\n def paint(shape,dark,light=None,grad=None,alpha=255,soft=0,grain=0,clip=None):\n m=mask(shape) if isinstance(shape,str) else shape\n if soft: m=m.filter(ImageFilter.GaussianBlur(soft*ss))\n if clip is not None: m=ImageChops.multiply(m,clip)\n box=m.getbbox()\n if box is None: return m\n l,t,r,b=box\n a=np.asarray(m.crop(box))\n patch=np.empty((b-t,r-l,4),dtype=np.uint8)\n c=np.array(color(dark),dtype=np.float32)\n if light is not None:\n cx,cy,rx,ry=grad\n xx=(np.arange(l,r,dtype=np.float32)/ss-cx)/rx\n yy=(np.arange(t,b,dtype=np.float32)/ss-cy)/ry\n z=np.clip(1-np.sqrt(xx[None,:]**2+yy[:,None]**2),0,1)**.68\n vals=c+z[:,:,None]*(np.array(color(light),dtype=np.float32)-c)\n else:\n vals=c\n if grain: vals=vals+grain*noise[t:b,l:r,None]\n patch[:,:,:3]=np.uint8(np.clip(vals,0,255))\n patch[:,:,3]=a if alpha==255 else np.uint8(a.astype(np.float32)*(alpha/255))\n canvas.alpha_composite(Image.fromarray(patch,'RGBA'),dest=(l,t))\n return m\n def strokes(items,clip=None):\n lay=Image.new('RGBA',(n,n)); d=ImageDraw.Draw(lay)\n for s,c,a,th in items:\n d.line(points(s),fill=color(c)+(a,),width=max(1,round(th*ss)),joint='curve')\n if clip is not None: lay.putalpha(ImageChops.multiply(lay.getchannel('A'),clip))\n canvas.alpha_composite(lay)\n def fur(m,box,count,head=False):\n lay=Image.new('RGBA',(n,n)); d=ImageDraw.Draw(lay); mp=m.load(); cp=canvas.load()\n l,t,r,b=box\n for i in range(count):\n xx=rng.uniform(l,r); yy=rng.uniform(t,b); px=int(xx*ss); py=int(yy*ss)\n if mp[px,py]<245: continue\n if head:\n if yy<120 and (xx<211 or xx>288):\n dx=(xx-(179 if xx<243 else 317))*.017; dy=-1\n else:\n dx=max(-1.4,min(1.4,(xx-246)/44)); dy=.79 if yy>154 else 1.15\n if yy>200 and abs(xx-246)<35: dx*=.65\n else:\n dx=max(-1,min(1,(xx-244)/79))*.62; dy=1\n if yy>331 and 191<xx<291: dx*=.35\n if xx>348: dx=.30 if yy<399 else -.9; dy=.84 if yy<425 else .26\n dx+=rng.uniform(-.35,.35); dy+=rng.uniform(-.23,.23)\n length=rng.uniform(1.25,4.7) if head else rng.uniform(1.6,5.9)\n ln=length*ss/max(.35,math.hypot(dx,dy)); qx=round(px+dx*ln); qy=round(py+dy*ln)\n if not(0<=qx<n and 0<=qy<n) or mp[qx,qy]<230: continue\n base=cp[px,py][:3]\n val=rng.choice((-1,-1,1,1,1))*rng.uniform(16,64)\n c=tuple(max(0,min(255,round(v+val))) for v in base)\n d.line([(px,py),(round((px+qx)*.5+dy),round((py+qy)*.5-dx)),(qx,qy)],fill=c+(rng.randint(40,105),),width=rng.choice((1,1,1,2)))\n canvas.alpha_composite(lay)\n\n paint(oval(143,428,389,465),'867565',alpha=38,soft=10)\n paint(oval(170,438,367,454),'70594a',alpha=36,soft=4)\n tail=paint('M 304 414 C 324 423 351 425 362 408 C 372 392 363 375 355 366 C 346 357 350 350 356 347 C 364 342 373 350 380 362 C 393 386 387 422 370 439 C 351 458 319 460 294 447 Z','9e4e29','e9a15c',(364,383,45,64),grain=3.0)\n for s in (\n 'M 347 357 C 355 361 369 362 374 355 L 380 366 C 373 371 359 371 351 367 Z',\n 'M 358 381 C 367 387 385 384 388 377 L 391 391 C 380 396 368 395 361 390 Z',\n 'M 361 405 C 366 411 378 417 386 411 L 380 424 C 371 427 361 420 355 415 Z',\n 'M 344 420 C 340 433 350 448 360 449 L 347 455 C 339 449 331 434 334 422 Z',\n 'M 314 418 C 309 430 314 446 322 455 L 308 453 C 303 445 301 431 304 423 Z'):\n paint(s,'803d27','b5683b',(368,383,46,72),alpha=198,soft=.55,clip=tail)\n body=paint('M 210 213 C 192 230 176 260 176 295 C 176 318 182 332 174 347 C 159 369 153 394 162 417 C 170 439 189 450 223 447 C 242 451 269 453 292 447 C 324 452 345 441 347 413 C 349 380 332 346 318 325 C 313 279 301 240 282 218 Z','a2512c','f2b367',(224,266,124,191),grain=3)\n paint('M 285 283 C 311 312 337 353 344 393 C 349 419 337 440 316 445 C 294 450 279 434 277 414 C 283 381 260 348 268 315 Z','98502e','df9550',(311,368,52,73),alpha=181,soft=2,clip=body)\n paint('M 167 349 C 183 322 213 330 222 359 C 231 390 223 433 204 444 C 178 444 161 427 160 404 C 155 384 160 363 167 349 Z','a55530','eaa052',(182,373,54,80),alpha=205,soft=1.6,clip=body)\n for s in (\n 'M 178 276 C 190 289 205 294 218 296 C 207 305 187 298 175 289 Z',\n 'M 175 307 C 188 320 201 319 212 321 C 205 327 187 331 175 320 Z',\n 'M 171 348 C 180 348 197 354 203 365 C 192 360 176 361 163 365 Z',\n 'M 159 379 C 174 371 194 374 202 384 C 189 379 172 386 156 396 Z',\n 'M 160 410 C 177 399 193 401 202 408 C 188 408 178 415 169 425 Z',\n 'M 302 281 C 297 289 286 302 270 309 C 288 310 302 304 309 297 Z',\n 'M 314 320 C 302 335 289 338 278 339 C 294 348 309 343 321 334 Z',\n 'M 332 352 C 321 348 307 348 297 358 C 309 355 325 360 338 366 Z',\n 'M 343 380 C 327 373 309 377 301 386 C 315 384 333 391 347 396 Z',\n 'M 347 406 C 332 399 317 402 305 410 C 321 410 335 417 342 423 Z'):\n paint(s,'8f4429','bd703c',(227,302,115,160),alpha=182,soft=.8,clip=body)\n paint('M 190 248 C 207 229 219 233 241 238 C 262 236 275 231 291 246 C 303 263 291 294 282 309 L 284 302 C 272 319 265 327 250 340 L 251 334 C 234 352 223 343 217 334 L 216 340 C 205 329 200 320 194 313 L 196 320 C 186 304 184 281 190 248 Z','d3945b','fff0cc',(236,266,53,88),alpha=233,soft=1.35,grain=2.7,clip=body)\n paint('M 228 327 C 246 326 265 329 277 348 C 281 374 280 419 286 442 C 265 455 236 453 218 445 C 231 416 226 362 228 327 Z','733f32','b87346',(247,366,51,99),alpha=157,soft=3,clip=body)\n fore1=paint('M 201 319 C 208 326 220 333 232 334 C 239 357 237 398 235 418 C 235 426 241 434 238 441 C 235 453 203 457 193 448 C 184 440 191 429 199 421 C 202 405 196 374 196 353 C 195 337 198 324 201 319 Z','b6673b','f2c285',(211,402,34,78),grain=2.8)\n fore2=paint('M 257 331 C 268 326 281 319 289 323 C 300 344 291 381 289 410 C 286 420 289 425 294 431 C 302 445 291 454 272 456 C 253 457 242 449 246 437 C 253 424 254 417 253 403 C 251 378 249 350 257 331 Z','b2673d','f5c78b',(264,402,39,84),grain=2.8)\n for s,m in (\n ('M 193 345 C 205 353 214 350 223 351 C 215 358 202 359 193 354 Z',fore1),\n ('M 194 366 C 202 367 215 366 224 363 C 218 371 204 377 195 375 Z',fore1),\n ('M 197 394 C 203 393 209 388 216 387 C 213 394 207 400 197 402 Z',fore1),\n ('M 294 346 C 280 353 273 351 263 349 C 272 358 284 360 294 355 Z',fore2),\n ('M 293 370 C 283 372 269 369 265 364 C 265 371 277 379 291 379 Z',fore2),\n ('M 292 394 C 278 397 272 391 267 389 C 269 397 278 402 291 403 Z',fore2)):\n paint(s,'9f542e',alpha=146,soft=.72,clip=m)\n paint(oval(191,429,236,453),'ecc692','ffe2b2',(205,437,36,19),alpha=174,soft=1.6,clip=fore1)\n paint(oval(247,431,293,456),'e6b781','ffe1ae',(269,439,32,18),alpha=165,soft=1.65,clip=fore2)\n fur(ImageChops.lighter(ImageChops.lighter(body,tail),ImageChops.lighter(fore1,fore2)),(152,231,391,459),13700)\n strokes([\n ('M 201 440 C 199 442 198 447 200 450','8d593c',126,.82),\n ('M 212 442 C 210 446 210 450 211 452','8d593c',115,.82),\n ('M 258 443 C 256 446 256 450 257 452','8d593c',124,.88),\n ('M 270 445 C 269 448 269 452 271 454','8d593c',125,.85)])\n paint('M 183 211 C 204 218 223 216 246 222 C 270 216 294 221 314 222 C 309 252 278 269 247 270 C 220 268 191 251 183 211 Z','8f4d31',alpha=126,soft=4)\n\n head=paint('M 167 153 C 163 137 159 116 160 96 C 160 79 164 62 171 57 C 177 52 193 65 206 79 C 217 91 225 102 230 110 C 242 107 256 106 269 109 C 280 91 296 68 315 55 C 322 51 327 56 328 65 C 332 88 332 117 324 143 C 325 159 331 172 335 187 C 340 201 333 217 321 226 C 308 237 287 245 272 250 C 258 258 240 257 225 251 C 209 250 188 241 174 232 C 157 222 147 207 150 193 C 152 178 161 168 167 153 Z','ac592f','f5be74',(231,169,116,113),grain=3)\n paint('M 171 144 C 165 123 165 93 172 68 C 185 71 211 95 222 116 C 205 116 184 126 171 144 Z','d1905c','ffd496',(179,86,52,57),soft=.75,grain=2.0,clip=head)\n paint('M 175 135 C 170 117 171 88 175 76 C 186 79 209 103 214 116 C 198 119 185 125 175 135 Z','a0564e','df9e8d',(183,96,34,42),soft=1,grain=2.3)\n paint('M 279 114 C 286 97 301 75 318 63 C 325 78 326 110 319 137 C 307 124 293 118 279 114 Z','cb8a55','ffd494',(311,87,43,56),soft=.8,grain=2.1)\n paint('M 287 115 C 293 101 308 81 317 74 C 322 90 320 115 316 130 C 306 123 297 119 287 115 Z','985149','db9a89',(313,92,30,44),soft=.85,grain=2.4)\n paint('M 162 178 C 183 152 205 140 226 143 C 242 153 249 172 248 197 C 231 207 220 221 189 228 C 164 226 147 211 155 192 Z','d87d40','ffd49a',(196,178,62,49),alpha=169,soft=3,clip=head)\n paint('M 259 147 C 284 140 322 157 330 181 C 338 204 326 226 303 230 C 290 221 265 207 248 198 C 244 175 255 154 259 147 Z','cb723d','f8c389',(288,175,53,54),alpha=186,soft=2.6,clip=head)\n paint('M 221 165 C 230 171 238 186 245 186 C 253 186 260 172 269 166 C 263 180 262 193 270 201 C 282 207 289 216 287 230 C 274 241 224 238 209 227 C 208 214 222 207 229 199 C 235 188 224 175 221 165 Z','d3894e','f7c98b',(243,198,39,47),alpha=228,soft=2.1)\n for s in (\n 'M 222 109 C 227 119 230 130 237 148 C 225 142 218 126 211 118 Z',\n 'M 237 108 C 239 125 241 139 246 154 C 249 144 246 128 248 107 Z',\n 'M 255 107 C 255 121 251 138 252 151 C 260 142 265 125 266 109 Z',\n 'M 276 111 C 272 127 264 137 262 149 C 276 140 282 124 291 116 Z',\n 'M 175 144 C 197 139 218 151 231 164 C 211 156 192 149 168 153 Z',\n 'M 166 157 C 180 154 191 158 202 166 C 187 164 177 165 161 170 Z',\n 'M 271 162 C 287 145 302 140 321 143 L 326 152 C 305 149 285 155 271 162 Z',\n 'M 299 164 C 311 159 322 155 329 160 L 331 171 C 319 165 307 165 299 164 Z',\n 'M 151 191 C 165 191 179 201 192 205 C 176 209 163 203 150 201 Z',\n 'M 153 207 C 167 208 178 215 196 217 C 184 222 168 220 158 216 Z',\n 'M 306 206 C 318 200 327 193 337 190 L 337 200 C 327 204 317 208 306 206 Z',\n 'M 300 220 C 311 216 324 208 335 207 L 331 216 C 321 221 308 226 300 220 Z'):\n paint(s,'914428','be713c',(243,148,100,97),alpha=220,soft=.65,clip=head)\n paint('M 173 178 C 181 162 196 162 210 168 C 224 174 233 185 235 198 C 225 210 209 212 193 204 C 181 199 175 191 173 178 Z','dfa568','ffe2b2',(202,195,39,26),alpha=236,soft=1.8)\n paint('M 264 197 C 266 183 275 174 287 168 C 301 163 314 165 324 177 C 323 189 315 202 302 206 C 285 213 271 207 264 197 Z','e1a062','ffe0ad',(293,196,38,26),alpha=237,soft=1.8)\n paint('M 200 220 C 213 214 229 221 245 226 C 255 225 275 215 291 221 C 290 239 273 252 247 254 C 224 253 208 245 200 220 Z','d6a674','fff1d8',(246,243,44,27),alpha=249,soft=1.5,clip=head)\n paint('M 247 220 C 238 204 228 201 216 205 C 203 209 195 220 201 229 C 208 242 233 242 247 230 C 261 242 285 240 292 229 C 298 219 285 207 273 204 C 262 201 251 207 247 220 Z','ebbd8c','fff2d8',(243,223,53,24),alpha=253,soft=1.12,grain=1.7)\n fur(head,(148,54,339,258),13100,True)\n strokes([\n ('M 176 132 C 182 124 177 119 174 114','ffe3b9',166,.8),\n ('M 179 131 C 185 122 181 115 178 110','ffe0b3',175,.72),\n ('M 182 129 C 188 122 186 115 183 111','fff0c5',168,.75),\n ('M 185 128 C 192 120 190 117 189 113','ffe4b7',170,.7),\n ('M 310 128 C 304 121 308 115 310 111','ffe5bc',172,.75),\n ('M 313 130 C 306 120 312 113 315 107','ffe7c1',170,.75),\n ('M 316 130 C 313 124 317 117 319 114','fff0c8',184,.72),\n ('M 306 125 C 300 120 302 115 304 111','ffdeb3',168,.7)])\n paint('M 175 177 C 186 169 201 169 212 175 C 222 180 228 189 233 196 C 222 205 207 205 193 201 C 183 197 178 189 175 177 Z','4e2e25','87513a',(206,183,36,24),soft=.43)\n paint('M 264 196 C 270 186 276 178 287 174 C 301 169 315 170 324 176 C 320 190 314 199 303 202 C 289 206 274 204 264 196 Z','4e2d24','86513b',(288,184,37,23),soft=.43)\n eye1=paint('M 181 179 C 193 173 204 175 212 180 C 219 184 223 190 228 195 C 215 202 191 199 181 179 Z','8a8c4c','e1d893',(207,193,26,16))\n eye2=paint('M 269 195 C 275 187 281 180 290 178 C 299 174 311 174 318 178 C 311 195 292 204 269 195 Z','8a8850','e4d995',(291,194,28,17))\n for ex,ey,m in ((205.5,186.5,eye1),(292,186,m:=eye2)):\n if ex>250: m=eye2\n iris=paint(oval(ex-13.4,ey-14,ex+13.4,ey+14),'4b5b34','8d9b58',(ex,ey+5,16,16),clip=m)\n iris=paint(oval(ex-11.9,ey-12,ex+11.9,ey+12.6),'63713d','c9cb79',(ex+1,ey+7,16,17),clip=iris,grain=2.4)\n dots=Image.new('RGBA',(n,n)); dd=ImageDraw.Draw(dots)\n for k in range(106):\n a=rng.uniform(0,6.2832); r0=rng.uniform(5,9.4); r1=rng.uniform(r0,12.3)\n ca=math.cos(a); sa=math.sin(a)\n dd.line([(round((ex+ca*r0)*ss),round((ey+sa*r0)*ss)),(round((ex+ca*r1)*ss),round((ey+sa*r1)*ss))],fill=rng.choice(((238,214,121,105),(79,101,51,94),(149,169,92,154))),width=1)\n dots.putalpha(ImageChops.multiply(dots.getchannel('A'),iris)); canvas.alpha_composite(dots)\n paint(oval(ex-4.7,ey-13.8,ex+4.7,ey+12),'22281e','3d4030',(ex,ey,7,13),soft=.28,clip=m)\n paint(oval(ex-5.1,ey-6.1,ex+.4,ey-1.4),'fffcf2',alpha=239,soft=.34,clip=m)\n paint(oval(ex+3.4,ey+4.2,ex+5.5,ey+6.3),'f8e9bd',alpha=158,soft=.24,clip=m)\n strokes([\n ('M 178 178 C 194 170 210 173 224 189','432d22',214,1.15),\n ('M 273 190 C 286 174 304 171 321 177','432d22',213,1.15),\n ('M 247 222 C 247 226 247 228 247 231 C 242 235 236 236 230 233','774b3d',225,1.12),\n ('M 247 231 C 252 235 258 236 264 232','774b3d',225,1.12)])\n paint('M 235 215 C 236 211 244 210 247 211 C 251 210 259 211 260 215 C 258 220 252 223 249 226 C 248 227 246 227 245 225 C 242 221 236 219 235 215 Z','90534c','dd9c8c',(247,214,13,9),soft=.32,grain=1.3)\n strokes([('M 239 214 C 244 212 251 212 256 214','ffd1b8',128,.8),('M 243 239 C 247 240 251 240 254 238','ffefd4',133,1.0)])\n for xx,yy,rr in [(216,218,1.11),(222,216,.8),(228,220,.89),(219,224,1),(226,226,.74),(213,224,.69),(268,220,1),(274,216,.77),(280,219,1),(276,224,.81),(282,225,.64),(269,226,.74)]:\n paint(oval(xx-rr,yy-rr,xx+rr,yy+rr),'985d44',alpha=174,soft=.29)\n whiskers=[\n 'M 223 220 C 197 207 164 204 126 213',\n 'M 218 224 C 190 219 156 222 122 237',\n 'M 220 228 C 193 229 170 238 144 255',\n 'M 227 229 C 207 235 187 247 176 260',\n 'M 271 220 C 302 205 333 203 369 211',\n 'M 276 224 C 306 218 340 223 374 236',\n 'M 275 228 C 306 228 334 241 353 255',\n 'M 268 231 C 286 235 307 248 318 261']\n lay=Image.new('RGBA',(n,n)); d=ImageDraw.Draw(lay)\n for j,s in enumerate(whiskers):\n ps=points(s)\n for i in range(1,len(ps)):\n q=i/(len(ps)-1)\n a=max(0,round((1-q**4)*(132 if j not in (3,7) else 94)))\n p0=(ps[i-1][0],ps[i-1][1]+1); p1=(ps[i][0],ps[i][1]+1)\n d.line((p0,p1),fill=(130,104,86,a),width=2 if q<.65 else 1)\n canvas.alpha_composite(lay)\n lay=Image.new('RGBA',(n,n)); d=ImageDraw.Draw(lay)\n for j,s in enumerate(whiskers):\n ps=points(s)\n for i in range(1,len(ps)):\n q=i/(len(ps)-1)\n d.line((ps[i-1],ps[i]),fill=(255,247,226,round(222*(1-q**2))),width=3 if q<.39 else 2 if q<.74 else 1)\n canvas.alpha_composite(lay)\n return Image.alpha_composite(clean.convert('RGBA'),canvas.resize((w,h),Image.Resampling.LANCZOS)).convert('RGB')","scores": {"instruction_adherence": 5,"preservation": 5,"visual_quality": 5,"target_extent_score": 5,"target_extent_complete": true,"pass": true,"reason": "The anatomical diagram has been fully replaced by a clear, high-quality picture of a cat. The unrelated white background is preserved, and the edit covers the full visible target rather than only part of it.","rubric_version": "full_visible_target_v1","annotated_target_box": null,"difference_evidence": {"scope": "full_image","changed_pixel_fraction": 0.3893318176269531,"mean_absolute_rgb_delta": 24.13456153869629,"mean_signed_rgb_delta": 1.6277223825454712,"mean_delta_among_changed_pixels": 61.98970031738281,"changed_pixels_outside_box": null},"judge_evidence_version": "aligned_rgb_delta_v1","raw_reward": 0.9999999999999999,"reward": 0.9999999999999999,"reward_eligible": true,"reward_version": "semantic_gates_v3_extent"},"time": 1796064004.5362816},{"id": "ultraedit_11035__rft_paper5","teacher": "GPT-6.2-Sol","mode": "rft","source_name": "ultraedit","source": "paper_assets/e9/e91299a7977a16d7ced4.jpg","output": "paper_assets/1e/1e60720d502be457dff1.jpg","instruction": "Replace the pizzas with exotic fruit platters","code": "def edit(image):\n from PIL import Image, ImageDraw, ImageFilter, ImageChops\n import numpy as np\n import cv2\n import math\n import random\n\n src = image.convert('RGB')\n w, h = image.size\n S = 4\n N = 512 * S\n full = (N, N)\n rng = random.Random(141)\n noise = np.random.default_rng(713)\n tau = 2 * math.pi\n aacos = math.cos\n ssin = math.sin\n L = Image.Resampling.LANCZOS\n\n def make_platter(cx, cy, sx, sy, distant=False):\n art = Image.new('RGBA', full)\n clip = Image.new('L', full)\n\n def xy(x,y):\n return (round((cx + sx*x)*S), round((cy + sy*y)*S))\n\n def points(poly):\n return [xy(x,y) for x,y in poly]\n\n def oval(x,y,rx,ry,ang=0,n=64):\n ca, sa = aacos(ang), ssin(ang)\n return [(x+rx*aacos(t*tau/n)*ca-ry*ssin(t*tau/n)*sa,\n y+rx*aacos(t*tau/n)*sa+ry*ssin(t*tau/n)*ca) for t in range(n)]\n\n def solid(poly, col):\n ImageDraw.Draw(art).polygon(points(poly), fill=tuple(col)+(255,))\n\n def dot(x,y,rx,ry,col,ang=0):\n solid(oval(x,y,rx,ry,ang,12),col)\n\n def stroke(poly,col,width):\n ImageDraw.Draw(art).line(points(poly), fill=tuple(col)+(255,), width=max(1,round(width*S*min(sx,sy))))\n\n def paint(poly,col,grad=22,grain=4):\n p = points(poly)\n x0 = max(0,min(x for x,y in p)); x1 = min(N,max(x for x,y in p)+1)\n y0 = max(0,min(y for x,y in p)); y1 = min(N,max(y for x,y in p)+1)\n bw,bh = x1-x0,y1-y0\n if bw<1 or bh<1:\n return\n m = Image.new('L',(bw,bh))\n ImageDraw.Draw(m).polygon([(x-x0,y-y0) for x,y in p],fill=255)\n v,u = np.ogrid[0:bh,0:bw].astype(np.float32) if False else (np.linspace(0,1,bh,dtype=np.float32)[:,None],np.linspace(0,1,bw,dtype=np.float32)[None,:])\n coarse = cv2.resize(noise.normal(0,1,(6,9)).astype(np.float32),(bw,bh),interpolation=cv2.INTER_CUBIC)\n t = grad*(0.56-0.34*u-0.91*v+0.23*np.exp(-8*((u-.29)**2+(v-.24)**2)))\n t = t + grain*(.68*coarse+.33*noise.standard_normal((bh,bw)))\n rgb = np.clip(np.array(col)[None,None,:]+t[:,:,None],0,255).astype(np.uint8)\n art.paste(Image.fromarray(rgb).convert('RGBA'),(x0,y0),m)\n\n def cast(poly,opacity,blur,inside=True):\n p=points(poly)\n r=max(.7,blur*S*(sx+sy)/2)\n margin=int(3*r)+3\n x0=max(0,min(x for x,y in p)-margin); x1=min(N,max(x for x,y in p)+margin+1)\n y0=max(0,min(y for x,y in p)-margin); y1=min(N,max(y for x,y in p)+margin+1)\n m=Image.new('L',(x1-x0,y1-y0))\n ImageDraw.Draw(m).polygon([(x-x0,y-y0) for x,y in p],fill=opacity)\n m=m.filter(ImageFilter.GaussianBlur(r))\n if inside:\n m=ImageChops.multiply(m,clip.crop((x0,y0,x1,y1)))\n shade=Image.new('RGBA',m.size,(56,36,33,0)); shade.putalpha(m)\n art.alpha_composite(shade,(x0,y0))\n\n def tray(rx,ry,dy=0):\n out=[]\n for j in range(150):\n t=tau*j/150\n c,s=aacos(t),ssin(t)\n x=rx*math.copysign(abs(c)**.66,c)\n y=ry*math.copysign(abs(s)**.70,s)+dy+.012*x\n out.append((x,y))\n return out\n\n cast(tray(109,39,6),99,2.3,False)\n paint(tray(109,40,3.8),(107,111,108),34,2)\n paint(tray(110,40,1.7),(176,182,176),30,2)\n paint(tray(110,39.4,-.4),(222,221,210),28,1.5)\n paint(tray(104.5,35.4,-.8),(164,174,165),25,1.8)\n inner=tray(101.8,33.5,.25)\n paint(inner,(201,204,184),20,2)\n ImageDraw.Draw(clip).polygon(points(tray(107,37.3)),fill=255)\n\n def kiwi(x,y,rx,ry,a):\n cast(oval(x+1,y+3,rx+1,ry+1,a),68,1.5)\n ca,sa=aacos(a),ssin(a)\n def q(u,v): return x+u*ca-v*sa,y+u*sa+v*ca\n paint(oval(x,y+2.8,rx,ry,a),(111,91,51),35,7)\n paint(oval(x,y,rx,ry,a),(133,118,68),24,5)\n paint(oval(x,y,rx*.93,ry*.89,a),(151,176,65),34,6)\n paint(oval(x-.15,y-.1,rx*.77,ry*.71,a),(166,190,79),25,6)\n for i in range(34):\n t=tau*i/34+rng.uniform(-.06,.06)\n c,s=aacos(t),ssin(t)\n r=rng.uniform(.74,.9)\n stroke([q(rx*.18*c,ry*.19*s),q(rx*r*c,ry*r*s)],rng.choice([(184,200,105),(199,209,127),(145,170,59)]),rng.uniform(.24,.55))\n r=rng.uniform(.38,.57)\n px,py=q(rx*r*c,ry*r*s)\n dot(px,py,rng.uniform(.36,.64),rng.uniform(.23,.43),(51,51,33),t+a)\n paint(oval(x-.3,y-.25,rx*.23,ry*.25,a),(216,220,153),13,3)\n\n def mango(x,y):\n cast(oval(x+1,y+5,31,16,-.11),93,2.1)\n paint(oval(x,y+4,30,13,-.13),(167,89,39),37,7)\n paint(oval(x,y+1,29,12.5,-.13),(221,137,45),27,5)\n for j in range(4):\n v=(j-1.5)*5.35\n for i in range(6):\n u=(i-2.5)*8.94\n if abs(u)>20 and abs(v)>7: continue\n px=x+u+.14*v+rng.uniform(-.65,.65)\n py=y+v-.11*u+rng.uniform(-.6,.6)\n height=3.4+4.8*max(0,1-(u/31)**2-(v/13)**2)+rng.uniform(-.8,.8)\n left=4.05+rng.uniform(-.35,.35); d=2.55+rng.uniform(-.22,.22)\n top=[(px-left-.5,py-d-height+.5),(px+left-1,py-d-height-.35),(px+left+.6,py+d-height-.5),(px-left+.4,py+d-height+.45)]\n p,q,r,s=top\n paint([q,r,(r[0]+.35,r[1]+height),(q[0]+.2,q[1]+height)],(202+rng.randrange(17),121+rng.randrange(24),25),19,3)\n paint([s,r,(r[0]+.35,r[1]+height),(s[0]-.1,s[1]+height)],(223+rng.randrange(18),147+rng.randrange(22),31+rng.randrange(11)),29,4)\n paint(top,(244+rng.randrange(10),180+rng.randrange(29),52+rng.randrange(20)),21,4)\n\n def papaya(x,y,rx,ry,a):\n ca,sa=aacos(a),ssin(a)\n def q(u,v): return (x+u*ca-v*sa,y+u*sa+v*ca)\n def boat(k,depth=0):\n p=[]\n for i in range(75):\n t=tau*i/75; c=aacos(t)\n xx,yy=q(rx*k*c,ry*k*ssin(t)*(1+.25*c))\n p.append((xx,yy+depth))\n return p\n cast(boat(1.05,5),95,2.0)\n paint(boat(1,5.5),(170,117,45),40,7)\n paint(boat(1,2),(220,144,46),38,6)\n paint(boat(.965),(241,153,57),38,5)\n paint(boat(.87),(242,137,52),39,6)\n px,py=q(2.3,.2)\n paint(oval(px,py,rx*.60,ry*.54,a),(193,93,36),40,7)\n paint(oval(px+.2,py,rx*.55,ry*.43,a),(116,65,33),22,6)\n kernels=[]\n for k in range(65):\n ang=rng.uniform(0,tau); r=math.sqrt(rng.random())\n kernels.append((2.4+rx*.525*r*aacos(ang),ry*.39*r*ssin(ang)))\n for u,v in sorted(kernels,key=lambda p:p[1]):\n xx,yy=q(u,v); rad=rng.uniform(.62,1.40)\n dot(xx,yy+.23,rad,rad*.69,(66,42,32),.18)\n dot(xx,yy-.1,rad*.85,rad*.60,rng.choice([(69,55,48),(85,62,47),(60,48,44),(76,58,46)]),.18)\n if rng.random()<.65:\n dot(xx-rad*.25,yy-rad*.27,rad*.26,rad*.16,(136,112,89))\n\n def dragon(x,y,rx,ry,a):\n ca,sa=aacos(a),ssin(a)\n def q(u,v): return (x+u*ca-v*sa,y+u*sa+v*ca)\n cast(oval(x+1,y+5,rx+1,ry+1,a),86,1.55)\n paint(oval(x,y+3.7,rx,ry,a),(161,47,80),41,6)\n for j in range(9):\n t=.10+(math.pi-.19)*j/8\n u,v=rx*aacos(t),ry*ssin(t)\n p=q(u*.88,v*.84+1.6); z=q(u*.995+1,v+4.8+rng.uniform(0,1.2)); r=q(u*.81+2.2,v*.98+2.9)\n paint([p,z,r],rng.choice([(184,67,97),(202,82,108),(166,86,78),(149,129,65)]),30,4)\n paint(oval(x,y,rx,ry,a),(199,64,117),31,5)\n paint(oval(x-.2,y-.22,rx*.913,ry*.88,a),(224,125,152),28,4)\n paint(oval(x-.35,y-.24,rx*.85,ry*.76,a),(236,227,216),21,3.6)\n for k in range(int(rx*4.4)):\n t=rng.uniform(0,tau); r=math.sqrt(rng.random())\n xx,yy=q(rx*.816*r*aacos(t),ry*.723*r*ssin(t))\n rr=rng.uniform(.27,.66)\n dot(xx,yy,rr,rr*rng.uniform(.44,.78),rng.choice([(54,48,46),(71,61,57),(100,86,82),(61,54,52)]),rng.uniform(-.85,.85))\n\n def passion(x,y,rx,ry,a):\n cast(oval(x+1,y+5.7,rx+1,ry+1,a),89,1.7)\n paint(oval(x,y+3.5,rx*.98,ry*1.06,a),(112,57,72),36,6)\n paint(oval(x,y,rx,ry,a),(150,83,102),26,5)\n paint(oval(x-.13,y-.2,rx*.88,ry*.84,a),(221,192,151),25,4)\n paint(oval(x-.18,y+.28,rx*.73,ry*.64,a),(201,129,40),22,6)\n ca,sa=aacos(a),ssin(a)\n for i in range(34):\n t=rng.uniform(0,tau); r=math.sqrt(rng.random()); u=rx*.685*r*aacos(t); v=ry*.57*r*ssin(t)\n xx=x+u*ca-v*sa; yy=y+u*sa+v*ca+.2\n d=rng.uniform(.63,1.7)\n dot(xx,yy,d,d*.66,rng.choice([(229,153,48),(239,171,56),(232,185,79),(217,143,44)]),t)\n dot(xx+.12,yy+.16,d*.42,d*.26,(105,78,42),t)\n if i%3==0: dot(xx-.30,yy-.34,d*.39,d*.19,(250,210,119),t)\n\n def star(x,y,rx,ry,a):\n ca,sa=aacos(a),ssin(a)\n def q(u,v): return (x+u*ca-v*sa,y+u*sa+v*ca)\n def outline(k,d=0):\n result=[]\n for i in range(95):\n t=tau*i/95\n r=k*(.71+.30*aacos(5*(t+.29)))\n u,v=q(rx*r*aacos(t),ry*r*ssin(t))\n result.append((u,v+d))\n return result\n cast(outline(1.05,3.7),73,1.35)\n paint(outline(1,2.8),(171,141,55),29,5)\n paint(outline(1),(179,170,71),30,4)\n paint(outline(.91),(230,199,90),27,5)\n for j in range(5):\n t=tau*j/5-.29\n c,s=aacos(t),ssin(t)\n stroke([q(rx*.19*c,ry*.19*s),q(rx*.39*c,ry*.39*s),q(rx*.79*c,ry*.79*s)],(235,211,122),.55)\n if j in (0,2,3):\n u,v=q(rx*.26*c,ry*.25*s)\n dot(u,v,1.0,.51,(155,117,59),t)\n\n if not distant:\n kiwi(-66,-25,15.6,7.7,-.14)\n kiwi(-50,-25,15,7.2,.12)\n kiwi(-57,-17,15.5,7.7,.21)\n mango(-7,-22)\n passion(28,-24,14.4,7.7,-.17)\n dragon(62,-20,23.5,10.9,-.19)\n dragon(57,-6,24.4,11.4,.16)\n papaya(-62,0,36.5,12.4,.15)\n star(82,4,15,8.5,-.22)\n passion(-7,5,16,8.1,-.12)\n star(70,12,18,9.3,.13)\n passion(-19,15,15.6,8.6,.16)\n kiwi(-43,18,15.6,7.6,-.16)\n star(54,20,17,8.6,-.05)\n dragon(20,19.5,22.5,10,-.13)\n else:\n kiwi(-68,-19,18,9,-.2)\n mango(-18,-20)\n dragon(47,-19,25,12,.13)\n papaya(-55,4,37,13,-.11)\n passion(8,4,19,10,.12)\n star(79,0,16,10,-.21)\n dragon(48,13,26,10,-.13)\n kiwi(-24,23,16,7.2,.15)\n\n small = art.resize((512,512),L)\n raw = np.asarray(small,dtype=np.float32)/255.\n raw[:,:,:3] *= raw[:,:,3:4]\n raw = cv2.GaussianBlur(raw,(0,0),.61 if distant else .47)\n raw[:,:,:3] /= np.maximum(raw[:,:,3:4],.00001)\n return Image.fromarray(np.uint8(np.clip(raw*255+.5,0,255)),'RGBA')\n\n front = make_platter(279,381,1,1)\n back = make_platter(305.5,184,.394,.236,True)\n old_front=[(168,367),(173,357),(184,348),(204,341),(223,337),(245,332),(268,330),(300,331),(326,333),(351,337),(370,343),(380,352),(386,364),(386,380),(387,396),(387,407),(374,415),(350,420),(321,423),(288,425),(253,425),(218,425),(186,424),(176,420),(172,410),(170,398),(168,386)]\n old_back=[(260,184),(267,180),(280,177),(298,175),(319,174),(338,174),(347,177),(351,181),(347,186),(337,190),(318,193),(295,194),(276,193),(266,190)]\n removal = Image.new('L',(w,h))\n pen = ImageDraw.Draw(removal)\n for outline in (old_front,old_back):\n pen.polygon([(round(x*w/512),round(y*h/512)) for x,y in outline],fill=255)\n pix=np.asarray(src)\n fixed=cv2.inpaint(pix,np.asarray(removal),max(1.4,3.4*min(w,h)/512),cv2.INPAINT_TELEA)\n softened=removal.filter(ImageFilter.GaussianBlur(max(.3,.66*min(w,h)/512)))\n base=Image.composite(Image.fromarray(fixed),src,softened).convert('RGBA')\n base.alpha_composite(back.resize((w,h),L))\n base.alpha_composite(front.resize((w,h),L))\n return base.convert('RGB')","scores": {"instruction_adherence": 5,"preservation": 5,"visual_quality": 4,"target_extent_score": 5,"target_extent_complete": true,"pass": true,"reason": "The visible pizzas on the table have been replaced with fruit platters, including the large foreground pizza and the smaller one farther back. The edit is localized to the requested objects with no meaningful changes to people or the surrounding restaurant scene. The fruit platters are somewhat synthetic-looking but visually coherent enough.","rubric_version": "full_visible_target_v1","annotated_target_box": null,"difference_evidence": {"scope": "full_image","changed_pixel_fraction": 0.08348846435546875,"mean_absolute_rgb_delta": 4.89117956161499,"mean_signed_rgb_delta": 3.570368528366089,"mean_delta_among_changed_pixels": 58.58509063720703,"changed_pixels_outside_box": null},"judge_evidence_version": "aligned_rgb_delta_v1","raw_reward": 0.9749999999999999,"reward": 0.9749999999999999,"reward_eligible": true,"reward_version": "semantic_gates_v3_extent"},"time": 1796063924.1980703},{"id": "anyedit_s202_635__rft_paper5",100 unmodified lines},"time": 1796063186.0777602},{"id": "maskedit_scene_s42_82__ti_paper5","teacher": "GPT-6.1-Sol",222 unmodified lines},"GPT-6.1-Sol": {"scheduled": 1053,"computed": 981,"output_unavailable": 72,"metric_pending": 0,"metric_unrecorded": 0,"mean_clip_i": 0.9435448551761265,"mean_dino": 0.9145155175381116}}},3 unmodified lines"total_bytes": 693376865},"experiments": {"checked": "2026-11-30T18:44:52.345568+00:00","sft": [{"id": "star_comparison_rft_v1",3030 unmodified lines"pie_bench": true,"imgedit": true},"elapsed_seconds": 3225.0578269958496,"workers": 8,"audit_version": 3,"durable_completed_rows": 12000,"counts": {"eligible_pending_full_test_protection": 10332,"excluded": 1668}}},233 unmodified lines"comparison_scope": "PIE-Bench++ annotations; do not compare directly with original PIE leaderboard"},"magicbrush_pixel_metrics": {"updated": 1796064071.213051,"protocol": "magicbrush_pinned_all_turn_l1_l2_v1","benchmark": "MagicBrush","scheduled": 1053,55 unmodified lines},"Qwen3.8-27B": {"scheduled": 1053,"recorded": 513,"computed": 460,"output_unavailable": 53,"metric_pending": 0,"generation_pending": 540,"mean_l1": 0.048781990946862724,"mean_l2": 0.02126876018286487,"all_outputs_computed": false},"Qwen3.5-9B": {"scheduled": 1053,"recorded": 729,"computed": 360,"output_unavailable": 369,"metric_pending": 0,"generation_pending": 324,"mean_l1": 0.07226407848348673,"mean_l2": 0.03683622728283606,"all_outputs_computed": false}},1 unmodified line"learned_metrics": "official CLIP-I, CLIP-T and DINO remain pending"},"official_suite_results": {"updated": 1796064292.4201512,"judge_model": "GPT-5.6-Sol","judge_protocol": "paper_gpt56sol_two_image_low_v3","suites": {94 unmodified lines"final_comparison_ready": false},"Qwen3.8-27B": {"attempted": 522,"recorded": 522,"judged": 173,"method_failure": 22,"generation_pending": 531,"service_pending": 0,"execution_pending": 0,"score_pending": 0,"identity_pending": 0,"result_pending": 327,"method_failures": 22,"completed": 195,"image_pass": 2,2 unmodified lines"final_comparison_ready": false},"Qwen3.5-9B": {"attempted": 740,"recorded": 740,"judged": 167,"method_failure": 113,"generation_pending": 313,"service_pending": 0,"execution_pending": 54,"score_pending": 0,"identity_pending": 0,"result_pending": 406,"method_failures": 113,"completed": 280,"image_pass": 0,280 unmodified lines"Qwen-Image-2.1": {"attempted": 700,"recorded": 700,"judged": 135,"method_failure": 0,"generation_pending": 0,"service_pending": 0,"execution_pending": 0,"score_pending": 0,"identity_pending": 0,"result_pending": 565,"method_failures": 0,"completed": 135,"image_pass": 18,"mean_score_on_judged": 3.1592592592592594,"overall_pass_rate": null,"final_comparison_ready": false},36 unmodified lines"DeepSeek-V4.1-Flash": {"attempted": 700,"recorded": 700,"judged": 668,"method_failure": 16,"generation_pending": 0,"service_pending": 12,"execution_pending": 4,"score_pending": 0,"identity_pending": 0,"result_pending": 0,"method_failures": 16,"completed": 684,"image_pass": 35,"mean_score_on_judged": 2.6433383233532934,"overall_pass_rate": null,"final_comparison_ready": false},"GLM-5.4": {"attempted": 700,"recorded": 700,"judged": 25,"method_failure": 3,"generation_pending": 0,"service_pending": 671,"execution_pending": 1,"score_pending": 0,"identity_pending": 0,"result_pending": 0,"method_failures": 3,"completed": 28,"image_pass": 0,"mean_score_on_judged": 2.56,"overall_pass_rate": null,"final_comparison_ready": false},343 unmodified lines"snapshot": "mixed_22768_a052b5e5031a","physical_volume": "aidp-data-multimodal-hl1","hash_verified": true,"combined_retained_rows": 23838,"early_sets": [{"label": "早期纯 RFT 对照",6 unmodified lines],"final_paper_audit": "pending","unified": {"retained_rows": 35844,"duplicate_export_rows": 8601,"initial_screen_checked": 35763,"initial_screen_flagged": 2967,"pending_final_audit": 32796,"new_pending_initial_screen": 81,"missing_source_image_paths": 0,"final_qualified_rows": 0,"updated": "2026-11-30T05:47:54.854877+00:00",1 unmodified line"dedup_policy": "same source path, system, instruction, answer and RFT/TI mode; RGB/near-duplicate audit remains pending"}},"evaluation_updated": 1796064292.4201512,"suites": [{"name": "MagicBrush",
history.json+1-1
index.html
paper_assets/1d/1d937ededd694694cf7e.jpgAdded
paper_assets/37/374e2201ac7fc38bfeb7.jpgAdded
paper_assets/67/6713dab6f51a04096dec.jpgAdded
paper_assets/bb/bbf4b335c0418c5343be.jpgAdded
progress.json+133-129