Process a list of images.
(self, image_list)
| 101 | continue |
| 102 | |
| 103 | def process_images(self, image_list): |
| 104 | """Process a list of images.""" |
| 105 | # Initialize results dictionary |
| 106 | self.results = {i: [] for i in range(len(image_list))} |
| 107 | |
| 108 | # Start recognition threads |
| 109 | t_start_1 = time.time() |
| 110 | self.start_recognition_threads() |
| 111 | |
| 112 | # Start detection in the main thread |
| 113 | t_start = time.time() |
| 114 | self.detect_text(image_list) |
| 115 | print('det time:', time.time() - t_start) |
| 116 | |
| 117 | # Wait for recognition threads to finish |
| 118 | for t in self.rec_threads: |
| 119 | t.join() |
| 120 | self.stop_signal.clear() |
| 121 | print('all time:', time.time() - t_start_1) |
| 122 | return self.results |
| 123 | |
| 124 | |
| 125 | def main(cfg_det, cfg_rec): |
no test coverage detected