tom-b974 commited on
Commit
8e7cffe
·
verified ·
1 Parent(s): b2b7fdc

Update tasks/image.py

Browse files
Files changed (1) hide show
  1. tasks/image.py +0 -5
tasks/image.py CHANGED
@@ -107,9 +107,7 @@ 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
- i = 0
111
  for example in test_dataset:
112
- i += 1
113
  # Extract image and annotations
114
  image = example["image"]
115
  annotation = example.get("annotations", "").strip()
@@ -139,9 +137,6 @@ async def evaluate_image(request: ImageEvaluationRequest):
139
  else:
140
  predictions.append(0) # No smoke predicted
141
  pred_boxes.append([]) # Add empty list if no prediction
142
-
143
- if i == 10:
144
- break
145
 
146
 
147
  # Filter out entries with empty 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"]
113
  annotation = example.get("annotations", "").strip()
 
137
  else:
138
  predictions.append(0) # No smoke predicted
139
  pred_boxes.append([]) # Add empty list if no prediction
 
 
 
140
 
141
 
142
  # Filter out entries with empty boxes