-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to find data adapter that can handle input #30
Comments
Hi, if you followed my tutorial from pylessons.com then you may face a problem with code. Use newest mltu library version. And use the right ImageReader, example code:
|
Thank you for the fast response !
|
try to iterate train_data_provider in for loop and check if you receive correct data there |
Could you sent me an example of your annotation files. I just need a few lines of the txt files. I think that's the problem. |
I still get this error:
My dataset in read_annotation_file looks like this:
Versions: |
you tried to run this: for data in train_data_provider:
print(data[0], data[1]) Check if it doesn't return None, because it seems like that |
The result of:
looks like this:
|
Looks ok, try to print following: for data in train_data_provider:
if data[0]==None or data[1]==None:
print("sometwing wrong in data")
else:
print(data[0].shape, data[1].shape) |
Tried the following code:
Result is:
But this was the only line that was printed out |
your batch_size is 1000? |
1000 is the size of my dataset and I'm loading it as described on to the dataset. I already sent the dataset above. |
Hi @pythonlessons,
I'm trying to use the image to word Tutorial.
I changed the train.py a bit in order to read my images and labels better. The only change was in def read_annotation_file:
Old Code:
New Code:
I also changed something in line 91 due to an error:
Old Code:
metrics=[CWERMetric()],
New Code:
metrics=[CWERMetric('accuracy')],
This is my error:
Traceback (most recent call last):
File "/path/to/mltu/Tutorials/01_image_to_word/train.py", line 111, in
model.fit(
File "/path/to/.local/lib/python3.10/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/path/to/.local/lib/python3.10/site-packages/keras/engine/data_adapter.py", line 1083, in select_data_adapter
raise ValueError(
ValueError: Failed to find data adapter that can handle input: <class 'mltu.dataProvider.DataProvider'>, <class 'NoneType'>
How do I need to change train_data_provider or train_dataset or is it a version problem ?
The text was updated successfully, but these errors were encountered: