MapReader
MapReader copied to clipboard
Add text spotting
Summary
This PR begins the work of bringing text detection/recognition (ie. text spotting) into MapReader.
Addresses #358
Describe your changes
DeepSoloRunner
is a class used for running the DeepSolo model on images. This produces polygons + text.
DPTextDETRRunner
is a class used for running the DPText-DETR model on images. This produces just polygons.
To do:
- [x] Allow user to run on all patches in provided patch df
- [x] Add plotting function
- [x] Add docs for getting this running
- [x] Check licences
- [x] Add worked example
- [ ] Add polygon merging code (?)
Checklist before assigning a reviewer (update as needed)
- [x] Self-review code
- [x] Ensure submission passes current tests
- [ ] Add tests
- [ ] Update relevant docs
Reviewer checklist
Please add anything you want reviewers to specifically focus/comment on.
- [ ] Everything looks ok?
Codecov Report
Attention: Patch coverage is 6.16622%
with 350 lines
in your changes are missing coverage. Please review.
Project coverage is 62.12%. Comparing base (
f3b151c
) to head (6237341
). Report is 6 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #388 +/- ##
==========================================
- Coverage 65.41% 62.12% -3.29%
==========================================
Files 37 39 +2
Lines 6329 6701 +372
==========================================
+ Hits 4140 4163 +23
- Misses 2189 2538 +349
Flag | Coverage Δ | |
---|---|---|
unittests | 62.12% <6.16%> (-3.29%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
@rwood-97 to test this here's what I think I need to do - please can you edit this list as needed:
- Check out the branch
- ~~Set up a conda env like this to install MapReader using this branch~~ Set up a conda env and do
pip install .
- Install model dependencies outlined here
- Only one of the models can be installed at a time
- Run the two notebooks from this PR locally and make sure everything works
In the DPTextDETR Pipeline.ipynb
notebook, the line:
from mapreader.text_spot.dptext_detr_runner import DPTextDETRRunner
should be:
from mapreader.spot_text.dptext_detr_runner import DPTextDETRRunner
That line also failed initially (for me) because the timm
dependency wasn't installed. I just did pip install timm
in the same venv, and then it worked.