Skip to content

Commit

Permalink
perf: remove 180 rotation in augmentation; this is handled in trainin…
Browse files Browse the repository at this point in the history
…g now
  • Loading branch information
danellecline committed Jan 8, 2025
1 parent d629360 commit 507bacd
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions aipipeline/prediction/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,7 @@ def generate_multicrop_views(elements) -> List[tuple]:
logger.error(f"Failed to read {image_path}")
continue

# Rotate all images 180 degrees
image = cv2.rotate(image, cv2.ROTATE_180)
save_file = image_path.parent / f"{image_path.stem}{MULTIVIEW_SUFFIX}_r.jpg"
logger.info(f"Saving {save_file}")
cv2.imwrite(save_file.as_posix(), image)
num_aug += 1

# Skip if more than 100 examples
if count > 100:
continue

Expand Down

0 comments on commit 507bacd

Please sign in to comment.