Update app.py
Browse files
app.py
CHANGED
|
@@ -21,9 +21,9 @@ idx_to_labels = {0:'other',1:'C',2:'O',3:'N',4:'Cl',5:'Br',6:'S',7:'F',8:'B',
|
|
| 21 |
def image_to_numpy(image_path):
|
| 22 |
|
| 23 |
# image = Image.open(image_path)
|
| 24 |
-
w, h =
|
| 25 |
|
| 26 |
-
img_array = np.array(
|
| 27 |
|
| 28 |
img_resized = cv2.resize(img_array, (640, 640), interpolation=cv2.INTER_LINEAR)
|
| 29 |
|
|
|
|
| 21 |
def image_to_numpy(image_path):
|
| 22 |
|
| 23 |
# image = Image.open(image_path)
|
| 24 |
+
w, h = image_path.size
|
| 25 |
|
| 26 |
+
img_array = np.array(image_path)
|
| 27 |
|
| 28 |
img_resized = cv2.resize(img_array, (640, 640), interpolation=cv2.INTER_LINEAR)
|
| 29 |
|