This folder provides NanoDet inference code using for LibTorch.
This project needs OpenCV and CMake to work.
Install CMake using a package manager of your choice. For example, the following command will install CMake on Ubuntu:
sudo apt install cmake libopencv-dev
Also, you'll need to download LibTorch. Refer to this page for more info.
Export TorchScript model using tools/export_torchscript.py
:
python ./tools/export_torchscript.py --cfg_path ${CONFIG_PATH} --model_path ${PYTORCH_MODEL_PATH} --input_shape ${MO}
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=/absolute/path/to/libtorch ..
make