-
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
[prototype] compute orientation on segmentation map #1336
[prototype] compute orientation on segmentation map #1336
Conversation
@odulcy-mindee added for a first review (PR is not 100% final) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1336 +/- ##
==========================================
- Coverage 95.81% 95.76% -0.05%
==========================================
Files 155 155
Lines 6948 6950 +2
==========================================
- Hits 6657 6656 -1
- Misses 291 294 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
seg_maps = [ | ||
pred.permute(1, 2, 0).detach().cpu().numpy() for batch in predicted_batches for pred in batch["out_map"] | ||
] | ||
if return_maps: |
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.
return preds, seg_maps if return_maps else preds
raises an issue
loc_preds = self.det_predictor(pages, **kwargs) | ||
pages = [rotate_image(page, -angle, expand=False) for page, angle in zip(pages, origin_page_orientations)] | ||
# Forward again to get predictions on straight pages | ||
loc_preds = self.det_predictor(pages, **kwargs) # type: ignore[assignment] |
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.
sec forward is more save atm
If we have a solution also for upside down and the results from the seg_maps leads to 99%+ correct results we can change this later on and rotate the loc preds instead of the forward
434c0b5
to
04bcc59
Compare
@charlesmindee @frgfm @odulcy-mindee TF:
PT:
|
04bcc59
to
54dd7b5
Compare
@felixdittrich92 todo: Update doc strings |
Changed to round see: #1283 (reply in thread) |
4531652
to
4b30b29
Compare
4b30b29
to
d5c23b3
Compare
This PR:
Any feedback is super welcome 🤗
open todos: