(self, batch_result)
| 226 | return result |
| 227 | |
| 228 | def merge_batch_result(self, batch_result): |
| 229 | if len(batch_result) == 1: |
| 230 | return batch_result[0] |
| 231 | res_key = batch_result[0].keys() |
| 232 | results = {k: [] for k in res_key} |
| 233 | for res in batch_result: |
| 234 | for k, v in res.items(): |
| 235 | results[k].append(v) |
| 236 | for k, v in results.items(): |
| 237 | if k not in ['masks', 'segm']: |
| 238 | results[k] = np.concatenate(v) |
| 239 | return results |
| 240 | |
| 241 | def get_timer(self): |
| 242 | return self.det_times |
no test coverage detected