Sipirius commited on
Commit
d37ec95
verified
1 Parent(s): 4af03d2

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +73 -3
README.md CHANGED
@@ -1,3 +1,73 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+ <h2>PrimeDepth: Efficient Monocular Depth Estimation with a Stable Diffusion Preimage</h2>
3
+
4
+ [**Denis Zavadski**](https://scholar.google.com/citations?user=S7mDg00AAAAJ)<sup>\*</sup>&emsp;路&emsp;[**Damjan Kal拧an**](https://scholar.google.com/citations?user=6NAxnFUAAAAJ)<sup>\*</sup>&emsp;路&emsp;[**Carsten Rother**](https://scholar.google.com/citations?user=N_YNMIMAAAAJ)
5
+
6
+ Computer Vision and Learning Lab,<br/>
7
+ IWR, Heidelberg University
8
+
9
+ <sup>*</sup>equal contribution
10
+
11
+ <strong>ACCV 2024</strong>
12
+
13
+ <a href='https://vislearn.github.io/PrimeDepth/'><img src='https://img.shields.io/badge/Project_Page-PrimeDepth-green' alt='Project Page'></a>
14
+ <a href="https://arxiv.org/abs/2409.09144"><img src='https://img.shields.io/badge/arXiv-PDF-red' alt='Paper PDF'></a> <a href="https://github.com/vislearn/PrimeDepth"><img src='https://img.shields.io/badge/Github-Code-blue' alt='Github Code'></a>
15
+
16
+ PrimeDepth is a diffusion-based monocular depth estimator which leverages the rich representation of the visual world stored within Stable Diffusion. The representation, termed <q>preimage</q>, is extracted in a single diffusion step from frozen Stable Diffusion 2.1 and adjusted towards depth prediction. PrimeDepth yields detailed predictions while simulatenously being fast at inference time due to the single-step approach.
17
+
18
+ </div>
19
+
20
+ ![teaser](images/teaser.png)
21
+
22
+ ## Introduction
23
+ These are the weights for the inference codebase for [PrimeDepth](https://arxiv.org/abs/2409.09144) based on <a href="https://github.com/Stability-AI/stablediffusion">Stable Diffusion 2.1</a>. Further details and visual examples can be found on the [project page](https://vislearn.github.io/PrimeDepth/).
24
+
25
+ ## Installation
26
+
27
+ 1. Create and activate a virtual environment:
28
+ ```
29
+ conda create -n PrimeDepth python=3.9
30
+ conda activate PrimeDepth
31
+ ```
32
+
33
+ 2. Install dependencies:
34
+ ```
35
+ pip3 install -r requirements.txt
36
+ ```
37
+
38
+ 3. Download the [weights](https://huggingface.co/CVL-Heidelberg/PrimeDepth)
39
+
40
+ 4. Adjust the attribute `ckpt_path` in `configs/inference.yaml` to point to the downloaded weights from the previous step
41
+
42
+ ## Usage
43
+
44
+ ```
45
+ from scripts.utils import InferenceEngine
46
+
47
+
48
+ config_path = "./configs/inference.yaml"
49
+ image_path = "./goodBoy.png"
50
+
51
+ ie = InferenceEngine(pd_config_path=config_path, device="cuda")
52
+
53
+ depth_ssi, depth_color = ie.predict(image_path)
54
+ ```
55
+
56
+ PrimeDepth predicts in inverse space. The raw model predictions are stored in `depth_ssi`, while a colorized prediction `depth_color` is precomputed for visualization convenience:
57
+
58
+ ```
59
+ depth_color.save("goodBoy_primedepth.png")
60
+ ```
61
+
62
+ ## Citation
63
+ ```bibtex
64
+ @misc{zavadski2024primedepth,
65
+ title={PrimeDepth: Efficient Monocular Depth Estimation with a Stable Diffusion Preimage},
66
+ author={Denis Zavadski and Damjan Kal拧an and Carsten Rother},
67
+ year={2024},
68
+ eprint={2409.09144},
69
+ archivePrefix={arXiv},
70
+ primaryClass={cs.CV},
71
+ url={https://arxiv.org/abs/2409.09144},
72
+ }
73
+ ```