miguelflores-0906 commited on
Commit
b20fee7
·
1 Parent(s): 670f6ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -12,10 +12,11 @@ text = onnx.checker.check_model(onnx_model)
12
  print("The model is checked")
13
 
14
  def snap(image):
15
- image = Image.fromarray(image)
16
- image = image.resize((400, 400))
 
17
  ort_sess = ort.InferenceSession("M-Raw.onnx")
18
- output = ort_sess.run(["output0"], {"images": image})
19
  return [output]
20
 
21
 
 
12
  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]
21
 
22