{"id":15195570,"url":"https://github.com/akbartus/depthanything-on-browser","last_synced_at":"2025-05-05T01:31:29.129Z","repository":{"id":256460229,"uuid":"854305459","full_name":"akbartus/DepthAnything-on-Browser","owner":"akbartus","description":"This repository demonstrates browser based implementation of DepthAnything and DepthAnythingV2 models. It is powered by Onnx and does not require any web servers or APIs.","archived":false,"fork":false,"pushed_at":"2025-03-14T05:06:22.000Z","size":238,"stargazers_count":18,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T15:45:37.274Z","etag":null,"topics":["ai","depthanything","depthanythingv2","ml","monocular-depth-estimation","onnx","onnxruntime","threejs"],"latest_commit_sha":null,"homepage":"https://depthanything.glitch.me/interactive-dynamic.html","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akbartus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-09-08T23:05:21.000Z","updated_at":"2025-04-03T18:49:50.000Z","dependencies_parsed_at":"2024-11-13T08:41:36.034Z","dependency_job_id":"b43e9120-aec7-4362-8d4f-3e95e3a468dc","html_url":"https://github.com/akbartus/DepthAnything-on-Browser","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"7c2c9f87ed3d7498fa8cd1b7e827263f41e910e4"},"previous_names":["akbartus/depthanything-on-browser"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akbartus%2FDepthAnything-on-Browser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akbartus%2FDepthAnything-on-Browser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akbartus%2FDepthAnything-on-Browser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akbartus%2FDepthAnything-on-Browser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akbartus","download_url":"https://codeload.github.com/akbartus/DepthAnything-on-Browser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252423181,"owners_count":21745556,"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":["ai","depthanything","depthanythingv2","ml","monocular-depth-estimation","onnx","onnxruntime","threejs"],"created_at":"2024-09-27T23:41:33.733Z","updated_at":"2025-05-05T01:31:29.117Z","avatar_url":"https://github.com/akbartus.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DepthAnything on Browser\n\n\u003cimg src=\"img/screenshot.jpg\" title=\"screenshot\" alt=\"screenshot\" style=\"text-align: center\"\u003e\n\n\n### **Description / Rationale**\nThis repository demonstrates web-based implementation of \u003ca href=\"https://github.com/LiheYoung/Depth-Anything\"\u003eDepth Anything: Unleashing the Power of Large-Scale Unlabeled Data. Foundation Model for Monocular Depth Estimation\u003c/a\u003e and more capable \u003ca href=\"https://github.com/DepthAnything/Depth-Anything-V2\"\u003eDepth Anything V2\u003c/a\u003e. This project demonstrates the following:\n1. Basic DepthAnything, which shows only generated depth (\"basic\" folder)\n2. Interactive DepthAnything, which shows 3D model based on generated depth and Three.js (\"interactive\" folder).\n3. Basic DepthAnythingV2, which shows only generated depth (\"basic-v2\" folder)\n4. Interactive DepthAnything v2 which shows 3D model based on generated depth and Three.js (\"interactive-v2\" folder).\n\n### **Instructions**\nTo use a DepthAnything example, copy the corresponding html file contents. Onnx original models were taken and adapted from \u003ca href=\"https://github.com/fabio-sim/Depth-Anything-ONNX/releases/tag/v2.0.0\"\u003eFabio Milentiansen Sim's Depth Anything ONNX repository.\u003c/a\u003e Quantization was done using Onnx's quantization functionality.\n\nTo dowload and locally serve models download them from the link provided:\n1. Depth Anything small model: https://cdn.glitch.me/0f5359e2-6022-421b-88f7-13e276d0fb33/depthanything_vits14.onnx (~97 mb)\n2. Depth Anything quantized model: https://cdn.glitch.me/0f5359e2-6022-421b-88f7-13e276d0fb33/depthanything-quant.onnx (~26 mb)\n3. Depth Anything v2 dynamic quantized small model: https://cdn.glitch.me/0f5359e2-6022-421b-88f7-13e276d0fb33/depthanythingv2-vits-dynamic-quant.onnx (~26 mb)\n4. Depth Anything v2 dynamic small model: https://cdn.glitch.me/0f5359e2-6022-421b-88f7-13e276d0fb33/depthanythingv2-vits-dynamic.onnx (~97 mb)\n5. Depth Anything v2 small model: https://cdn.glitch.me/0f5359e2-6022-421b-88f7-13e276d0fb33/depthanythingv2-vits.onnx (~97 mb)\n6. Depth Anything v2 small model with 4 bit quantization: https://cdn.glitch.global/0f5359e2-6022-421b-88f7-13e276d0fb33/model_q4f16.onnx (~18mb) (taken from ONNX community on HuggingFace, https://huggingface.co/onnx-community/depth-anything-v2-small/tree/main/onnx) \n\n\u003cb\u003ePlease note:\u003c/b\u003e\n1. To increase quality, increase the input image size, for example make it 1024px.\n```js\n  const size = 1024; // change input size as needed\n```\n2. To omit points in pointcloud generated, indicate how many:\n```js\n const skip = 2; // skip points here\n```\n3. To increase point cloud point size:\n```js\ngl_PointSize = 5.0; // change size here\n```\nWebgpu version works on the browsers and devices supporting it (see: https://github.com/gpuweb/gpuweb/wiki/Implementation-Status). \n\n### **Tech Stack**\nThe project was made possible thanks to DepthAnything and DepthAnythingV2, Fabio Milentiansen Sim's Depth Anything ONNX repositories, ONNX runtime web and Three.js.\n\n### **Demo**\nTo see DepthAnything v1 and 2 at work, visit the following pages: \u003ca href=\"https://depthanything.glitch.me/\"\u003eDepthAnything v1 demo\u003c/a\u003e, \u003ca href=\"https://depthanything.glitch.me/interactive-dynamic.html\"\u003eDepthAnything v2 demo\u003c/a\u003e, \u003ca href=\"https://depthanything.glitch.me/webgpu-example.html\"\u003eDepthAnything v2 webgpu (fastest) demo\u003c/a\u003e, \u003ca href=\"https://depthanything.glitch.me/webgpu-sliders.html\"\u003eDepthAnything v2 webgpu with Sliders demo\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakbartus%2Fdepthanything-on-browser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakbartus%2Fdepthanything-on-browser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakbartus%2Fdepthanything-on-browser/lists"}