Closed DevKanui closed 10 months ago
from configs import ModelConfigs dataset, vocab, max_len = [], set(), 0 for file in stow.ls(stow.join('Datasets', 'captcha_images_v2')): dataset.append([stow.relpath(file), file.name]) vocab.update(list(file.name)) max_len = max(max_len, len(file.name)) configs = ModelConfigs() # Save vocab and maximum text length to configs configs.vocab = "".join(vocab) configs.max_text_length = max_len configs.save()
this thing missing there import stow
from mltu.dataProvider import DataProvider from mltu.preprocessors import ImageReader from mltu.transformers import ImageResizer, LabelIndexer, LabelPadding from mltu.augmentors import RandomBrightness, RandomRotate, RandomErodeDilate data_provider = DataProvider( dataset=dataset, skip_validation=True, batch_size=configs.batch_size, data_preprocessors=[ImageReader()], transformers=[ ImageResizer(configs.width, configs.height), LabelIndexer(configs.vocab), LabelPadding(max_word_length=configs.max_text_length, padding_value=len(configs.vocab)) ], )
configs arent imported on basic also dataset is not a file at whole, the whole project as where the datagets created isn't complementary
also this isn't used: from mltu.augmentors import RandomBrightness, RandomRotate, RandomErodeDilate
hopping for rework
Let me know which version you use, of mltu
no response.
this thing missing there import stow
configs arent imported on basic also dataset is not a file at whole, the whole project as where the datagets created isn't complementary
also this isn't used: from mltu.augmentors import RandomBrightness, RandomRotate, RandomErodeDilate
hopping for rework