Haaribo commited on
Commit
ea385b8
·
verified ·
1 Parent(s): 5cfc674

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -20,10 +20,10 @@ def overlapping_features_on_input(model,output, feature_maps, input, target):
20
  label=np.argmax(output)+1
21
 
22
  Interpretable_Selection= W[label,:]
23
- print("W",Interpretable_Selection)
24
  input_np=np.array(input)
25
  h,w= input.shape[:2]
26
- print("h,w:",h,w)
27
  Interpretable_Features=[]
28
  Feature_image_list=[]
29
  for S in range(len(Interpretable_Selection)):
@@ -88,11 +88,11 @@ def genreate_intepriable_output(input,dataset="CUB2011", arch="resnet50",seed=12
88
  print(i)
89
  filenames=namelist.loc[namelist['img_id']==i,'file_name'].values[0]
90
  targets=shuffled_options.loc[shuffled_options['img_id']==i,'target'].values[0]
91
- print("targets",targets)
92
- print("name",filenames)
93
 
94
  classes=classlist.loc[classlist['cl_id']==targets, 'class_name'].values[0]
95
- print(data_dir/f"images/{filenames}")
96
 
97
  op_img=cv2.imread(data_dir/f"images/{filenames}")
98
 
 
20
  label=np.argmax(output)+1
21
 
22
  Interpretable_Selection= W[label,:]
23
+
24
  input_np=np.array(input)
25
  h,w= input.shape[:2]
26
+
27
  Interpretable_Features=[]
28
  Feature_image_list=[]
29
  for S in range(len(Interpretable_Selection)):
 
88
  print(i)
89
  filenames=namelist.loc[namelist['img_id']==i,'file_name'].values[0]
90
  targets=shuffled_options.loc[shuffled_options['img_id']==i,'target'].values[0]
91
+
92
+
93
 
94
  classes=classlist.loc[classlist['cl_id']==targets, 'class_name'].values[0]
95
+
96
 
97
  op_img=cv2.imread(data_dir/f"images/{filenames}")
98