-
Notifications
You must be signed in to change notification settings - Fork 29
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
Is candidate generation important during inference? #37
Comments
Think of candidates as a mixture of positive and negative samples. If the model doesn't see any negative examples, it is difficult to differentiate between right and wrong. This is why I personally feel candidates are required for training. |
@Praneet9 thanks for sharing details, I have one doubt in inference file i can see you have used code to generate candidates which is feed to the model as input-
candidates = extract_candidates.get_candidates(ocr_results) Model input- Please clarify it. Thanks |
I'm passing all the possible candidates that can be the classes I want. The model picks the most relevant one from them. |
Yeah but is it necessary? for fields like address, company name, registration name...etc, we cannot easily extract possible candidates using regex , so if i do not pass any candidates for such fields, will model be able to predict address field as well ? |
Here, in inference, we don't know what the actual invoice number is which is why we send all that looks like one. |
Okay but then in such case the model is not actually extracting fields, something like extracting address from paragraph of text, it just ranking based on of our possible input candidates.I think generating possible candidates for some fields like address, registration_number is itself challenging. |
This is a binary model that can just return True or False to the candidates you pass in and is not meant to do what you are asking for. |
Hi @Praneet9,
Is candidate generation important during inference as for some fields it's difficult to extract text using regex like address, company name, registration number as it keeps on changing over the templates because their pattern changes over the templates.
Also what if I do not give candidates for fields like address, will model be able to predict address field ?
The text was updated successfully, but these errors were encountered: