Circularmachines commited on
Commit
a5545ff
·
1 Parent(s): b6b0b05
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -49,8 +49,8 @@ def patch(ij):
49
 
50
  imm=ds[int(immg)]['image'].resize(size=(512,512))
51
 
52
- y=p//gridsize
53
- x=p%gridsize
54
  imc=imm.crop(((x)*stride,(y)*stride,(x+2)*stride,(y+2)*stride))
55
  return imc
56
 
@@ -62,7 +62,7 @@ def find():
62
  #st.write(point)
63
  #st.write(pred_all[st.session_state["img"],point[0]*36+point[1]])
64
  i=st.session_state["img"]
65
- p=point[1]*gridsize+point[0]
66
  diff=np.linalg.norm(pred_all[np.newaxis,i*n_patches+p,:]-pred_all,axis=-1)
67
  #re_pred=pred_all.reshape(20,20,256,64)
68
  #diff_re=diff.reshape((20,20,256)).argmin(axis=[])
 
49
 
50
  imm=ds[int(immg)]['image'].resize(size=(512,512))
51
 
52
+ x=p//gridsize
53
+ y=p%gridsize
54
  imc=imm.crop(((x)*stride,(y)*stride,(x+2)*stride,(y+2)*stride))
55
  return imc
56
 
 
62
  #st.write(point)
63
  #st.write(pred_all[st.session_state["img"],point[0]*36+point[1]])
64
  i=st.session_state["img"]
65
+ p=point[0]*gridsize+point[1]
66
  diff=np.linalg.norm(pred_all[np.newaxis,i*n_patches+p,:]-pred_all,axis=-1)
67
  #re_pred=pred_all.reshape(20,20,256,64)
68
  #diff_re=diff.reshape((20,20,256)).argmin(axis=[])