Update README.md
Browse files
README.md
CHANGED
@@ -7,27 +7,74 @@ base_model:
|
|
7 |
tags:
|
8 |
- safetensors
|
9 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
# DepthPro-Safetensors
|
11 |
|
12 |
-
[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
-
|
15 |
|
16 |
-
|
17 |
-
- Memory Usage: 1815.78 MB
|
18 |
-
- Precisions: torch.float16
|
19 |
-
- Estimated FLOPs: 3,501,896,768
|
20 |
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
## Citation
|
24 |
|
25 |
```bibtex
|
26 |
@article{Bochkovskii2024:arxiv,
|
27 |
author = {Aleksei Bochkovskii and Ama\"{e}l Delaunoy and Hugo Germain and Marcel Santos and
|
28 |
-
Yichao Zhou and Stephan R. Richter and Vladlen Koltun}
|
29 |
title = {Depth Pro: Sharp Monocular Metric Depth in Less Than a Second},
|
30 |
journal = {arXiv},
|
31 |
year = {2024},
|
32 |
}
|
33 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
7 |
tags:
|
8 |
- safetensors
|
9 |
---
|
10 |
+
|
11 |
+
<img src="https://takara.ai/images/logo-24/TakaraAi.svg" width="200" alt="Takara.ai Logo" />
|
12 |
+
|
13 |
+
From the Frontier Research Team at **Takara.ai** we present **DepthPro-Safetensors**, a memory-efficient and optimized implementation of Apple's high-precision depth estimation model.
|
14 |
+
|
15 |
+
---
|
16 |
+
|
17 |
# DepthPro-Safetensors
|
18 |
|
19 |
+
This repository contains Apple's [DepthPro](https://huggingface.co/apple/DepthPro) depth estimation model converted to the SafeTensors format for improved memory efficiency, security, and faster loading times.
|
20 |
+
|
21 |
+
## Model Overview
|
22 |
+
|
23 |
+
DepthPro is a state-of-the-art monocular depth estimation model developed by Apple that produces sharp and accurate metric depth maps from a single image in less than a second. This converted version preserves all the capabilities of the original model while providing the benefits of the SafeTensors format.
|
24 |
+
|
25 |
+
## Technical Specifications
|
26 |
+
|
27 |
+
- **Total Parameters**: 951,991,330
|
28 |
+
- **Memory Usage**: 1815.78 MB
|
29 |
+
- **Precision**: torch.float16
|
30 |
+
- **Estimated FLOPs**: 3,501,896,768
|
31 |
|
32 |
+
_Details calculated with [TensorKIKO](https://github.com/takara-ai/TensorKiko)_
|
33 |
|
34 |
+
## Usage
|
|
|
|
|
|
|
35 |
|
36 |
+
```python
|
37 |
+
from transformers import AutoModelForDepthEstimation, AutoImageProcessor
|
38 |
+
import torch
|
39 |
+
from PIL import Image
|
40 |
+
|
41 |
+
# Load model and processor
|
42 |
+
model = AutoModelForDepthEstimation.from_pretrained("takara-ai/DepthPro-Safetensors")
|
43 |
+
processor = AutoImageProcessor.from_pretrained("takara-ai/DepthPro-Safetensors")
|
44 |
+
|
45 |
+
# Prepare image
|
46 |
+
image = Image.open("your_image.jpg")
|
47 |
+
inputs = processor(images=image, return_tensors="pt")
|
48 |
+
|
49 |
+
# Inference
|
50 |
+
with torch.no_grad():
|
51 |
+
outputs = model(**inputs)
|
52 |
+
predicted_depth = outputs.predicted_depth
|
53 |
+
|
54 |
+
# Post-process for visualization
|
55 |
+
depth_map = processor.post_process_depth_estimation(outputs, target_size=image.size[::-1])
|
56 |
+
```
|
57 |
+
|
58 |
+
## Benefits of SafeTensors Format
|
59 |
+
|
60 |
+
- **Improved Security**: Resistant to code execution vulnerabilities
|
61 |
+
- **Faster Loading Times**: Optimized memory mapping for quicker model initialization
|
62 |
+
- **Memory Efficiency**: Better handling of tensor storage for reduced memory footprint
|
63 |
+
- **Parallel Loading**: Support for efficient parallel tensor loading
|
64 |
|
65 |
## Citation
|
66 |
|
67 |
```bibtex
|
68 |
@article{Bochkovskii2024:arxiv,
|
69 |
author = {Aleksei Bochkovskii and Ama\"{e}l Delaunoy and Hugo Germain and Marcel Santos and
|
70 |
+
Yichao Zhou and Stephan R. Richter and Vladlen Koltun},
|
71 |
title = {Depth Pro: Sharp Monocular Metric Depth in Less Than a Second},
|
72 |
journal = {arXiv},
|
73 |
year = {2024},
|
74 |
}
|
75 |
+
```
|
76 |
+
|
77 |
+
---
|
78 |
+
For research inquiries and press, please reach out to [email protected]
|
79 |
+
|
80 |
+
> 人類を変革する
|