-
Notifications
You must be signed in to change notification settings - Fork 10
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
ModuleNotFoundError: No module named 'tensorflow.compat.v1.keras' #17
Comments
Dear @johnlockejrr |
I just chaged
|
I'll try right now. |
On the branch you told me, ran for about two minutes:
|
I haven't tested the script with Python 3.11, which it seems you're using. I can try running it with Python 3.11, or you can test it with Python 3.8 or 3.9, as those versions have already been verified. At the moment, I'm unsure why this error is occurring. |
I just changed in Worked more, kind of, until:
I'll try on Python 3.8 or 3.9, but I think the problem is I installed latest UPDATE:
I'll try that also 💯 |
It started to train now, fingers crossed :)
|
Glad to hear that! |
Still running after 16 minutes. |
For reference, I'm using CUDA 11.8 with cuDNN 8.6. I’ve also tested this configuration with Python 3.11, and it works without requiring any modifications to the script. |
One more question if I'm not bothering you too much. The wiki is a little complex, I hope I understood. From my |
UPDATE:
|
No, you don't need to add the .h5 extension to the models. I save them in the SavedModel format instead. Please follow this recommendation " Use |
Yes, I thought so. You use |
So about the config files for training label preparation. The config_dataset.json should be as follows: |
and training config file will be like this: |
With artificial class you have 3 classes. Background with label 0, textline 1 and artifical class 2 as assigned in config file. |
Perfect! Thank you so much! Keep up the good work. Just yesterday I found your project because I want something good for segmentation so I can forward to my text detection |
So with the json dataset config, the script |
For training you have to pass -to (type output) as 2d to generate labels for training. |
Yes I did it like this:
|
To use your model in combination with |
What UI interface you use in the image above to interact with the model? |
UPDATE:
But while trying inference:
|
Tried to interfer with
|
Even after training your model, if the text lines still aren’t well isolated, you can try predicting the artificial class with thresholding to make the model more aggressive in this aspect. |
I will try to train the model for about 40 epochs and see if improves. And yes, many lines in my data are |
Before training new model just use this thresholding for artificial class and see how will be the result.
|
In the |
First check it with inference.py |
I think here:
|
Like this?
|
Yes, you can apply an early erosion of 2. This means the text lines will first undergo erosion. |
hmm. should I change the
|
No, you shouldn't change it. How did this happen? You have generated the label with only different parameters before, and now you've just changed the early erosion?! |
I wanted to change the
|
Here :) |
I pushed a commit check it out |
You did exactly what I did locally 👯 |
You trained the model with my dataset with |
patches set to false. Please test this one |
Exactly the same issue: |
Could you share this image along with a few additional test images? |
Yes! One sec. |
Check out eynollah machine based reading order branch. With the latest model, I was able to isolate all text lines in your sample data. The latest model GT preparation was with these parameters
|
and xml file |
Perfect! |
This branch did the trick 🗡️ |
Hi!
I try to finetune a model and I get this error:
ModuleNotFoundError: No module named 'tensorflow.compat.v1.keras'
Under my WSL 2 I couldn't install
tensorflow==2.12.1
because withCUDA Version: 12.7
doesn't have GPU support, so I installedtf_nightly 2.19.0.dev20241017
that works.I know that
tensorflow.compat.v1.keras
is deprecated in latesttensorflow
, what can I do? Is thatsession
really needed?Thank you!
The text was updated successfully, but these errors were encountered: