python - <<'PY'
p='/workspace/scratch/matting.py';s=open(p).read();start=s.index(' small=cv2.resize(ratio');end=s.index(' B=np.clip',start);s=s[:start]+''' sh=cv2.erode(ratio,np.ones((9,9),np.uint8))
 sh=cv2.GaussianBlur(sh,(3,3),.6)
 B=b*np.clip(sh,.25,1.0)
'''+s[end:];open(p,'w').write(s)
PY
OPENBLAS_NUM_THREADS=1 python /workspace/scratch/matting.py HH-1206
python - <<'PY'
from PIL import Image,ImageDraw
import glob,os
ss=['HH-3315','HH-3360','HH-6618','HH-6672','HH-7101','HH-7158','HH-8248','HH-8285'];o=Image.new('RGB',(1200,4*430),'#ddd');d=ImageDraw.Draw(o)
for i,s in enumerate(ss):
 im=Image.open('/workspace/scratch/refined/'+s+'_detail.jpg');im.thumbnail((595,400));x=(i%2)*600;y=(i//2)*430;o.paste(im,(x,y));d.text((x+5,y+405),s,fill='black')
o.save('/workspace/scratch/editcontact.jpg')
PY