Lucie666's picture
PP-OCRv6 tiny (det + rec) converti en burnpack pour Burn
fbcc547 verified
Raw
History Blame Contribute Delete
735 Bytes
// build.rs — regenerate the two Burn graphs from the (patched) PaddlePaddle ONNX files.
// build-dependencies: burn-onnx = "0.22.0-pre.1"; runtime: burn = "0.22.0-pre.2" (+ burn-store).
use burn_onnx::{LoadStrategy, ModelGen};
fn main() {
// PP-OCRv6_tiny_det: auto_pad SAME_UPPER rewritten to explicit pads (see fix_onnx.py).
ModelGen::new()
.input("det_pads.onnx")
.out_dir("model/")
.load_strategy(LoadStrategy::Bytes)
.run_from_script();
// PP-OCRv6_tiny_rec: byte-identical to PaddlePaddle/PP-OCRv6_tiny_rec_onnx inference.onnx.
ModelGen::new()
.input("rec_pads.onnx")
.out_dir("model/")
.load_strategy(LoadStrategy::Bytes)
.run_from_script();
}