Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,8 +32,6 @@ def preprocess(image):
|
|
| 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)
|
| 38 |
image = np.asarray([image])
|
| 39 |
image = np.transpose(image, (0, 3, 1, 2))
|
|
@@ -51,10 +49,7 @@ def preprocess(image):
|
|
| 51 |
images = [half_1,half_2]
|
| 52 |
|
| 53 |
for image in images:
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
for image in images:
|
| 57 |
-
|
| 58 |
image = np.asarray([image])
|
| 59 |
image = np.transpose(image, (0, 3, 1, 2))
|
| 60 |
image = inference(image)
|
|
@@ -72,10 +67,7 @@ def preprocess(image):
|
|
| 72 |
images = [half_1,half_2]
|
| 73 |
|
| 74 |
for image in images:
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
for image in images:
|
| 78 |
-
|
| 79 |
image = np.asarray([image])
|
| 80 |
image = np.transpose(image, (0, 3, 1, 2))
|
| 81 |
image = inference(image)
|
|
|
|
| 32 |
|
| 33 |
image = cv2.resize(image, (512, 512))
|
| 34 |
image = pixL().toThePixL(image,6,True)
|
|
|
|
|
|
|
| 35 |
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
| 36 |
image = np.asarray([image])
|
| 37 |
image = np.transpose(image, (0, 3, 1, 2))
|
|
|
|
| 49 |
images = [half_1,half_2]
|
| 50 |
|
| 51 |
for image in images:
|
| 52 |
+
image = pixL().toThePixL(image,6,True)
|
|
|
|
|
|
|
|
|
|
| 53 |
image = np.asarray([image])
|
| 54 |
image = np.transpose(image, (0, 3, 1, 2))
|
| 55 |
image = inference(image)
|
|
|
|
| 67 |
images = [half_1,half_2]
|
| 68 |
|
| 69 |
for image in images:
|
| 70 |
+
image = pixL().toThePixL(image,6,True)
|
|
|
|
|
|
|
|
|
|
| 71 |
image = np.asarray([image])
|
| 72 |
image = np.transpose(image, (0, 3, 1, 2))
|
| 73 |
image = inference(image)
|