rbarman commited on
Commit
47bec72
·
1 Parent(s): 806355c

np and add debut

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -17,9 +17,11 @@ output_layer = compiled_model.output(0)
17
  #Inference
18
  #####
19
  def predict(img):
20
-
 
 
21
  # https://stackoverflow.com/a/32264327
22
- image = cv2.cvtColor(numpy.array(img), cv2.COLOR_BGR2RGB)
23
 
24
  # The MobileNet model expects images in RGB format.
25
  #image = cv2.cvtColor(cv2.imread(img), code=cv2.COLOR_BGR2RGB)
 
17
  #Inference
18
  #####
19
  def predict(img):
20
+
21
+ print(f'input type: {type(img)}')
22
+
23
  # https://stackoverflow.com/a/32264327
24
+ image = cv2.cvtColor(np.array(img), cv2.COLOR_BGR2RGB)
25
 
26
  # The MobileNet model expects images in RGB format.
27
  #image = cv2.cvtColor(cv2.imread(img), code=cv2.COLOR_BGR2RGB)