Skip to content
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

No Output After Training on Weak Supervision #54

Open
theahmedmustafa opened this issue Feb 24, 2022 · 2 comments
Open

No Output After Training on Weak Supervision #54

theahmedmustafa opened this issue Feb 24, 2022 · 2 comments

Comments

@theahmedmustafa
Copy link

theahmedmustafa commented Feb 24, 2022

I tried training for Weak supervision using the SynthText Strong supervision model on a custom data set.

I trained for just three epochs with 1000 iterations each but when I use the models that get saved at each iteration at save-path the inference results are totally blank! No bounding box is drawn on any image after prediction.

Here are a few other observations:

  1. The Test-(iteration) folders in save-path contains images from my test dateset with blue bounding boxes which I assume is the ground truth, but no predicted bounding box seem to be drawn
  2. My loss drops to 0 and my accuracy goes to one just after a few iterations in the first epoch
  3. My precision and recall are both 1.0. The cumulative F-score is nan, probably because at some stage it gives a division error for some reason.
  4. All the folders in both (iteration)-next-target and (iteration)-predicted folders in the Generated folder at target-path are empty
  5. Prediction on the SynthText Strong Supervision model works just fine

I did write a script to convert the annotations for my data to the ICDAR format (basically what the pre_process function in main.py does), and it seems to match the required format, so I do not think that is the issue. The training runs without error.

Also, all the text annotations for the bounding boxes in my ground truth are ### since the data is not text level annotated, only the bounding boxes are drawn. I hope that is not the issue.

If you can make any sense of what the problem might be, kindly do tell me.
Regards

@mayank-git-hub
Copy link
Collaborator

Hello @theahmedmustafa .

Text annotations are required for weak supervision as it uses the number of characters in the word to break the word bounding box into equal sized segments. If no text annotations are provided, the model will just be fine-tuned to predict the output of the targets generated using the strong supervised model, which can have a lot of errors. This will cause instability during training and could lead to the results you are getting.

@theahmedmustafa
Copy link
Author

I added the text annotations to my data set and it has started to produce bounding boxes, however I am confused why all the folders inside Generated folder at target-path are always empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants