Skip to content

Commit

Permalink
add docs, update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
rwood-97 committed Sep 12, 2024
1 parent b2033ec commit ea06538
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ _ADD NEW CHANGES HERE_
- All file loading methods now support `pathlib.Path` and `gpd.GeoDataFrame` objects as input ([#495](https://github.com/maps-as-data/MapReader/pull/495))
- Loading of dataframes from GeoJSON files now supported in many file loading methods (e.g. `add_metadata`, `Annotator.__init__`, `AnnotationsLoader.load`, etc.) ([#495](https://github.com/maps-as-data/MapReader/pull/495))
- `load_frames.py` added to `mapreader.utils`. This has functions for loading from various file formats (e.g. CSV, Excel, GeoJSON, etc.) and converting to GeoDataFrames ([#495](https://github.com/maps-as-data/MapReader/pull/495))
- Added tests for text spotting code ([#500](https://github.com/maps-as-data/MapReader/pull/500))

### Changed

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Running tests
=============

To run the tests for MapReader, you will need to have installed the **dev dependencies** as described above.
To run the tests for MapReader, you will need to have installed the **dev dependencies** (as described :doc:`here </getting-started/installation-instructions/2-install-mapreader>`.

Also, if you have followed the "Install from PyPI" instructions, you will need to clone the MapReader repository to access the tests. i.e.:
.. note:: If you have followed the "Install from PyPI" instructions, you will also need to clone the MapReader repository to access the tests. i.e.:

.. code-block:: bash
Expand All @@ -18,3 +18,44 @@ You can then run the tests using from the root of the MapReader directory using
python -m pytest -v
If all tests pass, this means that MapReader has been installed and is working as expected.

Testing text spotting
---------------------

The tests for the text spotting code are separated from the main tests due to dependency conflicts.

You will only be able to run the text spotting tests for the text spotting framework (DPTextDETR, DeepSolo or MapTextPipeline) you have installed.

For DPTextDETR, use the following commands:

.. code-block:: bash
cd path/to/MapReader # change this to your path, e.g. cd ~/MapReader
conda activate mapreader
export ADET_PATH=path/to/DPTextDETR # change this to the path where you have saved the DPTextDETR repository
wget https://huggingface.co/rwood-97/DPText_DETR_ArT_R_50_poly/resolve/main/art_final.pth # download the model weights
python -m pytest -v tests_text_spotting/test_dptext_runner.py
For DeepSolo:

.. code-block:: bash
cd path/to/MapReader # change this to your path, e.g. cd ~/MapReader
conda activate mapreader
export ADET_PATH=path/to/DeepSolo # change this to the path where you have saved the DeepSolo repository
wget https://huggingface.co/rwood-97/DeepSolo_ic15_res50/resolve/main/ic15_res50_finetune_synth-tt-mlt-13-15-textocr.pth # download the model weights
python -m pytest -v tests_text_spotting/test_deepsolo_runner.py
For MapTextPipeline:

.. code-block:: bash
cd path/to/MapReader # change this to your path, e.g. cd ~/MapReader
conda activate mapreader
export ADET_PATH=path/to/MapTextPipeline # change this to the path where you have saved the MapTextPipeline repository
wget https://huggingface.co/rwood-97/MapTextPipeline_rumsey/resolve/main/rumsey-finetune.pth # download the model weights
python -m pytest -v tests_text_spotting/test_maptext_runner.py
If all tests pass, this means that the text spotting framework has been installed and is working as expected.

0 comments on commit ea06538

Please sign in to comment.