Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,3 +1,46 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DenseMarks
|
| 2 |
+
|
| 3 |
+
A PyTorch implementation for dense UVW coordinate prediction from human head images using DINOv3 backbone with DPT head architecture.
|
| 4 |
+
|
| 5 |
+
## Overview
|
| 6 |
+
|
| 7 |
+
DenseMarks predicts per-pixel positions in canonical space (cube [0, 1]³) from human head images.
|
| 8 |
+
|
| 9 |
+
**Input**: RGB images of size 512×512 pixels
|
| 10 |
+
|
| 11 |
+
**Output**: UVW coordinates tensor (B, 3, 512, 512) with values in [0, 1]
|
| 12 |
+
|
| 13 |
+
## Prerequisites
|
| 14 |
+
|
| 15 |
+
- Python 3.8+
|
| 16 |
+
- PyTorch 1.12+
|
| 17 |
+
- CUDA (optional, for GPU acceleration)
|
| 18 |
+
|
| 19 |
+
## Installation
|
| 20 |
+
|
| 21 |
+
1. **Clone the repository:**
|
| 22 |
+
```bash
|
| 23 |
+
git clone https://github.com/yourusername/densemarks.git
|
| 24 |
+
cd densemarks
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
2. **Install DINOv3 submodule:**
|
| 28 |
+
```bash
|
| 29 |
+
git clone https://github.com/facebookresearch/dinov3 third_party_dinov3
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
3. **Modify DINOv3 for compatibility:**
|
| 33 |
+
```bash
|
| 34 |
+
sed -i '/dinov3\.hub\.segmentors/s/^/#/' third_party_dinov3/hubconf.py
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
4. **Install dependencies:**
|
| 38 |
+
```bash
|
| 39 |
+
pip install torch transformers numpy
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
5. **Download model weights from Hugging Face:**
|
| 43 |
+
```bash
|
| 44 |
+
# Download model_final.pth from Hugging Face Hub
|
| 45 |
+
# Place it in the repository root
|
| 46 |
+
```
|