updata readme
Browse files
README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
base_model:
|
| 6 |
+
- sd2-community/stable-diffusion-2-1
|
| 7 |
+
pipeline_tag: image-to-image
|
| 8 |
+
tags:
|
| 9 |
+
- material-decomposition
|
| 10 |
+
- diffusion
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Model Overview
|
| 14 |
+
|
| 15 |
+
This repository hosts the pretrained parameters for the SuperMat project, as described in *"SuperMat: Physically Consistent PBR Material Estimation at Interactive Rates"* (ICCV 2025)
|
| 16 |
+
|
| 17 |
+
| Model | Description |
|
| 18 |
+
| --- | --- |
|
| 19 |
+
| supermat.ckpt | Base SuperMat model for material decomposition
|
| 20 |
+
| supermat_mv.ckpt | Multi-view version of SuperMat processing six orthogonal views
|
| 21 |
+
| uv_refine_bc | UV refinement network for albedo materials
|
| 22 |
+
| uv_refine_rm | UV refinement network for roughness & metallic materials
|
| 23 |
+
|
| 24 |
+
All models are built upon the base model `stabilityai/stable-diffusion-2-1`.
|
| 25 |
+
Note: The official `stabilityai/stable-diffusion-2-1` model has been removed. You may need to obtain the base model parameters through alternative sources, such as `sd2-community/stable-diffusion-2-1`.
|
| 26 |
+
|
| 27 |
+
# Model Details
|
| 28 |
+
#### SuperMat (supermat.ckpt)
|
| 29 |
+
The core model for material decomposition. It takes RGBA images as input and decomposes materials from the target object.
|
| 30 |
+
#### SuperMat Multi-View (supermat_mv.ckpt)
|
| 31 |
+
An extended version that processes six orthogonal views simultaneously. This model leverages multi-view consistency for improved material estimation. For each view, the camera-to-world (c2w) matrix is provided as camera embeddings.
|
| 32 |
+
#### UV Refinement Networks
|
| 33 |
+
Two specialized networks for refining UV maps:
|
| 34 |
+
- uv_refine_bc: Refines the UV map for albedo materials
|
| 35 |
+
- uv_refine_rm: Refines the UV map for roughness & metallic materials
|
| 36 |
+
|
| 37 |
+
# Download & Usage
|
| 38 |
+
Download the desired model(s) from this repository and place them in the checkpoints folder:
|
| 39 |
+
|
| 40 |
+
```
|
| 41 |
+
checkpoints/
|
| 42 |
+
βββ supermat.pth
|
| 43 |
+
βββ supermat_mv.pth
|
| 44 |
+
βββ uv_refine_bc.pth
|
| 45 |
+
βββ uv_refine_rm.pth
|
| 46 |
+
```
|
| 47 |
+
The models are independent of each other, so you only need to download those required for your specific inference task.
|
| 48 |
+
|
| 49 |
+
# Input Requirements
|
| 50 |
+
#### Image Format
|
| 51 |
+
- SuperMat models expect RGBA images where only the target object appears as foreground, with alpha values set to `0` for all other regions
|
| 52 |
+
- During inference, the input image is alpha-composited with a gray background `(0.5, 0.5, 0.5)`
|
| 53 |
+
#### Resolution Preferences
|
| 54 |
+
- SuperMat models: `512Γ512` resolution (recommended)
|
| 55 |
+
- UV refinement networks: `1024Γ1024` resolution (recommended)
|
| 56 |
+
#### Multi-View Specific Requirements
|
| 57 |
+
For the multi-view model:
|
| 58 |
+
- All inputs for a single case should be organized in one folder
|
| 59 |
+
- Input images must follow the naming convention as shown in `examples/bag_rendered_6views`
|
| 60 |
+
- Camera information is stored in `meta.json` (refer to the example for the required format with c2w matrices)
|
| 61 |
+
|
| 62 |
+
# Quick Inference Examples
|
| 63 |
+
#### SuperMat Single-Image
|
| 64 |
+
```
|
| 65 |
+
python inference_supermat.py \
|
| 66 |
+
--input examples/ring_rendered_2views \
|
| 67 |
+
--output-dir outputs \
|
| 68 |
+
--checkpoint checkpoints/supermat.pth \
|
| 69 |
+
--base-model sd2-community/stable-diffusion-2-1 \
|
| 70 |
+
--device cuda:0 \
|
| 71 |
+
--image-size 512
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
#### SuperMat Multi-View
|
| 75 |
+
```
|
| 76 |
+
python inference_supermat_mv.py \
|
| 77 |
+
--input examples/bag_rendered_6views \
|
| 78 |
+
--output-dir outputs_mv \
|
| 79 |
+
--checkpoint checkpoints/supermat_mv.pth \
|
| 80 |
+
--base-model sd2-community/stable-diffusion-2-1 \
|
| 81 |
+
--device cuda:0 \
|
| 82 |
+
--image-size 512 \
|
| 83 |
+
--num_views 6 \
|
| 84 |
+
--use-camera-embeds
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
#### UV Refinement (Albedo)
|
| 88 |
+
```
|
| 89 |
+
python inference_uv_refine.py \
|
| 90 |
+
--input-uv examples/axe_uv/uv_bc.png \
|
| 91 |
+
--input-uv-position examples/axe_uv/uv_position.png \
|
| 92 |
+
--input-uv-mask examples/axe_uv/uv_mask.png \
|
| 93 |
+
--output-dir outputs_uv_bc \
|
| 94 |
+
--checkpoint checkpoints/uv_refine_bc.pth \
|
| 95 |
+
--base-model sd2-community/stable-diffusion-2-1 \
|
| 96 |
+
--device cuda:0 \
|
| 97 |
+
--image-size 1024
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
For complete usage instructions, please refer to the [main repository](https://github.com/hyj542682306/SuperMat).
|
| 101 |
+
|
| 102 |
+
# Citation
|
| 103 |
+
If you find these models useful in your research, please cite:
|
| 104 |
+
```
|
| 105 |
+
@inproceedings{hong2025supermat,
|
| 106 |
+
title={Supermat: Physically consistent pbr material estimation at interactive rates},
|
| 107 |
+
author={Hong, Yijia and Guo, Yuan-Chen and Yi, Ran and Chen, Yulong and Cao, Yan-Pei and Ma, Lizhuang},
|
| 108 |
+
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
|
| 109 |
+
pages={25083--25093},
|
| 110 |
+
year={2025}
|
| 111 |
+
}
|
| 112 |
+
```
|