This project provides NanoDet image inference, webcam inference and benchmark using Tencent's NCNN framework.
Download and Install Visual Studio from https://visualstudio.microsoft.com/vs/community/
Download and install OpenCV from https://github.com/opencv/opencv/releases
Download and install Vulkan SDK from https://vulkan.lunarg.com/sdk/home
Clone NCNN repository
git clone --recursive https://github.com/Tencent/ncnn.git
Build NCNN following this tutorial: Build for Windows x64 using VS2017
Add ncnn_DIR
= YOUR_NCNN_PATH/build/install/lib/cmake/ncnn
to system environment variables.
Build project: Open x64 Native Tools Command Prompt for VS 2019 or 2017
cd <this-folder>
mkdir -p build
cd build
cmake ..
msbuild nanodet_demo.vcxproj /p:configuration=release /p:platform=x64
Build and install OpenCV from https://github.com/opencv/opencv
Download Vulkan SDK from https://vulkan.lunarg.com/sdk/home
Clone NCNN repository
git clone --recursive https://github.com/Tencent/ncnn.git
Build NCNN following this tutorial: Build for Linux / NVIDIA Jetson / Raspberry Pi
Set environment variables. Run:
export ncnn_DIR=YOUR_NCNN_PATH/build/install/lib/cmake/ncnn
Build project
cd <this-folder>
mkdir build
cd build
cmake ..
make
Download NanoDet ncnn model.
Copy nanodet_m.param and nanodet_m.bin to demo program folder.
nanodet_demo 0 0
nanodet_demo 1 IMAGE_FOLDER/*.jpg
nanodet_demo 2 VIDEO_PATH
nanodet_demo 3 0
Notice:
If benchmark speed is slow, try to limit omp thread num.
Linux:
export OMP_THREAD_LIMIT=4