• Stars
    star
    118
  • Rank 299,923 (Top 6 %)
  • Language
    C++
  • Created almost 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

ncnn-webassembly-nanodet

ๆ›ดๆ–ฐ nanodet-plus ็‰ˆๆœฌ

็ซ™ๅœจๅทจไบบ็š„่‚ฉ่†€ไธŠ๏ผŒๆ„Ÿ่ฐข nihui ๅคงไฝฌ

ๅ‚่€ƒ https://github.com/Tencent/ncnn/blob/master/examples/nanodetplus_pnnx.cpp ไฟฎๆ”นไบ† nanodet-plus ็‰ˆๆœฌ็š„ Web ็‰ˆ

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 3.1.28
./emsdk activate 3.1.28

source emsdk/emsdk_env.sh
  1. clone this repo
git clone https://github.com/nihui/ncnn-webassembly-nanodet.git
  1. Enter the repo direcroty and Download and extract ncnn webassembly package
wget https://github.com/Tencent/ncnn/releases/download/20230223/ncnn-20230223-webassembly.zip
unzip ncnn-20230223-webassembly.zip
  1. Build four WASM feature variants
mkdir build # in ncnn-webassembly-nanodet directory
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(you can find them in /build directory and this repo)
# deploy files
deploy/
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ nanodet-basic.data
โ”œโ”€โ”€ nanodet-basic.js
โ”œโ”€โ”€ nanodet-basic.wasm
โ”œโ”€โ”€ nanodet-simd.data
โ”œโ”€โ”€ nanodet-simd.js
โ”œโ”€โ”€ nanodet-simd-threads.data
โ”œโ”€โ”€ nanodet-simd-threads.js
โ”œโ”€โ”€ nanodet-simd-threads.wasm
โ”œโ”€โ”€ nanodet-simd-threads.worker.js
โ”œโ”€โ”€ nanodet-simd.wasm
โ”œโ”€โ”€ nanodet-threads.data
โ”œโ”€โ”€ nanodet-threads.js
โ”œโ”€โ”€ nanodet-threads.wasm
โ”œโ”€โ”€ nanodet-threads.worker.js
โ””โ”€โ”€ wasmFeatureDetect.js
  1. Deploy local server(python3 as a example)
python3 -m http.server --directory deploy
  1. Access local server(chrome as a example)
# launch chrome browser, enter following command to address bar and press ENTER:
chrome://flags/#unsafely-treat-insecure-origin-as-secure

# enter following keyword to "Search flags" and press ENTER:
"insecure origins"
you will find "Insecure origins treated as secure" key

#enter local server url and click right side dropdown list, select "Enabled"
url example: http://192.168.1.100:8000

#relaunch chrome browser and access http://192.168.1.100:8000 (replace 192.168.1.100 with your local ip)

More Repositories

1

waifu2x-ncnn-vulkan

waifu2x converter ncnn version, runs fast on intel / amd / nvidia / apple-silicon GPU with vulkan
C
2,963
star
2

opencv-mobile

The minimal opencv for Android, iOS, ARM Linux, Windows, Linux, MacOS, WebAssembly
C++
2,325
star
3

realsr-ncnn-vulkan

RealSR super resolution implemented with ncnn library
C
1,077
star
4

rife-ncnn-vulkan

RIFE, Real-Time Intermediate Flow Estimation for Video Frame Interpolation implemented with ncnn library
C
775
star
5

realcugan-ncnn-vulkan

real-cugan converter ncnn version, runs fast on intel / amd / nvidia / apple-silicon GPU with vulkan
C
751
star
6

ncnn-android-yolov5

The YOLOv5 object detection android example
C++
621
star
7

dain-ncnn-vulkan

DAIN, Depth-Aware Video Frame Interpolation implemented with ncnn library
C
506
star
8

ncnn-android-nanodet

C++
355
star
9

srmd-ncnn-vulkan

SRMD super resolution implemented with ncnn library
C
324
star
10

ruapu

Detect CPU features with single-file
C
268
star
11

ncnn-android-scrfd

C++
208
star
12

ncnn-assets

Python
186
star
13

ncnn-small-board

ncnn benchmark on various single board computers
157
star
14

ncnn-android-squeezenet

The squeezenet image classification android example
C++
141
star
15

ncnn-webassembly-yolov5

Deploy YOLOv5 in your web browser with ncnn and webassembly
C++
138
star
16

cain-ncnn-vulkan

CAIN, Channel Attention Is All You Need for Video Frame Interpolation implemented with ncnn library
C
130
star
17

vkpeak

A tool which profiles Vulkan devices to find their peak capacities
C++
96
star
18

ifrnet-ncnn-vulkan

IFRNet: Intermediate Feature Refine Network for Efficient Frame Interpolation implemented with ncnn library
C
92
star
19

ncnn-android-mobilenetssd

The mobilenetssd object detection android example
Java
89
star
20

ncnn-android-styletransfer

The style transfer android example
C
84
star
21

ncnn-android-benchmark

ncnn android benchmark app
C++
83
star
22

ncnn_on_esp32

C
65
star
23

stable-diffusion-ncnn-vulkan

60
star
24

nihui

57
star
25

valgrind-android

55
star
26

ncnn-webassembly-scrfd

Deploy SCRFD, an efficient high accuracy face detection approach, in your web browser with ncnn and webassembly
C++
52
star
27

ncnn-webassembly-portrait-segmentation

Portrait segmentation in your web browser with ncnn and webassembly
C++
33
star
28

riscv-v-toolchain

prebuild package for cross compiling riscv
18
star
29

ncnn-android-vkpeak

C++
17
star
30

styletransfer-ncnn-vulkan

C
17
star
31

ncnn_on_xr806

C++
14
star
32

ncnn-vulkan-compute-sample

CMake
13
star
33

fxxk-tensorflow-lite-note

add custom op in both tensorflow and tensorflow-lite
Jupyter Notebook
7
star
34

zzzz

C++
6
star
35

milkv-duo-test

C
5
star
36

kuaide

A fast desktop environment based on KDE technology
C++
5
star
37

InferXLite

C++
4
star
38

eva-qq-protocol

qq protocol document for eva
3
star
39

action-protobuf

CMake
3
star
40

libnofetion

next generation of ofetion library
C
3
star
41

oxygenspread

C
3
star
42

xf86-video-siska

xf86 Driver for SIS Chipset
C
3
star
43

playground

C++
2
star
44

ksaolaji

C++
2
star
45

VulkanOnMetal

Vulkan On Metal
C
2
star
46

kio-kuaipan

C++
2
star
47

kfuseiso

C++
1
star
48

eva-qt4

C++
1
star
49

action-xmwk

1
star
50

kopete-qq

C++
1
star
51

kiconedit

C++
1
star
52

kde-thumbnailer

C++
1
star
53

kcm-fontadjust

C++
1
star
54

choqok-sina

C++
1
star
55

qsopcast

C++
1
star
56

choqok-tencent

C++
1
star
57

nihui-patch

nihui's patch collection
1
star
58

dozen

1
star
59

estelle

C++
1
star
60

kamule

C++
1
star
61

kdoubanfm

C++
1
star
62

kopete-fetion

C++
1
star
63

vendor-rockchip-common

common
C
1
star
64

plasma-webqq

C++
1
star
65

choqok-netease

C++
1
star