mirror of
https://github.com/huchenlei/Depth-Anything.git
synced 2026-01-26 15:29:46 +00:00
Update README.md
This commit is contained in:
43
README.md
43
README.md
@@ -61,11 +61,19 @@ We highlight the **best** and *second best* results in **bold** and *italic* res
|
||||
|
||||
We provide three models of varying scales for robust relative depth estimation:
|
||||
|
||||
- Depth-Anything-ViT-Small (24.8M)
|
||||
<!-- - Depth-Anything-ViT-Small (24.8M)
|
||||
|
||||
- Depth-Anything-ViT-Base (97.5M)
|
||||
|
||||
- Depth-Anything-ViT-Large (335.3M)
|
||||
- Depth-Anything-ViT-Large (335.3M) -->
|
||||
|
||||
| Model | Params | Inference Time on V100 (ms) | A100 | RTX4090 (TensorRT, see [here](https://github.com/spacewalk01/depth-anything-tensorrt)) |
|
||||
|:-|-:|:-:|:-:|:-:|
|
||||
| Depth-Anything-ViT-Small | 24.8M | 12 | 8 | 3 |
|
||||
| Depth-Anything-ViT-Base | 97.5M | 13 | 9 | 6 |
|
||||
| Depth-Anything-ViT-Large | 335.3M | 20 | 13 | 12 |
|
||||
|
||||
Note that the V100 and A100 inference time (*without TensorRT*) is computed by excluding the pre-processing and post-processing stages, whereas the last column RTX4090 (*with TensorRT*) is computed by including these two stages. See [here]() for details.
|
||||
|
||||
You can easily load our pre-trained models by:
|
||||
```python
|
||||
@@ -75,6 +83,24 @@ encoder = 'vits' # can also be 'vitb' or 'vitl'
|
||||
depth_anything = DepthAnything.from_pretrained('LiheYoung/depth_anything_{:}14'.format(encoder))
|
||||
```
|
||||
|
||||
### No network connection, cannot load these models?
|
||||
|
||||
<details>
|
||||
<summary>Click here to see solutions</summary>
|
||||
|
||||
- First, please manually download our models (both config and checkpoints files) from here: [depth-anything-small](https://huggingface.co/LiheYoung/depth_anything_vits14), [depth-anything-base](https://huggingface.co/LiheYoung/depth_anything_vitb14), and [depth-anything-large](https://huggingface.co/LiheYoung/depth_anything_vitl14).
|
||||
|
||||
- Second, upload the folder which contains config and checkpoint files to your remote server.
|
||||
|
||||
- Lastly, load the model locally by:
|
||||
```python
|
||||
# suppose the config and checkpoint files are stored under the folder checkpoints/depth_anything_vitb14
|
||||
depth_anything = DepthAnything.from_pretrained('checkpoints/depth_anything_vitb14', local_files_only=True)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### Installation
|
||||
@@ -94,7 +120,7 @@ For the ``img-path``, you can either 1) point it to an image directory storing a
|
||||
|
||||
For example:
|
||||
```bash
|
||||
python run.py --encoder vitl --img-path demo_images --outdir depth_visualization
|
||||
python run.py --encoder vitl --img-path assets/examples --outdir depth_visualization
|
||||
```
|
||||
|
||||
|
||||
@@ -148,6 +174,17 @@ depth = depth_anything(image)
|
||||
```
|
||||
</details>
|
||||
|
||||
## Community Support
|
||||
|
||||
**We sincerely appreciate all the extentions built on our Depth Anything from the community. Thank you a lot!**
|
||||
|
||||
Here we list the extensions we have found:
|
||||
- Depth Anything ONNX: https://github.com/fabio-sim/Depth-Anything-ONNX
|
||||
- Depth Anything TensorRT: https://github.com/spacewalk01/depth-anything-tensorrt
|
||||
- Depth Anything in ControlNet WebUI: https://github.com/Mikubill/sd-webui-controlnet
|
||||
- Depth Anything in X-AnyLabeling: https://github.com/CVHub520/X-AnyLabeling
|
||||
|
||||
If you have your amazing projects supporting or improving (*e.g.*, speed) Depth Anything, please feel free to drop an issue. We will add them here.
|
||||
|
||||
## Citation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user