Understanding detection model training and metrics #1725
Replies: 1 comment 2 replies
-
Hi @hanshupe007 👋🏼,
Loss: doctr/doctr/models/detection/fast/pytorch.py Line 213 in 9045dcf It's a combination of text loss + kernel loss (where the text loss is the loss over the created mask as you provide the boxes and kernel loss is the loss for the "inner text" where we create shrunken masks for each box) additional OHEM is used which forces the model to focus on more complicated parts to detect - Attention: while building the targets we ignore boxes which would produce box masks with less than 3x3 pixels Metrics: Line 230 in 9045dcf
It is covered in mean IoU (Intersection over Union) - which is really hard to increase at some point - but it describes as the name says how accurate the predictions matches your target boxes :)
The base model seems to work already pretty well in this case i would try to freeze the feature extractor you can do this with (
Optimal no padding they should be close as possible to the text. Hope this helps :) |
Beta Was this translation helpful? Give feedback.
-
I am fine-tuning the fast_base model, which already worked pretty well, but missed some individual special characters (*) in a table, the base model returns:
Validation loss: 0.370893 (Recall: 32.82% | Precision: 36.06% | Mean IoU: 47.00%)
`
After fine-tuning the pretrained model on 200 synthetic images, the result is:
Validation loss: 0.191029 (Recall: 31.34% | Precision: 31.33% | Mean IoU: 42.00%)
Which leads me to the following questions:
Beta Was this translation helpful? Give feedback.
All reactions