Skip to content

Commit

Permalink
feat: ✨ tf mobilenet_v3_small_page_orientation checkpoint (#1636)
Browse files Browse the repository at this point in the history
  • Loading branch information
odulcy-mindee authored Jun 6, 2024
1 parent 5eda559 commit 866557a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion doctr/models/classification/mobilenet/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"std": (0.299, 0.296, 0.301),
"input_shape": (512, 512, 3),
"classes": [0, -90, 180, 90],
"url": None,
"url": "https://doctr-static.mindee.com/models?id=v0.8.1/mobilenet_v3_small_page_orientation-aec9553e.zip&src=0",
},
}

Expand Down
3 changes: 0 additions & 3 deletions tests/tensorflow/test_models_classification_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ def test_crop_orientation_model(mock_text_box):
assert all(isinstance(pred, float) for pred in classifier([text_box_0, text_box_270, text_box_180, text_box_90])[2])


# TODO: uncomment when model is available
"""
def test_page_orientation_model(mock_payslip):
text_box_0 = cv2.imread(mock_payslip)
# rotates counter-clockwise
Expand All @@ -127,7 +125,6 @@ def test_page_orientation_model(mock_payslip):
# 270 degrees is equivalent to -90 degrees
assert classifier([text_box_0, text_box_270, text_box_180, text_box_90])[1] == [0, -90, 180, 90]
assert all(isinstance(pred, float) for pred in classifier([text_box_0, text_box_270, text_box_180, text_box_90])[2])
"""


# temporarily fix to avoid killing the CI (tf2onnx v1.14 memory leak issue)
Expand Down

0 comments on commit 866557a

Please sign in to comment.