-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade Keras to 2.4.0 to be compatible with Python 3.8 (#86)
* Upgrade Keras to 2.4.0 or later (which implicitly requires TF 2.2 or later) * Support for Python 3.8
- Loading branch information
Hiromu Hota
authored
Oct 9, 2020
1 parent
fbe6a1a
commit f631efc
Showing
6 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""Test table area detection.""" | ||
|
||
from pdftotree.core import load_model | ||
from pdftotree.visual.visual_utils import predict_heatmap | ||
|
||
|
||
def test_vision_model(): | ||
"""Check if the vision model runs and returns results in expected format.""" | ||
pdf_file = "tests/input/paleo.pdf" | ||
model_path = "tests/input/paleo_visual_model.h5" | ||
model = load_model("vision", model_path) | ||
page_num = 0 | ||
image, pred = predict_heatmap( | ||
pdf_file, page_num, model | ||
) # index start at 0 with wand | ||
assert image.shape == (448, 448, 3) | ||
assert pred.shape == (448, 448) | ||
|
||
|
||
# TODO: add test_ml_model and test_heuristic_model |