computer_vision.flip_augmentation ================================= .. py:module:: computer_vision.flip_augmentation Attributes ---------- .. autoapisummary:: computer_vision.flip_augmentation.FLIP_TYPE computer_vision.flip_augmentation.IMAGE_DIR computer_vision.flip_augmentation.LABEL_DIR computer_vision.flip_augmentation.OUTPUT_DIR Functions --------- .. autoapisummary:: computer_vision.flip_augmentation.get_dataset computer_vision.flip_augmentation.main computer_vision.flip_augmentation.random_chars computer_vision.flip_augmentation.update_image_and_anno Module Contents --------------- .. py:function:: get_dataset(label_dir: str, img_dir: str) -> tuple[list, list] - label_dir : Path to label include annotation of images - img_dir : Path to folder contain images Return : List of images path and labels .. py:function:: main() -> None Get images list and annotations list from input dir. Update new images and annotations. Save images and annotations in output dir. .. py:function:: random_chars(number_char: int = 32) -> str Automatic generate random 32 characters. Get random string code: '7b7ad245cdff75241935e4dd860f3bad' >>> len(random_chars(32)) 32 .. py:function:: update_image_and_anno(img_list: list, anno_list: list, flip_type: int = 1) -> tuple[list, list, list] - img_list : list of all images - anno_list : list of all annotations of specific image - flip_type : 0 is vertical, 1 is horizontal Return: - new_imgs_list : image after resize - new_annos_lists : list of new annotation after scale - path_list : list the name of image file .. py:data:: FLIP_TYPE :value: 1 .. py:data:: IMAGE_DIR :value: '' .. py:data:: LABEL_DIR :value: '' .. py:data:: OUTPUT_DIR :value: ''