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

The steps of model training #6

Closed
09876qwrte opened this issue Aug 20, 2018 · 13 comments
Closed

The steps of model training #6

09876qwrte opened this issue Aug 20, 2018 · 13 comments

Comments

@09876qwrte
Copy link

Hi, Thank you for your work , Can you tell me The steps of model training more in detail , which function will be used, Thank you

@09876qwrte
Copy link
Author

I only want to train the part of detection , without the OCR recognition

@HsiehYiChia
Copy link
Owner

You need to transform your data to LBP by get_lbp_data(). After that, feed the LBP data to train_cascade().
I'll fix this to make it easier in someday :P

@09876qwrte
Copy link
Author

So,there only use get_lbp_data() and train_cascade() in the training? I have train the model by your data yesterday for 16 hours, but there have nothing result and log, Is this normal?

@HsiehYiChia
Copy link
Owner

HsiehYiChia commented Aug 21, 2018

Yes, for the training of detection classifier, it only involves

  • get_lbp_data (get lbp data of training data)
  • train_cascade (train weak and strong text classifiers)

I can't recall the detail of them right now, but both functions should finish within few minutes.
The code isn't too long to trace, so you can trace it and see how it works

@09876qwrte
Copy link
Author

I found opencv_train() in your code , could this function take place of train_cascade(). and have the same result?

@HsiehYiChia
Copy link
Owner

HsiehYiChia commented Aug 28, 2018

This function will train Adaboost classifier for OpenCV's build-in Machine learning module, and that won't be compatible with my Adaboost. I add this function just for comparison between my Adaboost and OpenCV's Adaboost.

@09876qwrte
Copy link
Author

Hi , I want to get the Binary MASK for every ER*, Can this be implemented in your code?

@HsiehYiChia
Copy link
Owner

That is feasible, I had already try that. However, both time and space complexity will increase, especially space complexity because there are enormous amount of ER in an image.

@09876qwrte
Copy link
Author

I want to put the Binary MASK to CNN, so could you tell where you have realize it in your code,Thank you

@HsiehYiChia
Copy link
Owner

There are 2 way you can use:

  1. Use a link list of pixels for each ER. Whenever a pixel is accumulate to this ER, append the pixel to the link list. It is implemented in er_accumulate or er_tree_extract. You can utilize int pixel and **struct plist ** of struct ER. A brief intro. of int pixel is it stands for the position of a pixel:
    pixel%image_width = x ; pixel/image_width = y
  2. Another work around is to binarize the ER since we keep tracking the level of every ER. You can utilize int level of struct ER. Keep in mind that this method may not give you exact pixel mask because the bounding box of ER could contain something which is not a text.

@09876qwrte
Copy link
Author

Thank you very much, And I want to continue training on the basis of the last training result, so I would like to ask if I can use the last training result to initialize the current training model, If this way is ok, what should to change

@HsiehYiChia
Copy link
Owner

I am sorry, I don't get it. What do you mean "training on the basis of the last training result"?

@09876qwrte
Copy link
Author

the last training result is the "strong.classifier" and "weak.classifier", The "training on the basis of the last training result" is like the finetune in the deep learning

@ghost ghost mentioned this issue Sep 28, 2018
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