docs: add v5 weights & usage
Browse files
README.md
CHANGED
|
@@ -4,4 +4,41 @@ language:
|
|
| 4 |
- zh
|
| 5 |
- en
|
| 6 |
---
|
| 7 |
-
https://github.com/frotms/PaddleOCR2Pytorch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
- zh
|
| 5 |
- en
|
| 6 |
---
|
| 7 |
+
https://github.com/frotms/PaddleOCR2Pytorch
|
| 8 |
+
|
| 9 |
+
# Weights
|
| 10 |
+
|
| 11 |
+
- ptocr_v5_server_det.pth — detection (server) weights
|
| 12 |
+
- ptocr_v5_server_rec.pth — recognition (server) weights
|
| 13 |
+
|
| 14 |
+
## Download (recommended)
|
| 15 |
+
|
| 16 |
+
Python (tracks downloads via huggingface_hub):
|
| 17 |
+
|
| 18 |
+
```python
|
| 19 |
+
from huggingface_hub import hf_hub_download
|
| 20 |
+
# Detection
|
| 21 |
+
det_path = hf_hub_download(
|
| 22 |
+
repo_id="JoyCN/PaddleOCR-Pytorch", filename="ptocr_v5_server_det.pth"
|
| 23 |
+
)
|
| 24 |
+
# Recognition
|
| 25 |
+
rec_path = hf_hub_download(
|
| 26 |
+
repo_id="JoyCN/PaddleOCR-Pytorch", filename="ptocr_v5_server_rec.pth"
|
| 27 |
+
)
|
| 28 |
+
|
| 29 |
+
# Optional: load with PyTorch
|
| 30 |
+
import torch
|
| 31 |
+
det_weights = torch.load(det_path, map_location="cpu")
|
| 32 |
+
rec_weights = torch.load(rec_path, map_location="cpu")
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
Direct links (also counted):
|
| 36 |
+
|
| 37 |
+
- https://huggingface.co/JoyCN/PaddleOCR-Pytorch/resolve/main/ptocr_v5_server_det.pth?download=true
|
| 38 |
+
- https://huggingface.co/JoyCN/PaddleOCR-Pytorch/resolve/main/ptocr_v5_server_rec.pth?download=true
|
| 39 |
+
|
| 40 |
+
## Notes
|
| 41 |
+
|
| 42 |
+
- Please prefer the `huggingface_hub` API (`hf_hub_download`/`snapshot_download`) instead of `git lfs` cloning for downloads to be counted in Hub stats.
|
| 43 |
+
- Stats update periodically; it may take some time for downloads to appear.
|
| 44 |
+
|