Depolying pytorch-trained model with libtorch.
- cmake 3.0
- libtorch-1.4(cpu)
- opencv 4.1.1
cd crnn_libtorch
mkdir build && cd build
cmake -DCMAKE_PREFIX_PATH="/home/username/libtorch" ..
make -j4
./CrnnDeploy ../src/crnn.pt ../src/keys.txt ../src/test.jpg
Tips: modify the libtoch path for your lib path.
You can convert your trained model with convert.py
.
- python 3.6
- torch 1.2.0
cd crnn_libtorch
python crnn_convert/convert.py
- Model compression.