background generator issue
while i try to add other backgrounds by adding them in pictures folder...the generator still prints old default images from pictures as background.
That is weird, I'll try to reproduce the issue.
I added a new parameter that allows you to pass and image_dir as a parameter, I think it will streamline the whole thing quite a bit.
It's not merged yet: https://github.com/Belval/TextRecognitionDataGenerator/pull/137
It's merged now, please try it and report back.
@Belval I'm trying this from my Jupyter Notebook, should it give the background images by default.
By default it does not give me any backgrounds, also specifying the absolute path doesn't work like this:
base_generator = GeneratorFromRandom(count=10,length=2,use_numbers=False,use_symbols=False,
orientation=0,use_letters=True,
image_dir='/home/ubuntu/mayub/text_detection/examples')
The way I have installed it is pip install trdg
Do I need to make any changes ?
Got it fixed. I had to give the background_type=3 as well in the arguments and it worked.
However if I don't specify any directory, the default directory is giving error
[Errno 2] No such file or directory: '/home/ubuntu/mayub/text_detection/TextRecognitionDataGenerator/trdg/generators/images'
It's picking up images dir from one addition level deep. Not sure if it should be .. or ../.. in the code (Line 42) to get the default path.
This should be covered by tests, thank you for reporting the issue I will look into it.