(image)
| 243 | |
| 244 | |
| 245 | def im_preprocess(image): |
| 246 | image = np.asarray(image, np.float32) |
| 247 | image -= np.array([104, 117, 123], dtype=np.float32).reshape(1, 1, -1) |
| 248 | image = image.transpose((2, 0, 1)) |
| 249 | return image |
| 250 | |
| 251 | |
| 252 | def extract_image_patches(image, bboxes): |
no outgoing calls
no test coverage detected