Loading image from file.
(self, results)
| 38 | self.channel_order = channel_order |
| 39 | |
| 40 | def __call__(self, results): |
| 41 | """Loading image from file.""" |
| 42 | image_file = results['image_file'] |
| 43 | img = cv2.imread(image_file) |
| 44 | img=img[:,:,::-1] |
| 45 | if img is None: |
| 46 | raise ValueError('Fail to read {}'.format(image_file)) |
| 47 | |
| 48 | results['image'] = img |
| 49 | return results |
| 50 | |
| 51 | class TopDownRandomFlip: |
| 52 | """Data augmentation with random image flip. |
nothing calls this directly
no outgoing calls
no test coverage detected