File size: 735 Bytes
fbcc547 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | // 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();
}
|