Skip to content

Deploy nanodet, the super fast and lightweight object detection, in your web browser with ncnn and webassembly

Notifications You must be signed in to change notification settings

hhy5277/ncnn-webassembly-nanodet

 
 

Repository files navigation

ncnn-webassembly-nanodet

open https://nihui.github.io/ncnn-webassembly-nanodet and enjoy

build and deploy

  1. Install emscripten
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 2.0.8
./emsdk activate 2.0.8

source emsdk/emsdk_env.sh
  1. Download and extract ncnn webassembly package
wget https://github.com/nihui/ncnn/releases/download/20210519/ncnn-20210519-webassembly.zip
unzip ncnn-20210519-webassembly.zip
  1. Build four WASM feature variants
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DWASM_FEATURE=basic ..
make -j4
cmake -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DWASM_FEATURE=simd ..
make -j4
cmake -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DWASM_FEATURE=threads ..
make -j4
cmake -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DWASM_FEATURE=simd-threads ..
make -j4
  1. Deploy the *.data *.js *.wasm and *.html files to your web server

About

Deploy nanodet, the super fast and lightweight object detection, in your web browser with ncnn and webassembly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 69.0%
  • HTML 25.0%
  • CMake 6.0%