Download all files from this repository to your device.
PPOCR_v6# tree -L 1
.
|-- 11.jpg # Test image
|-- README-zh.md
|-- README.md
|-- axmodel # Axmodel files for each version
|-- cls.json # Text direction classifier axmodel conversion config
|-- dataset # Quantization dataset & test dataset
|-- det.json # Detection model axmodel conversion config
|-- fonts # Rendering fonts
|-- onnx # Original ONNX files for each model
|-- ppocrv6_ax.py # Axmodel inference pipeline
|-- ppocrv6_onnx.py # ONNX inference pipeline
|-- rec.json # Recognition model axmodel conversion config
|-- res-ax.jpg # Axmodel inference result
|-- res-onnx.jpg # ONNX inference result
|-- run_det_ax.py # Detection axmodel accuracy test script
|-- run_det_onnx.py # Detection ONNX accuracy test script
|-- run_rec_ax.py # Recognition axmodel accuracy test script
`-- run_rec_onnx.py # Recognition ONNX accuracy test script
Conversion
cd dataset
sh download_quant_dataset.sh
sh download_val_dataset.sh
cd ..
pulsar2 build --config det.json
pulsar2 build --config cls.json
pulsar2 build --config rec.json
Note: When resize_mode is stretch, it follows the official approach of directly resizing to the model input size. When resize_mode is letterbox, it pads the bottom-right corner, which has a smaller gap from the dynamic-input ONNX model and achieves better metrics in this test. You can download the inference.onnx with dynamic input shape from small-det-onnx for comparison.