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