(batcher, inferer, framework, nms_threshold=None)
| 145 | |
| 146 | |
| 147 | def run(batcher, inferer, framework, nms_threshold=None): |
| 148 | res_images = [] |
| 149 | res_detections = [] |
| 150 | for batch, images, scales in batcher.get_batch(): |
| 151 | res_detections += inferer.infer(batch, scales, nms_threshold) |
| 152 | res_images += images |
| 153 | print("Processing {} / {} images ({})".format(batcher.image_index, batcher.num_images, framework), end="\r") |
| 154 | print() |
| 155 | return res_images, res_detections |
| 156 | |
| 157 | |
| 158 | def parse_annotations(annotations_path, detection_type): |