{"id":13440143,"url":"https://github.com/mil-tokyo/webdnn","last_synced_at":"2025-05-13T22:03:31.640Z","repository":{"id":21394410,"uuid":"87403752","full_name":"mil-tokyo/webdnn","owner":"mil-tokyo","description":"The Fastest DNN Running Framework on Web Browser","archived":false,"fork":false,"pushed_at":"2024-12-01T05:46:28.000Z","size":26315,"stargazers_count":1989,"open_issues_count":81,"forks_count":147,"subscribers_count":60,"default_branch":"master","last_synced_at":"2025-04-29T13:19:26.068Z","etag":null,"topics":["accelerate","deep-neural-networks","javascript","optimization","webgpu"],"latest_commit_sha":null,"homepage":"https://mil-tokyo.github.io/webdnn","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mil-tokyo.png","metadata":{"files":{"readme":"README.ja.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-06T08:11:46.000Z","updated_at":"2025-04-18T10:55:11.000Z","dependencies_parsed_at":"2024-01-06T12:02:57.021Z","dependency_job_id":"72643321-2f02-4dde-86be-889d23cf962e","html_url":"https://github.com/mil-tokyo/webdnn","commit_stats":{"total_commits":949,"total_committers":15,"mean_commits":"63.266666666666666","dds":0.5026343519494205,"last_synced_commit":"d15df8f60544ff948c5e529d6eb76707b7177ff4"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mil-tokyo%2Fwebdnn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mil-tokyo%2Fwebdnn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mil-tokyo%2Fwebdnn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mil-tokyo%2Fwebdnn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mil-tokyo","download_url":"https://codeload.github.com/mil-tokyo/webdnn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254036811,"owners_count":22003653,"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":["accelerate","deep-neural-networks","javascript","optimization","webgpu"],"created_at":"2024-07-31T03:01:20.187Z","updated_at":"2025-05-13T22:03:31.591Z","avatar_url":"https://github.com/mil-tokyo.png","language":"TypeScript","funding_links":[],"categories":["Python","Development","Frameworks \u0026 Acceleration Library","TypeScript","Frameworks","Javascript","JavaScript","其他_机器学习与深度学习","JavaScript Tools, Libraries, and Frameworks","Libraries"],"sub_categories":["Javascript","Tools","[Tools](#tools-1)","JavaScript Libraries for Machine Learning","Web"],"readme":"# WebDNN\n\n[English](README.md)\n\nWebDNN version 2のα版です。WebDNN 1.xとの大きな違いは、入力としてONNX形式のモデルのみを受け付ける点です。Pythonによる前処理なしで、ONNXモデルを直接Webブラウザで読み込むことが可能です。さらに、オフラインでのモデル最適化を行うことも可能です。\n\n[Version 1.x](https://github.com/mil-tokyo/webdnn/tree/v1.2.11)\n\n# 対応バックエンド(高速化技術)\n\nモダンブラウザのほとんどで、WebGLが使用可能。\n\n- WebGPU\n  - Chrome Canary搭載版。\n  - iOS13に搭載のWebGPUは廃止予定のWSL言語によるシェーダを必要とするため非対応。\n- WebGL\n  - WebGL2が使用可能な場合は使用する。WebGL1のみ対応のSafariにも対応。\n- WebAssembly\n\n# 開発環境セットアップ\n\nnode.js 14, python 3.6以降, emscripten 2.0以降が動作する環境が必要です。\n\n```\nyarn\npython setup.py develop\n```\n\n# ビルド\n```\nyarn build:all\n```\n\nビルド成果物\n- `dist/webdnn.js`\n  - 最適化されていないONNXモデルを読み込むことができるライブラリ\n- `dist/webdnn-core.js`\n  - WebDNNにより最適化されたモデルを読み込むことができるライブラリ\n\n# 基本的な使い方\n\n`dist/webdnn.js`を`\u003cscript\u003e`タグでロードすることで、グローバルに`WebDNN`オブジェクトが追加される。ONNXモデル`model_directory/model.onnx`が存在すると仮定し、形状`[1, 2]`のテンソルを入力として実行する。\n\n```javascript\nconst runner = await WebDNN.load(\"model_directory/\");\nconst inputDataArray = new Float32Array([5.1, -2.3]);\nconst inputTensor = new WebDNN.CPUTensor([1, 2], \"float32\", inputDataArray);\nconst [outputTensor] = await runner.run([inputTensor]);\n\nconsole.log(outputTensor.data);  // Float32Array\n```\n\n動作する最小限の完全なコードは`example/minimum`を参照。\n\n# テスト\n\nテスト対象のONNXモデルおよび、入出力テンソルの生成\n\n```\npip install -r requirements.test.txt\npython test/model_test/make_models.py\n```\n\nWebブラウザ上での実行\n\n```\nyarn server\n```\n\nWebブラウザで\u003chttp://localhost:8080/test/model_test/runner/standard.html\u003eを開き、テストしたいバックエンドにチェックを入れ、Testボタンをクリックすることでテストが実行される。\n\nモデルの最適化を含めたテストを行う場合は、\n\n```\npython test/model_test/make_models.py --optimize\n```\n\n\u003chttp://localhost:8080/test/model_test/runner/optimized.html\u003e\n\nを使用する。ただし、`make_models.py`の実行時間が長くかかる。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmil-tokyo%2Fwebdnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmil-tokyo%2Fwebdnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmil-tokyo%2Fwebdnn/lists"}