(img_root, img_path, new_img_root)
| 37 | |
| 38 | |
| 39 | def copy_image(img_root, img_path, new_img_root): |
| 40 | img = cv2.imread(os.path.join(img_root,img_path)) |
| 41 | h, w, c = img.shape |
| 42 | cv2.imwrite(os.path.join(new_img_root, img_path), img) |
| 43 | return h, w |
| 44 | |
| 45 | |
| 46 | def get_new_label(label, img_path, cy, cx, id, img_id_base): |