Commit ·
53dc852
1
Parent(s): b20fee7
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,8 +13,14 @@ print("The model is checked")
|
|
| 13 |
|
| 14 |
def snap(image):
|
| 15 |
image = Image.fromarray(image) # np to pil
|
|
|
|
|
|
|
| 16 |
image = image.resize((640, 640))
|
|
|
|
|
|
|
| 17 |
image = np.asarray(image)
|
|
|
|
|
|
|
| 18 |
ort_sess = ort.InferenceSession("M-Raw.onnx")
|
| 19 |
output = ort_sess.run(["output0"], {"images": np.array([image])})
|
| 20 |
return [output]
|
|
|
|
| 13 |
|
| 14 |
def snap(image):
|
| 15 |
image = Image.fromarray(image) # np to pil
|
| 16 |
+
print(image)
|
| 17 |
+
print("-----------")
|
| 18 |
image = image.resize((640, 640))
|
| 19 |
+
print(image)
|
| 20 |
+
print("-----------")
|
| 21 |
image = np.asarray(image)
|
| 22 |
+
print(image)
|
| 23 |
+
print("-----------")
|
| 24 |
ort_sess = ort.InferenceSession("M-Raw.onnx")
|
| 25 |
output = ort_sess.run(["output0"], {"images": np.array([image])})
|
| 26 |
return [output]
|