Alican commited on
Commit
986d686
1 Parent(s): 9cbde03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -31,7 +31,7 @@ def preprocess(image):
31
  if 0.75 <= aspect_ratio <= 1.75:
32
 
33
  image = cv2.resize(image, (512, 512))
34
- image = pixL().toThePixL([image],6)
35
  image = image[0]
36
 
37
  image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
@@ -48,8 +48,11 @@ def preprocess(image):
48
  middlePoint = image.shape[1] // 2
49
  half_1 = image[:,:middlePoint]
50
  half_2 = image[:,middlePoint:]
51
- images = pixL().toThePixL([half_1,half_2],6)
52
-
 
 
 
53
  for image in images:
54
 
55
  image = np.asarray([image])
@@ -66,7 +69,10 @@ def preprocess(image):
66
  middlePoint = image.shape[0] // 2
67
  half_1 = image[:middlePoint,:]
68
  half_2 = image[middlePoint:,:]
69
- images = pixL().toThePixL([half_1,half_2], 6)
 
 
 
70
 
71
  for image in images:
72
 
 
31
  if 0.75 <= aspect_ratio <= 1.75:
32
 
33
  image = cv2.resize(image, (512, 512))
34
+ image = pixL().toThePixL(image,6,True)
35
  image = image[0]
36
 
37
  image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
 
48
  middlePoint = image.shape[1] // 2
49
  half_1 = image[:,:middlePoint]
50
  half_2 = image[:,middlePoint:]
51
+ images = [half_1,half_2]
52
+
53
+ for image in images:
54
+ image = pixL().toThePixL(image,6,True)
55
+
56
  for image in images:
57
 
58
  image = np.asarray([image])
 
69
  middlePoint = image.shape[0] // 2
70
  half_1 = image[:middlePoint,:]
71
  half_2 = image[middlePoint:,:]
72
+ images = [half_1,half_2]
73
+
74
+ for image in images:
75
+ image = pixL().toThePixL(image,6,True)
76
 
77
  for image in images:
78