Circularmachines commited on
Commit
73dca24
1 Parent(s): 4fd7cbc

app.py updates

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ ds = load_dataset("Circularmachines/batch_indexing_machine_100_small_imgs", spli
12
 
13
 
14
  pred=np.load('pred.npy')
15
- pred_all=np.load('pred_all.npy')
16
  keep_bool=np.load('keep_bool.npy')
17
 
18
  keep=np.where(keep_bool.flatten())[0]
@@ -72,7 +72,7 @@ def find():
72
  #st.write(pred_all[st.session_state["img"],point[0]*36+point[1]])
73
  i=st.session_state["img"]
74
  p=point[0]*36+point[1]
75
- diff=np.linalg.norm(pred_all[np.newaxis,np.newaxis,i,p,:]-pred_all,axis=-1).flatten()
76
  for ix in range(4):
77
  st.session_state["sideimg"][ix]=patch(diff.argsort()[ix])
78
  #st.write(diff.argsort()[ix])
 
12
 
13
 
14
  pred=np.load('pred.npy')
15
+ pred_all=np.load('pred_all.npy').reshape(-1,64)
16
  keep_bool=np.load('keep_bool.npy')
17
 
18
  keep=np.where(keep_bool.flatten())[0]
 
72
  #st.write(pred_all[st.session_state["img"],point[0]*36+point[1]])
73
  i=st.session_state["img"]
74
  p=point[0]*36+point[1]
75
+ diff=np.linalg.norm(pred_all[np.newaxis,i*36*36+p,:]-pred_all,axis=-1)
76
  for ix in range(4):
77
  st.session_state["sideimg"][ix]=patch(diff.argsort()[ix])
78
  #st.write(diff.argsort()[ix])