Girishug commited on
Commit
fed820d
·
verified ·
1 Parent(s): e9e1b64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -57,11 +57,20 @@ def predict(image):
57
  scores = predictions[0]['scores'].cpu().numpy()
58
  labels = predictions[0]['labels'].cpu().numpy()
59
 
 
 
 
 
 
60
  # Filter out low-confidence predictions
61
  threshold = 0.5
62
  boxes = boxes[scores > threshold]
63
  labels = labels[scores > threshold]
64
 
 
 
 
 
65
  # Convert the input image to a NumPy array
66
  image_np = np.array(image)
67
 
 
57
  scores = predictions[0]['scores'].cpu().numpy()
58
  labels = predictions[0]['labels'].cpu().numpy()
59
 
60
+ # Debugging: Print predictions
61
+ print("Boxes:", boxes)
62
+ print("Scores:", scores)
63
+ print("Labels:", labels)
64
+
65
  # Filter out low-confidence predictions
66
  threshold = 0.5
67
  boxes = boxes[scores > threshold]
68
  labels = labels[scores > threshold]
69
 
70
+ # Debugging: Print filtered predictions
71
+ print("Filtered Boxes:", boxes)
72
+ print("Filtered Labels:", labels)
73
+
74
  # Convert the input image to a NumPy array
75
  image_np = np.array(image)
76