(self,f_path)
| 316 | os.remove(os.path.join(self.predict_path, 'gt.txt')) |
| 317 | |
| 318 | def load_img_from_file(self,f_path): |
| 319 | label_path = f_path.replace('images', 'labels_with_ids').replace('.png', '.txt').replace('.jpg', '.txt') |
| 320 | cur_img = cv2.imread(f_path) |
| 321 | cur_img = cv2.cvtColor(cur_img, cv2.COLOR_BGR2RGB) |
| 322 | targets = load_label(label_path, cur_img.shape[:2]) if os.path.exists(label_path) else None |
| 323 | return cur_img, targets |
| 324 | |
| 325 | def init_img(self, img): |
| 326 | ori_img = img.copy() |