(batcher, inferer, framework, nms_threshold=None)
| 30 | |
| 31 | |
| 32 | def run(batcher, inferer, framework, nms_threshold=None): |
| 33 | res_images = [] |
| 34 | res_detections = [] |
| 35 | for batch, images, scales in batcher.get_batch(): |
| 36 | res_detections += inferer.process(batch, scales, nms_threshold) |
| 37 | res_images += images |
| 38 | print("Processing {} / {} images ({})".format(batcher.image_index, batcher.num_images, framework), end="\r") |
| 39 | print() |
| 40 | return res_images, res_detections |
| 41 | |
| 42 | |
| 43 | def parse_annotations(annotations_path): |