{"id":13445327,"url":"https://github.com/nihui/ncnn-webassembly-nanodet","last_synced_at":"2025-04-14T03:33:59.318Z","repository":{"id":38885672,"uuid":"317457236","full_name":"nihui/ncnn-webassembly-nanodet","owner":"nihui","description":"Deploy nanodet, the super fast and lightweight object detection, in your web browser with ncnn and webassembly","archived":false,"fork":false,"pushed_at":"2023-02-27T06:25:37.000Z","size":3880,"stargazers_count":126,"open_issues_count":6,"forks_count":28,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T17:35:49.365Z","etag":null,"topics":["artificial-intelligence","chrome","cross-platform","edge","firefox","nanodet","ncnn","neural-network","object-detection","webassembly"],"latest_commit_sha":null,"homepage":"https://nihui.github.io/ncnn-webassembly-nanodet/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nihui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-12-01T07:20:03.000Z","updated_at":"2025-03-13T12:04:36.000Z","dependencies_parsed_at":"2024-01-16T02:46:07.330Z","dependency_job_id":"dba0eda4-a76d-4be2-9ba7-c64c50e87f04","html_url":"https://github.com/nihui/ncnn-webassembly-nanodet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Fncnn-webassembly-nanodet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Fncnn-webassembly-nanodet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Fncnn-webassembly-nanodet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Fncnn-webassembly-nanodet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nihui","download_url":"https://codeload.github.com/nihui/ncnn-webassembly-nanodet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248815571,"owners_count":21165949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","chrome","cross-platform","edge","firefox","nanodet","ncnn","neural-network","object-detection","webassembly"],"created_at":"2024-07-31T05:00:30.923Z","updated_at":"2025-04-14T03:33:59.298Z","avatar_url":"https://github.com/nihui.png","language":"C++","funding_links":[],"categories":["Application projects"],"sub_categories":["Wasm"],"readme":"# ncnn-webassembly-nanodet\n\n# 更新 nanodet-plus 版本\n\n站在巨人的肩膀上，感谢 nihui 大佬\n\n参考 https://github.com/Tencent/ncnn/blob/master/examples/nanodetplus_pnnx.cpp 修改了 nanodet-plus 版本的 Web 版\n\nopen https://nihui.github.io/ncnn-webassembly-nanodet and enjoy\n\n# build and deploy\n\n1. Install emscripten\n\n```shell\ngit clone https://github.com/emscripten-core/emsdk.git\ncd emsdk\n./emsdk install 3.1.28\n./emsdk activate 3.1.28\n\nsource emsdk/emsdk_env.sh\n```\n\n2. clone this repo\n   \n```shell\ngit clone https://github.com/nihui/ncnn-webassembly-nanodet.git\n```\n\n3. Enter the repo direcroty and Download and extract ncnn webassembly package\n\n```shell\nwget https://github.com/Tencent/ncnn/releases/download/20230223/ncnn-20230223-webassembly.zip\nunzip ncnn-20230223-webassembly.zip\n```\n\n4. Build four WASM feature variants\n\n```shell\nmkdir build # in ncnn-webassembly-nanodet directory\ncd build\ncmake -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DWASM_FEATURE=basic ..\nmake -j4\ncmake -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DWASM_FEATURE=simd ..\nmake -j4\ncmake -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DWASM_FEATURE=threads ..\nmake -j4\ncmake -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DWASM_FEATURE=simd-threads ..\nmake -j4\n```\n\n5. Deploy the _.data _.js _.wasm and _.html files to your web server(you can find them in /build directory and this repo)\n\n```\n# deploy files\ndeploy/\n├── index.html\n├── nanodet-basic.data\n├── nanodet-basic.js\n├── nanodet-basic.wasm\n├── nanodet-simd.data\n├── nanodet-simd.js\n├── nanodet-simd-threads.data\n├── nanodet-simd-threads.js\n├── nanodet-simd-threads.wasm\n├── nanodet-simd-threads.worker.js\n├── nanodet-simd.wasm\n├── nanodet-threads.data\n├── nanodet-threads.js\n├── nanodet-threads.wasm\n├── nanodet-threads.worker.js\n└── wasmFeatureDetect.js\n```\n\n6. Deploy local server(python3 as a example)\n\n```\npython3 -m http.server --directory deploy\n```\n\n7. Access local server(chrome as a example)\n\n```\n# launch chrome browser, enter following command to address bar and press ENTER:\nchrome://flags/#unsafely-treat-insecure-origin-as-secure\n\n# enter following keyword to \"Search flags\" and press ENTER:\n\"insecure origins\"\nyou will find \"Insecure origins treated as secure\" key\n\n#enter local server url and click right side dropdown list, select \"Enabled\"\nurl example: http://192.168.1.100:8000\n\n#relaunch chrome browser and access http://192.168.1.100:8000 (replace 192.168.1.100 with your local ip)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihui%2Fncnn-webassembly-nanodet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnihui%2Fncnn-webassembly-nanodet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihui%2Fncnn-webassembly-nanodet/lists"}