22 lines
600 B
Python
22 lines
600 B
Python
from create_extra import split_subdirs
|
|
from data_split import split_directory
|
|
from extend import ImageExtendProcessor
|
|
from combine_sub_class import combine_dirs
|
|
import yaml
|
|
|
|
|
|
def data_preprocessing(conf):
|
|
if conf['control']['split']:
|
|
split_subdirs(conf)
|
|
image_ex = ImageExtendProcessor(conf)
|
|
image_ex.control_number()
|
|
split_directory(conf)
|
|
if conf['control']['combine']:
|
|
combine_dirs(conf)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
with open('../configs/sub_data.yml', 'r') as f:
|
|
conf = yaml.load(f, Loader=yaml.FullLoader)
|
|
data_preprocessing(conf)
|