From 3f3771dcf508808dcbd333863f1d80a3f44d394f Mon Sep 17 00:00:00 2001 From: Vedat Baday <54285744+badayvedat@users.noreply.github.com> Date: Fri, 13 Sep 2024 17:21:03 +0300 Subject: [PATCH 01/14] feat: add pyproject toml --- pyproject.toml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..bcaebe1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,25 @@ +[build-system] +requires = ["setuptools", "wheel", "setuptools_scm[toml]>=7"] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] +git_describe_command= 'git describe --tags --abbrev=0 --dirty --match "depth_anything_v2*"' +tag_regex = "^sane_controlnet_aux_v(?P.*)$" + +[project] +name = "depth-anything-v2" +dynamic = ["version"] +description = "Most capable monocular depth estimation (MDE) model." +readme = "README.md" +requires-python = ">=3.8" +dependencies = [ + "gradio_imageslider", + "gradio==4.29.0", + "matplotlib", + "opencv-python", + "torch", + "torchvision", +] + +[project.urls] +repository = "https://github.com/DepthAnything/Depth-Anything-V2" From ed2554b68d831e04993c47a07266f1cc9a3ad8ff Mon Sep 17 00:00:00 2001 From: Vedat Baday <54285744+badayvedat@users.noreply.github.com> Date: Fri, 13 Sep 2024 17:24:15 +0300 Subject: [PATCH 02/14] fix: packages to find --- pyproject.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bcaebe1..616c7d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,13 @@ build-backend = "setuptools.build_meta" [tool.setuptools_scm] git_describe_command= 'git describe --tags --abbrev=0 --dirty --match "depth_anything_v2*"' -tag_regex = "^sane_controlnet_aux_v(?P.*)$" +tag_regex = "^depth_anything_v2_v(?P.*)$" + +[tool.setuptools.packages.find] +where = ["."] # list of folders that contain the packages (["."] by default) +include = ["depth_anything_v2"] # package names should match these glob patterns (["*"] by default) +exclude = [] # exclude packages matching these glob patterns (empty by default) +namespaces = false # to disable scanning PEP 420 namespaces (true by default) [project] name = "depth-anything-v2" From 86ee9869bcdfd019608dd864cbbb08d5fe4869c4 Mon Sep 17 00:00:00 2001 From: badayvedat Date: Fri, 13 Sep 2024 17:41:24 +0300 Subject: [PATCH 03/14] fix: --- .gitignore | 176 ++++++++++++++++++++++++++++++++++ depth_anything_v2/__init__.py | 0 pyproject.toml | 6 +- 3 files changed, 178 insertions(+), 4 deletions(-) create mode 100644 .gitignore create mode 100644 depth_anything_v2/__init__.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8e1c0b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,176 @@ +# Initially taken from Github's Python gitignore file + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# tests and logs +tests/fixtures/cached_*_text.txt +logs/ +lightning_logs/ +lang_code_data/ +tests/outputs + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# vscode +.vs +.vscode + +# Pycharm +.idea + +# TF code +tensorflow_code + +# Models +proc_data + +# examples +runs +/runs_old +/wandb +/examples/runs +/examples/**/*.args +/examples/rag/sweep + +# data +/data +serialization_dir + +# emacs +*.*~ +debug.env + +# vim +.*.swp + +#ctags +tags + +# .lock +*.lock + +# DS_Store (MacOS) +.DS_Store +# RL pipelines may produce mp4 outputs +*.mp4 + +# dependencies +/transformers + +# ruff +.ruff_cache + +wandb + +ckpts/ diff --git a/depth_anything_v2/__init__.py b/depth_anything_v2/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml index 616c7d3..acd1fb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,10 +7,8 @@ git_describe_command= 'git describe --tags --abbrev=0 --dirty --match "depth_any tag_regex = "^depth_anything_v2_v(?P.*)$" [tool.setuptools.packages.find] -where = ["."] # list of folders that contain the packages (["."] by default) -include = ["depth_anything_v2"] # package names should match these glob patterns (["*"] by default) -exclude = [] # exclude packages matching these glob patterns (empty by default) -namespaces = false # to disable scanning PEP 420 namespaces (true by default) +where = ["depth_anything_v2"] +namespaces = false [project] name = "depth-anything-v2" From 72c557fea7a85835923e0c145ae4d91e453fb4fa Mon Sep 17 00:00:00 2001 From: badayvedat Date: Fri, 13 Sep 2024 17:51:27 +0300 Subject: [PATCH 04/14] chore: make version static --- pyproject.toml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index acd1fb5..6252a00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,18 +1,13 @@ [build-system] -requires = ["setuptools", "wheel", "setuptools_scm[toml]>=7"] +requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" -[tool.setuptools_scm] -git_describe_command= 'git describe --tags --abbrev=0 --dirty --match "depth_anything_v2*"' -tag_regex = "^depth_anything_v2_v(?P.*)$" - [tool.setuptools.packages.find] where = ["depth_anything_v2"] namespaces = false [project] name = "depth-anything-v2" -dynamic = ["version"] description = "Most capable monocular depth estimation (MDE) model." readme = "README.md" requires-python = ">=3.8" @@ -24,6 +19,7 @@ dependencies = [ "torch", "torchvision", ] +version = "1.0.0" [project.urls] repository = "https://github.com/DepthAnything/Depth-Anything-V2" From b94946dd25f75917de8b7536621cf9c2a1599d4e Mon Sep 17 00:00:00 2001 From: badayvedat Date: Fri, 13 Sep 2024 18:06:00 +0300 Subject: [PATCH 05/14] chore: update packages --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6252a00..9ee09fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,8 @@ requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] -where = ["depth_anything_v2"] +where = ["."] +include = ["depth_anything_v2"] namespaces = false [project] From bbb2be98fb2922c71ce64f4693acf4fa60c6ffae Mon Sep 17 00:00:00 2001 From: badayvedat Date: Fri, 13 Sep 2024 18:08:22 +0300 Subject: [PATCH 06/14] fix: --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9ee09fc..c6e2269 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] where = ["."] -include = ["depth_anything_v2"] +include = ["depth_anything_v2*"] namespaces = false [project] From c595ea642c03a3cce86d37f521fd82d8596d5aba Mon Sep 17 00:00:00 2001 From: badayvedat Date: Fri, 13 Sep 2024 18:10:29 +0300 Subject: [PATCH 07/14] fix: --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c6e2269..84d6cb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] where = ["."] -include = ["depth_anything_v2*"] +include = ["depth_anything_v2/**/*.py"] namespaces = false [project] From 42867fac835ef0499b26d62561f0355507cc6ee3 Mon Sep 17 00:00:00 2001 From: badayvedat Date: Fri, 13 Sep 2024 18:11:34 +0300 Subject: [PATCH 08/14] fix: anoter attempt --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 84d6cb2..1190d42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] where = ["."] -include = ["depth_anything_v2/**/*.py"] +include = ["depth_anything_v2/**"] namespaces = false [project] From 6f5edd856a31a51083f51eb4c8c1ba1bbb639102 Mon Sep 17 00:00:00 2001 From: badayvedat Date: Fri, 13 Sep 2024 18:14:10 +0300 Subject: [PATCH 09/14] fix: anoter attempt --- depth_anything_v2/util/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 depth_anything_v2/util/__init__.py diff --git a/depth_anything_v2/util/__init__.py b/depth_anything_v2/util/__init__.py new file mode 100644 index 0000000..e69de29 From 85ea9b91a628174a96dcd72de14e9cbe388d4847 Mon Sep 17 00:00:00 2001 From: badayvedat Date: Fri, 13 Sep 2024 18:15:45 +0300 Subject: [PATCH 10/14] fix: anoter attempt --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1190d42..9ee09fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] where = ["."] -include = ["depth_anything_v2/**"] +include = ["depth_anything_v2"] namespaces = false [project] From bce37234d208d13b34b0c3b7eab2d5ebf2800963 Mon Sep 17 00:00:00 2001 From: badayvedat Date: Fri, 13 Sep 2024 18:16:33 +0300 Subject: [PATCH 11/14] fix: anoter attempt --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9ee09fc..84d6cb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] where = ["."] -include = ["depth_anything_v2"] +include = ["depth_anything_v2/**/*.py"] namespaces = false [project] From 82cdb2c8b62ee42d24dee6cfe5773d377cdb57f5 Mon Sep 17 00:00:00 2001 From: badayvedat Date: Fri, 13 Sep 2024 18:20:42 +0300 Subject: [PATCH 12/14] fix: anoter attempt --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 84d6cb2..0fff876 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,9 +3,7 @@ requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] -where = ["."] -include = ["depth_anything_v2/**/*.py"] -namespaces = false +where = ["depth_anything_v2"] [project] name = "depth-anything-v2" From c01ff8929bab4b52070e8be0d90601507093b8f4 Mon Sep 17 00:00:00 2001 From: badayvedat Date: Fri, 13 Sep 2024 18:21:41 +0300 Subject: [PATCH 13/14] fix: another attempt --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0fff876..6ec4c81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] -where = ["depth_anything_v2"] +include = ["depth_anything_v2"] [project] name = "depth-anything-v2" From 2ca8cd3dd7dc8b0a7386126ad65e58c7fc44e925 Mon Sep 17 00:00:00 2001 From: badayvedat Date: Fri, 13 Sep 2024 18:39:49 +0300 Subject: [PATCH 14/14] fix: another attempt --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6ec4c81..be1211d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] -include = ["depth_anything_v2"] +include = ["depth_anything_v2*"] [project] name = "depth-anything-v2"