Commit ·
efb6b3c
1
Parent(s): 5c188cb
Mirror official DFormer weights (DFormer-L, NYUv2) (#1)
Browse files- Mirror official DFormer weights (DFormer-L, NYUv2) (5e9b905b19a2cabe4ce846e4c9ffecb2fb7ffde7)
- NYUv2_DFormer_Large.pth +3 -0
- README.md +82 -0
- config.json +16 -0
- model.safetensors +3 -0
- pretrained/DFormer_Large.pth.tar +3 -0
NYUv2_DFormer_Large.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f52badfbc4283d7908cc07edd1a4190198b9cc9b1ddc14a5a0585af96c083301
|
| 3 |
+
size 468796715
|
README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: pytorch
|
| 4 |
+
pipeline_tag: image-segmentation
|
| 5 |
+
tags:
|
| 6 |
+
- rgb-d
|
| 7 |
+
- semantic-segmentation
|
| 8 |
+
- indoor-scene-understanding
|
| 9 |
+
- dformer
|
| 10 |
+
- nyuv2
|
| 11 |
+
- community-mirror
|
| 12 |
+
datasets:
|
| 13 |
+
- dronefreak/NYUv2
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# DFormer-L trained on NYUv2
|
| 17 |
+
|
| 18 |
+
> **Unofficial mirror** of the official DFormer weights from [VCIP-RGBD/DFormer](https://github.com/VCIP-RGBD/DFormer). The weights are **unchanged**; this repository adds a weights-only `model.safetensors` copy and a `config.json`.
|
| 19 |
+
|
| 20 |
+
## Model
|
| 21 |
+
|
| 22 |
+
- **Architecture:** DFormer: DFormer-L
|
| 23 |
+
- **Task:** RGB-D semantic segmentation
|
| 24 |
+
- **Trained on:** [NYUv2](https://huggingface.co/datasets/dronefreak/NYUv2) (mirror on the Hub)
|
| 25 |
+
- **Parameters:** 39.0M
|
| 26 |
+
- **Paper:** [DFormer: Rethinking RGBD Representation Learning for Semantic Segmentation](https://arxiv.org/abs/2309.09668) (ICLR 2024)
|
| 27 |
+
- **Code:** https://github.com/VCIP-RGBD/DFormer
|
| 28 |
+
- **License:** MIT (from the official repository)
|
| 29 |
+
|
| 30 |
+
RGB-D pretrained encoder (ImageNet-1K with depth) plus a lightweight decoder head. The encoder used for initialisation is included under `pretrained/` (its `.pth.tar` stores training args, so load it with `weights_only=False`).
|
| 31 |
+
|
| 32 |
+
## Results (reported by the authors)
|
| 33 |
+
|
| 34 |
+
| Metric | Value |
|
| 35 |
+
|---|---|
|
| 36 |
+
| mIoU (NYUv2, single-scale) | 57.2 |
|
| 37 |
+
|
| 38 |
+
See the [official repository](https://github.com/VCIP-RGBD/DFormer) for full tables and evaluation details.
|
| 39 |
+
|
| 40 |
+
## Files
|
| 41 |
+
|
| 42 |
+
| File | Content |
|
| 43 |
+
|---|---|
|
| 44 |
+
| `NYUv2_DFormer_Large.pth` | original checkpoint, exactly as released |
|
| 45 |
+
| `model.safetensors` | the model weights only (bit-exact copy of the checkpoint's `model` tensors; no optimizer state) |
|
| 46 |
+
| `config.json` | architecture, dataset, results and provenance |
|
| 47 |
+
| `pretrained/DFormer_Large.pth.tar` | DFormer-L encoder, RGB-D pretrained on ImageNet-1K |
|
| 48 |
+
|
| 49 |
+
## Usage
|
| 50 |
+
|
| 51 |
+
```python
|
| 52 |
+
import json
|
| 53 |
+
from huggingface_hub import hf_hub_download
|
| 54 |
+
|
| 55 |
+
repo = "dronefreak/dformer-large-nyuv2"
|
| 56 |
+
config = json.load(open(hf_hub_download(repo, "config.json")))
|
| 57 |
+
ckpt = hf_hub_download(repo, "NYUv2_DFormer_Large.pth") # original format: use it with the official code
|
| 58 |
+
print(config["architecture"], config["dataset"], ckpt)
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
Build the network with the official code (https://github.com/VCIP-RGBD/DFormer) using the matching config for this variant, then load
|
| 62 |
+
`NYUv2_DFormer_Large.pth` exactly as you would the original download, or load `model.safetensors` with
|
| 63 |
+
`safetensors.torch.load_file` into the same model.
|
| 64 |
+
|
| 65 |
+
## Citation
|
| 66 |
+
|
| 67 |
+
If you use these weights, please cite the original work:
|
| 68 |
+
|
| 69 |
+
```bibtex
|
| 70 |
+
@inproceedings{yin2024dformer,
|
| 71 |
+
title = {DFormer: Rethinking RGBD Representation Learning for Semantic Segmentation},
|
| 72 |
+
author = {Yin, Bowen and Zhang, Xuying and Li, Zhong-Yu and Liu, Li and Cheng, Ming-Ming and Hou, Qibin},
|
| 73 |
+
booktitle = {ICLR},
|
| 74 |
+
year = {2024}
|
| 75 |
+
}
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
## Disclaimer
|
| 79 |
+
|
| 80 |
+
This is not an official release. All credit goes to the original authors (Bowen Yin, Xuying Zhang, Zhong-Yu Li, Li Liu, Ming-Ming Cheng, Qibin Hou; Nankai University (VCIP)). The weights are
|
| 81 |
+
redistributed under the MIT license of the official repository. If you are an author and want this mirror changed or
|
| 82 |
+
removed, please open a discussion.
|
config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architecture": "DFormer",
|
| 3 |
+
"variant": "DFormer-L",
|
| 4 |
+
"task": "RGB-D semantic segmentation",
|
| 5 |
+
"dataset": "NYUv2",
|
| 6 |
+
"num_classes": 40,
|
| 7 |
+
"checkpoint": "NYUv2_DFormer_Large.pth",
|
| 8 |
+
"weights_key": "model",
|
| 9 |
+
"official_repository": "https://github.com/VCIP-RGBD/DFormer",
|
| 10 |
+
"source": "Google Drive folder 1P5HwnAvifEI6xiTAx6id24FUCt_i7GH8",
|
| 11 |
+
"license": "mit",
|
| 12 |
+
"reported_results": {
|
| 13 |
+
"mIoU (NYUv2, single-scale)": 57.2
|
| 14 |
+
},
|
| 15 |
+
"paper": "https://arxiv.org/abs/2309.09668"
|
| 16 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:74a9ab6fe329fd53d5a5b2de99c0c24c74e1837a42a7e13879630fa6756a5e9a
|
| 3 |
+
size 156260656
|
pretrained/DFormer_Large.pth.tar
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a26a2b6e9d7ad80502d8ae22272ef9d44c164a77aea0cfdcf6ba6522d0618785
|
| 3 |
+
size 475847043
|