fradinho commited on
Commit
d4e9b55
1 Parent(s): 003306e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -28,7 +28,7 @@ def predict_2(image):
28
 
29
  image = Image.fromarray(image).resize((size,size))
30
  image = np.array(image)
31
- stride = 4
32
  steps = int(pach_size/stride)
33
  patches_img = patchify(image, (pach_size, pach_size, 3), step=steps) #Step=256 for 256 patches means no overlap
34
  patches_img = patches_img[:,:,0,:,:,:]
@@ -89,16 +89,16 @@ targets_classes_colors = np.array([[ 0, 0, 0],
89
  [ 2, 135, 115],
90
  [255, 0, 0]])
91
 
92
- class_weights = {0: 1.0,
93
- 1: 1.0,
94
  2: 2.171655596616696,
95
- 3: 1.0,
96
- 4: 1.0,
97
  5: 2.2101197049812593,
98
  6: 11.601519937899578,
99
  7: 7.99072122367673,
100
- 8: 1.0,
101
- 9: 1.0,
102
  10: 2.5426918173402457,
103
  11: 11.187574445057574,
104
  12: 241.57620214903147,
 
28
 
29
  image = Image.fromarray(image).resize((size,size))
30
  image = np.array(image)
31
+ stride = 1
32
  steps = int(pach_size/stride)
33
  patches_img = patchify(image, (pach_size, pach_size, 3), step=steps) #Step=256 for 256 patches means no overlap
34
  patches_img = patches_img[:,:,0,:,:,:]
 
89
  [ 2, 135, 115],
90
  [255, 0, 0]])
91
 
92
+ class_weights = {0: 0.1,
93
+ 1: 0.1,
94
  2: 2.171655596616696,
95
+ 3: 0.1,
96
+ 4: 0.1,
97
  5: 2.2101197049812593,
98
  6: 11.601519937899578,
99
  7: 7.99072122367673,
100
+ 8: 0.1,
101
+ 9: 0.1,
102
  10: 2.5426918173402457,
103
  11: 11.187574445057574,
104
  12: 241.57620214903147,