lkp72 commited on
Commit
c4e5aab
·
verified ·
1 Parent(s): 6a7ee84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -13,7 +13,7 @@ compiled_model = ie.compile_model(model=model, device_name="CPU")
13
  input_layer = compiled_model.input(0)
14
  output_layer = compiled_model.output(0)
15
 
16
- # Define a function to process the image and make predictions
17
  def predict(image):
18
  # Preprocess the image
19
  image_resized = cv2.resize(image, (input_layer.shape[-2], input_layer.shape[-1]))
@@ -22,8 +22,7 @@ def predict(image):
22
  # Run inference
23
  result = compiled_model([input_image])[output_layer]
24
 
25
- # Process the result (you can adjust this depending on your model's output format)
26
- # Here we assume the result is a list of detected boxes and scores
27
  detected_boxes = result[:, :4]
28
  scores = result[:, 4]
29
 
 
13
  input_layer = compiled_model.input(0)
14
  output_layer = compiled_model.output(0)
15
 
16
+ # Function to process the image and make predictions
17
  def predict(image):
18
  # Preprocess the image
19
  image_resized = cv2.resize(image, (input_layer.shape[-2], input_layer.shape[-1]))
 
22
  # Run inference
23
  result = compiled_model([input_image])[output_layer]
24
 
25
+ # Process the result
 
26
  detected_boxes = result[:, :4]
27
  scores = result[:, 4]
28