FsRandomUnpairedReader
FsRandomUnpairedReader class
dlf.data_generators.fs_pair_reader.FsRandomUnpairedReader(
paths_lhs, paths_rhs, channels=3, lhs_limit=None, rhs_limit=None, preprocess_list=None, shuffle_buffer=100
)
A data generator which generates random pairs of images
Aliases
- FsRandomUnpairedReader
- fs_random_unpaired_reader
Arguments
- paths_lhs: list of str. List of glob patterns to find images for the left hand side
- paths_rhs: list of str. List of glob patterns to find images for the right hand side
- channels: int. Number of channels which each image should contain. Defaults to 3.
- lhs_limit: int. If specified N elements of lhs set are selected. Defaults to None.
- rhs_limit: int. If specified N elements of rhs set are selected. Defaults to None.
- preprocess_list: dict. Dictionary where the value describes a preprocessing method and the values are the arguments. Defaults to None.
- shuffle_buffer: int. Size of shuffle buffer. For details check: tf.data.Dataset. Defaults to 2000.
Raises
- FileNotFoundError: If one path of the lhs path set is not valid
- FileNotFoundError: If one path of the rhs path set is not valid
- ValueError: If crop or resize is not specified in preprocessing pipeline
YAML Configuration
input_reader:
training_reader:
name: fs_random_unpaired_reader
paths_lhs: /mnt/data/datasets/theodore_wheeled_walker/*_img.png
paths_rhs:
- /mnt/data/datasets/omnidetector-Flat/JPEGImages/*.jpg
- /mnt/data/datasets/indoor_cvpr/Images/**/*.jpg
lhs_limit: 20000
rhs_limit: 20000
shuffle_buffer: 400
preprocess_list:
crop:
width: 512
height: 512