(self, paths=[])
| 83 | return cfg |
| 84 | |
| 85 | def read_images(self, paths=[]): |
| 86 | images = [] |
| 87 | for img_path in paths: |
| 88 | assert os.path.isfile(img_path), "The {} isn't a valid file.".format( |
| 89 | img_path |
| 90 | ) |
| 91 | img = cv2.imread(img_path) |
| 92 | if img is None: |
| 93 | logger.info("error in loading image:{}".format(img_path)) |
| 94 | continue |
| 95 | images.append(img) |
| 96 | return images |
| 97 | |
| 98 | def predict(self, images=[], paths=[]): |
| 99 | """ |