@@ -48,9 +48,15 @@ def __call__(self, inputs) -> Any:
|
48 | 48 | labels = [] |
49 | 49 | boxes = [] |
50 | 50 | for output in outputs: |
51 | | -for score, label, box in zip(output['detection_scores'], |
52 | | -output['detection_classes'], |
53 | | -output['detection_boxes']): |
| 51 | +scores_list = output['detection_scores'] if output[ |
| 52 | +'detection_scores'] is not None else [] |
| 53 | +classes_list = output['detection_classes'] if output[ |
| 54 | +'detection_classes'] is not None else [] |
| 55 | +boxes_list = output['detection_boxes'] if output[ |
| 56 | +'detection_boxes'] is not None else [] |
| 57 | + |
| 58 | +for score, label, box in zip(scores_list, classes_list, |
| 59 | +boxes_list): |
54 | 60 | scores.append(score) |
55 | 61 | labels.append(self.cfg.CLASSES[label]) |
56 | 62 | boxes.append([b for b in box]) |
|