Instructions to use Filiphw/doctr-page-orientation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- docTR
How to use Filiphw/doctr-page-orientation with docTR:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Add doctr-page-orientation model
Browse files- README.md +44 -0
- config.json +27 -0
- pytorch_model.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
tags:
|
| 4 |
+
- ocr
|
| 5 |
+
- pytorch
|
| 6 |
+
- doctr
|
| 7 |
+
- classification
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
<p align="center">
|
| 12 |
+
<img src="https://doctr-static.mindee.com/models?id=v0.3.1/Logo_doctr.gif&src=0" width="60%">
|
| 13 |
+
</p>
|
| 14 |
+
|
| 15 |
+
**Optical Character Recognition made seamless & accessible to anyone, powered by PyTorch**
|
| 16 |
+
|
| 17 |
+
## Task: classification
|
| 18 |
+
|
| 19 |
+
https://github.com/mindee/doctr
|
| 20 |
+
|
| 21 |
+
### Example usage:
|
| 22 |
+
|
| 23 |
+
```python
|
| 24 |
+
>>> from doctr.io import DocumentFile
|
| 25 |
+
>>> from doctr.models import ocr_predictor, from_hub
|
| 26 |
+
|
| 27 |
+
>>> img = DocumentFile.from_images(['<image_path>'])
|
| 28 |
+
>>> # Load your model from the hub
|
| 29 |
+
>>> model = from_hub('mindee/my-model')
|
| 30 |
+
|
| 31 |
+
>>> # Pass it to the predictor
|
| 32 |
+
>>> # If your model is a recognition model:
|
| 33 |
+
>>> predictor = ocr_predictor(det_arch='db_mobilenet_v3_large',
|
| 34 |
+
>>> reco_arch=model,
|
| 35 |
+
>>> pretrained=True)
|
| 36 |
+
|
| 37 |
+
>>> # If your model is a detection model:
|
| 38 |
+
>>> predictor = ocr_predictor(det_arch=model,
|
| 39 |
+
>>> reco_arch='crnn_mobilenet_v3_small',
|
| 40 |
+
>>> pretrained=True)
|
| 41 |
+
|
| 42 |
+
>>> # Get your predictions
|
| 43 |
+
>>> res = predictor(img)
|
| 44 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"mean": [
|
| 3 |
+
0.694,
|
| 4 |
+
0.695,
|
| 5 |
+
0.693
|
| 6 |
+
],
|
| 7 |
+
"std": [
|
| 8 |
+
0.299,
|
| 9 |
+
0.296,
|
| 10 |
+
0.301
|
| 11 |
+
],
|
| 12 |
+
"input_shape": [
|
| 13 |
+
3,
|
| 14 |
+
512,
|
| 15 |
+
512
|
| 16 |
+
],
|
| 17 |
+
"classes": [
|
| 18 |
+
0,
|
| 19 |
+
-90,
|
| 20 |
+
180,
|
| 21 |
+
90
|
| 22 |
+
],
|
| 23 |
+
"url": "https://doctr-static.mindee.com/models?id=v0.8.1/mobilenet_v3_small_page_orientation-8e60325c.pt&src=0",
|
| 24 |
+
"num_classes": 4,
|
| 25 |
+
"arch": "mobilenet_v3_small_page_orientation",
|
| 26 |
+
"task": "classification"
|
| 27 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0d663e6a6c423314b312fb0f6bb56c668e919a65784f49093787a97ace6f797f
|
| 3 |
+
size 6219763
|