File size: 3,350 Bytes
1067d95
 
e2b2e01
1067d95
e2b2e01
 
 
 
 
1067d95
 
 
 
 
 
 
 
 
 
 
 
 
e2b2e01
43d646d
1067d95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e2b2e01
 
 
 
 
 
 
de48372
 
 
1067d95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73612d8
1067d95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
[project]
name = "monopriors"
version = "0.1.1"
description = "Monocular Geometric Priors"
requires-python = ">=3.10.0"
classifiers = [
    "Development Status :: 3 - Alpha",
    "Programming Language :: Python",
]

dependencies = [
    "huggingface-hub",
    "opencv-python",
    "geffnet",
    "calibur == 0.0.1",
    "omnidata-tools",
    "open3d",
    "gradio-imageslider",
    "gradio",
    "gradio-rerun>= 0.0.3",
    "hf-transfer",
    "mmcv-lite",
    "mini-dust3r",
    "rerun-sdk==0.16.1"

]

[tool.setuptools.packages.find]
include = ["monopriors*"]

[tool.pixi.project]
channels = [
    "nvidia/label/cuda-11.8.0",
    "nvidia",
    "xformers",
    "conda-forge",
    "pytorch",
]
platforms = ["linux-64"]

[tool.pixi.system-requirements]
libc = { family = "glibc", version = "2.31" }

[tool.pixi.activation]
scripts = [".pixi.sh"]

[tool.pixi.tasks]
_install-wheel = "python -m pip install $WHL_PATH --force-reinstall"
_delete-wheel = "rm -rf dist"
_build-wheel = { cmd = "python -m pip install build && python -m build", depends_on = [
    "_delete-wheel",
] }
_upload-wheel = { cmd = "python -m pip install twine && python -m twine upload -r testpypi dist/*", depends_on = [
    "_build-wheel",
] }
upload-hf = { cmd = "python tools/upload_to_hf.py", depends_on = [
    "_build-wheel",
] }

[tool.pixi.tasks.download-example]
cmd = """
    test -e data/example-room-scan-poly.zip
    || (
        huggingface-cli download pablovela5620/sample-polycam-room \
        example-room-scan-poly.zip --repo-type dataset \
        --local-dir data/
    )
    """
outputs = ["data/example-room-scan-poly.zip"]
description = "Downloads an example polycam dataset from huggingface"

[tool.pixi.tasks.polycam-inference]
cmd = """
    python tools/inference_polycam.py \
    --zip-path data/example-room-scan-poly.zip
    """
depends_on = ["download-example"]
description = "Runs inference on polycam dataset on downloaded example, this will predict depths+normals"

[tool.pixi.tasks.app]
cmd = """
    python tools/gradio_app.py
    """
description = "Runs Gradio frontend for depth comparison"

[tool.pixi.feature.spaces.tasks.app]
cmd = """
    PYTORCH_JIT=0 python gradio_app.py
    """
description = "Runs Gradio frontend for depth comparison"
depends_on = ["_install-wheel"]

[tool.pixi.dependencies]
python = "3.10.*"
pip = "24.*"
cuda = { version = "*", channel = "nvidia/label/cuda-11.8.0" }
pytorch-cuda = { version = "11.8.*", channel = "pytorch" }
pytorch = { version = "2.3.*", channel = "pytorch" }
torchvision = { version = "0.18.*", channel = "pytorch" }
icecream = ">=2.1.3,<2.2"
jaxtyping = ">=0.2.28,<0.3"
einops = ">=0.8.0,<0.9"
matplotlib = ">=3.8.3,<3.9"
wandb = ">=0.16.5,<0.17"
scipy = ">=1.12.0,<1.13"
timm = ">=0.9.16,<0.10"
pandas = ">=2.2.2,<2.3"
pyarrow = ">=15.0.2,<15.1"
pytorch-lightning = ">=2.2.2,<2.3"
xformers = ">=0.0.26.post1,<0.0.27"
jupyterlab = ">=4.2.0,<4.3"
rerun-sdk = ">=0.16.1,<0.17"
numpy = "<2.0.0"
beartype = ">=0.18.5,<0.19"
transformers = ">=4.42.3,<4.43"

[tool.pixi.pypi-dependencies]
monopriors = { path = ".", editable = true }

[tool.pixi.feature.spaces.pypi-dependencies]
spaces = "*"


[tool.pixi.environments]
spaces = { features = ["spaces"], solve-group = "default" }

[tool.ruff]
ignore = [
    "F722", # Forward annotation false positive from jaxtyping. Should be caught by pyright.
]