-
Notifications
You must be signed in to change notification settings - Fork 453
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
docs: fix faulty code for prediction and recognition demos #1800
docs: fix faulty code for prediction and recognition demos #1800
Conversation
fix faulty code for prediction and recognition demos
Looks like a minor bug @felixdittrich92 , kindly merge if looks okay to you! Amazing OCR guys, Open Source all the way! |
Hmm, not sure on the CI/CD breaking though. It just states it's an internal github actions error, can someone from the docTR team, please trigger a re-run for the failing job? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @khanfarhan10 👋🏼,
Thanks for the PR 👍
Only a small comment to clearify before merging :)
dummy_img = (255 * np.random.rand(800, 600, 3)).astype(np.uint8) | ||
out = model([dummy_img]) | ||
|
||
You can pass specific boolean arguments to the predictor: | ||
|
||
* `pretrained`: if you want to use a model that has been pretrained on a specific dataset, this will load the corresponding weights to enhance the model's performance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@khanfarhan10 I think we should drop to enhance the model's performance
sounds a bit missleading because otherwise it's random init and will lead to no or useless results ^^ wdyt ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified to the following:
pretrained
: if you want to use a model that has been pretrained on a specific dataset, setting pretrained=True
this will load the corresponding weights. If pretrained=False
, which is the default, would otherwise lead to a random initialization and would lead to no/useless results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felixdittrich92 kindly have a re-look.
Failing api test can be ignored i missed to replace the deprecated |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1800 +/- ##
==========================================
+ Coverage 96.57% 96.60% +0.02%
==========================================
Files 165 165
Lines 7892 7892
==========================================
+ Hits 7622 7624 +2
+ Misses 270 268 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Minor pretrained argument description fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @khanfarhan10 🤗
fix faulty code for prediction and recognition demos