tom-b974 commited on
Commit
2478bb3
·
verified ·
1 Parent(s): 814440d

Update tasks/image.py

Browse files
Files changed (1) hide show
  1. tasks/image.py +1 -4
tasks/image.py CHANGED
@@ -107,7 +107,6 @@ async def evaluate_image(request: ImageEvaluationRequest):
107
  pred_boxes = [] # Flattened list of predicted boxes
108
  true_boxes_list = [] # Flattened list of ground truth boxes
109
 
110
- print('Start of prediction...')
111
  for example in test_dataset:
112
  # Extract image and annotations
113
  image = example["image"]
@@ -139,12 +138,10 @@ async def evaluate_image(request: ImageEvaluationRequest):
139
  predictions.append(0) # No smoke predicted
140
  pred_boxes.append([]) # Add empty list if no prediction
141
 
142
- print('Prediction done.')
143
  # Filter out entries with empty boxes
144
  filtered_true_boxes_list = []
145
  filtered_pred_boxes = []
146
-
147
- print('Box analysis...')
148
  for true_boxes, pred_boxes_entry in zip(true_boxes_list, pred_boxes):
149
  if true_boxes and pred_boxes_entry: # Keep only if neither is empty
150
  filtered_true_boxes_list.append(true_boxes)
 
107
  pred_boxes = [] # Flattened list of predicted boxes
108
  true_boxes_list = [] # Flattened list of ground truth boxes
109
 
 
110
  for example in test_dataset:
111
  # Extract image and annotations
112
  image = example["image"]
 
138
  predictions.append(0) # No smoke predicted
139
  pred_boxes.append([]) # Add empty list if no prediction
140
 
 
141
  # Filter out entries with empty boxes
142
  filtered_true_boxes_list = []
143
  filtered_pred_boxes = []
144
+
 
145
  for true_boxes, pred_boxes_entry in zip(true_boxes_list, pred_boxes):
146
  if true_boxes and pred_boxes_entry: # Keep only if neither is empty
147
  filtered_true_boxes_list.append(true_boxes)