{"id":13445322,"url":"https://github.com/nihui/ncnn-webassembly-portrait-segmentation","last_synced_at":"2025-07-05T20:12:59.139Z","repository":{"id":139969489,"uuid":"365201647","full_name":"nihui/ncnn-webassembly-portrait-segmentation","owner":"nihui","description":"Portrait segmentation in your web browser with ncnn and webassembly","archived":false,"fork":false,"pushed_at":"2023-02-27T03:34:41.000Z","size":3416,"stargazers_count":34,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-25T10:23:06.057Z","etag":null,"topics":["artificial-intelligence","chrome","cross-platform","edge","firefox","ncnn","neural-network","segmentation","webassembly"],"latest_commit_sha":null,"homepage":"https://nihui.github.io/ncnn-webassembly-portrait-segmentation","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":"2021-05-07T10:46:20.000Z","updated_at":"2024-12-12T02:44:43.000Z","dependencies_parsed_at":"2024-01-16T02:46:05.526Z","dependency_job_id":"9d122c57-bc98-4112-a7e4-f5b372abddb3","html_url":"https://github.com/nihui/ncnn-webassembly-portrait-segmentation","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-portrait-segmentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Fncnn-webassembly-portrait-segmentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Fncnn-webassembly-portrait-segmentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Fncnn-webassembly-portrait-segmentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nihui","download_url":"https://codeload.github.com/nihui/ncnn-webassembly-portrait-segmentation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242685799,"owners_count":20169240,"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","ncnn","neural-network","segmentation","webassembly"],"created_at":"2024-07-31T05:00:30.804Z","updated_at":"2025-03-09T11:31:20.777Z","avatar_url":"https://github.com/nihui.png","language":"C++","funding_links":[],"categories":["📱 Platform-Specific Deployment","Application projects"],"sub_categories":["🌐 WebAssembly","Wasm"],"readme":"# ncnn-webassembly-portrait-segmentation\n\nopen https://nihui.github.io/ncnn-webassembly-portrait-segmentation and enjoy\n\n\n# build and deploy\n\n1. Install emscripten\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. Download and extract ncnn webassembly package\n```shell\nwget https://github.com/Tencent/ncnn/releases/download/20230223/ncnn-20230223-webassembly.zip\nunzip ncnn-20230223-webassembly.zip\n```\n\n3. Build four WASM feature variants\n```shell\nmkdir build\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\n4. Deploy the *.data *.js *.wasm and *.html files to your web server\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihui%2Fncnn-webassembly-portrait-segmentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnihui%2Fncnn-webassembly-portrait-segmentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihui%2Fncnn-webassembly-portrait-segmentation/lists"}