Insta360-Research commited on
Commit
0b5d732
Β·
verified Β·
1 Parent(s): c7a88d2

Upload 3 files

Browse files
Files changed (3) hide show
  1. LICENSE +21 -0
  2. README.md +287 -0
  3. requirements.txt +37 -0
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Insta360 Research Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md ADDED
@@ -0,0 +1,287 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h1 align="center">
2
+ UniSHARP:<br>
3
+ Universal Sharp Monocular View Synthesis
4
+ </h1>
5
+
6
+ <p align="center">
7
+ <b>Meixi Song</b><sup>1</sup> Β·
8
+ <b>Dizhe Zhang</b><sup>1,*</sup> Β·
9
+ <b>Hao Ren</b><sup>1</sup> Β·
10
+ <b>Ruiyang Zhang</b><sup>1</sup> Β·
11
+ <b>Bo Du</b><sup>2</sup> Β·
12
+ <b>Ming-Hsuan Yang</b><sup>3</sup> Β·
13
+ <b>Lu Qi</b><sup>1,2,*</sup>
14
+ <br>
15
+ <sup>1</sup>Insta360 Research Β· <sup>2</sup>Wuhan University Β· <sup>3</sup>University of California, Merced
16
+ </p>
17
+
18
+ <p align="center">
19
+ <img src="https://img.shields.io/badge/arXiv-coming_soon-red?logo=arxiv&logoColor=white" alt="arXiv">
20
+ <a href="https://insta360-research-team.github.io/Unisharp-website/"><img src="https://img.shields.io/badge/Project_Page-Website-green" alt="Project Page"></a>
21
+ <a href="https://huggingface.co/spaces/Insta360-Research/UniSHARP"><img src="https://img.shields.io/badge/HuggingFace-Demo-yellow" alt="Demo"></a>
22
+ <a href="https://huggingface.co/datasets/Insta360-Research/OmniRooms"><img src="https://img.shields.io/badge/HuggingFace-OmniRooms-orange" alt="Dataset"></a>
23
+ </p>
24
+
25
+ UniSHARP extends SHARP-style photorealistic monocular view synthesis to universal camera systems. Given a single image from a perspective, wide-FoV, fisheye, or panoramic camera, UniSHARP predicts a 3D Gaussian representation and renders high-quality novel views.
26
+
27
+ <p align="center">
28
+ <img src="assets/teaser.gif" alt="UniSHARP teaser" width="90%">
29
+ </p>
30
+
31
+ <p align="center">
32
+ <img src="assets/unisharp.png" alt="UniSHARP method" width="90%">
33
+ </p>
34
+
35
+ ## Installation
36
+
37
+ Clone this repository and enter the project directory:
38
+
39
+ ```bash
40
+ git clone https://github.com/Insta360-Research-Team/UniSHARP.git
41
+ cd Unisharp
42
+ ```
43
+
44
+ Create a fresh conda environment:
45
+
46
+ ```bash
47
+ conda create -n unisharp python=3.12 -y
48
+ conda activate unisharp
49
+ ```
50
+
51
+ Install PyTorch for your CUDA version. The code was smoke-tested with PyTorch 2.8 and torchvision 0.23:
52
+
53
+ ```bash
54
+ pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0
55
+ ```
56
+
57
+ Install the remaining Python dependencies:
58
+
59
+ ```bash
60
+ pip install -r requirements.txt
61
+ ```
62
+
63
+ ## External Dependencies
64
+
65
+ ### UniK3D
66
+
67
+ UniSHARP uses UniK3D for universal camera ray and feature prediction. Clone the official repository into `Unisharp/UniK3D`:
68
+
69
+ ```bash
70
+ git clone https://github.com/lpiccinelli-eth/UniK3D.git UniK3D
71
+ ```
72
+
73
+ ### 3DGEER
74
+
75
+ Fisheye rendering depends on the GEER CUDA rasterizer from 3DGEER. Clone the repository into `Unisharp/3dgeer`:
76
+
77
+ ```bash
78
+ git clone https://github.com/boschresearch/3dgeer.git 3dgeer
79
+ ```
80
+
81
+ If you only use perspective or panoramic inference, the GEER rasterizer may not be needed. It is required for fisheye rendering paths.
82
+
83
+ ## Dataset
84
+
85
+ The released dataset is hosted on Hugging Face:
86
+
87
+ - Dataset: [Insta360-Research/OmniRooms](https://huggingface.co/datasets/Insta360-Research/OmniRooms)
88
+ - Training manifests: [Insta360-Research/OmniRooms/manifests/train](https://huggingface.co/datasets/Insta360-Research/OmniRooms/tree/main/manifests/train)
89
+ - Validation manifests: [Insta360-Research/OmniRooms/manifests/validation](https://huggingface.co/datasets/Insta360-Research/OmniRooms/tree/main/manifests/validation)
90
+
91
+ **OmniRooms** is a panoramic simulation dataset highly suitable for 3D reconstruction, especially for 3DGS tasks. It consists of 16 large indoor scenes, each containing multiple rooms, and 300k RGB images covering both small and large pose movements with corresponding depth information. OmniRooms is collected via AirSim, with **OmniRooms-Wide** derived by projecting these panoramas into 130-degree equidistant fisheye views. For each anchor point on a 0.5 m voxel grid, one central camera and 29 randomly sampled cameras within a 0.3 m-radius sphere are rendered. To isolate translation-induced synthesis, all cameras share a fixed orientation. Each frame is rendered as a 1024 x 2048 ERP image.
92
+
93
+ <p align="center">
94
+ <img src="assets/dataset/AIUE5_vol8_03_2x2.jpg" width="24%" alt="OmniRooms scene AIUE5 vol8 03">
95
+ <img src="assets/dataset/AIUE5_vol8_04_2x2.jpg" width="24%" alt="OmniRooms scene AIUE5 vol8 04">
96
+ <img src="assets/dataset/AIUE5_vol8_05_2x2.jpg" width="24%" alt="OmniRooms scene AIUE5 vol8 05">
97
+ <img src="assets/dataset/AIUE_V01_001_2x2.jpg" width="24%" alt="OmniRooms scene AIUE V01 001">
98
+ <br>
99
+ <img src="assets/dataset/AIUE_V01_003_2x2.jpg" width="24%" alt="OmniRooms scene AIUE V01 003">
100
+ <img src="assets/dataset/AIUE_V01_004_2x2.jpg" width="24%" alt="OmniRooms scene AIUE V01 004">
101
+ <img src="assets/dataset/AIUE_V02_001_2x2.jpg" width="24%" alt="OmniRooms scene AIUE V02 001">
102
+ <img src="assets/dataset/AI_vol3_01_2x2.jpg" width="24%" alt="OmniRooms scene AI vol3 01">
103
+ <br>
104
+ <img src="assets/dataset/AI_vol3_02_2x2.jpg" width="24%" alt="OmniRooms scene AI vol3 02">
105
+ <img src="assets/dataset/AI_vol3_03_2x2.jpg" width="24%" alt="OmniRooms scene AI vol3 03">
106
+ <img src="assets/dataset/AI_vol3_04_2x2.jpg" width="24%" alt="OmniRooms scene AI vol3 04">
107
+ <img src="assets/dataset/AI_vol4_01_2x2.jpg" width="24%" alt="OmniRooms scene AI vol4 01">
108
+ <br>
109
+ <img src="assets/dataset/AI_vol4_02_2x2.jpg" width="24%" alt="OmniRooms scene AI vol4 02">
110
+ <img src="assets/dataset/AI_vol4_03_2x2.jpg" width="24%" alt="OmniRooms scene AI vol4 03">
111
+ <img src="assets/dataset/AI_vol4_04_2x2.jpg" width="24%" alt="OmniRooms scene AI vol4 04">
112
+ <img src="assets/dataset/AI_vol4_05_2x2.jpg" width="24%" alt="OmniRooms scene AI vol4 05">
113
+ </p>
114
+
115
+ The code supports the following data sources and manifest aliases:
116
+
117
+ - `RealEstate10K`
118
+ - `HM3D`
119
+ - `OmniRooms`
120
+ - `OmniRooms-Wide`
121
+ - `WildRGB-D`
122
+ - `DL3DV`
123
+ - `ScanNet++ Fisheye`
124
+ - `Replica`, and `Tanks and Temples` for validation-only protocols
125
+
126
+ Training manifests use the names released under `manifests/train`:
127
+
128
+ ```text
129
+ dataset_manifests/
130
+ β”œβ”€β”€ re10k_train_chunks.txt
131
+ β”œβ”€β”€ hm3d_train_scenes.txt
132
+ β”œβ”€β”€ omnirooms.txt
133
+ β”œβ”€β”€ wildrgbd_train_scenes.txt
134
+ β”œβ”€β”€ dl3dv_train_scenes.txt
135
+ └── scanetpp_fisheye_train_scenes.txt
136
+ ```
137
+
138
+ Validation manifests use the names released under `manifests/validation`:
139
+
140
+ ```text
141
+ validation_manifests/
142
+ β”œβ”€β”€ re10k.txt
143
+ β”œβ”€β”€ dl3dv.txt
144
+ β”œβ”€β”€ hm3d.txt
145
+ β”œβ”€β”€ omnirooms.txt
146
+ β”œβ”€β”€ omnirooms_wide.txt
147
+ β”œβ”€β”€ wildrgbd.txt
148
+ β”œβ”€β”€ scanetpp_fisheye.txt
149
+ β”œβ”€β”€ replica.txt
150
+ β”œβ”€β”€ tat.txt
151
+ ```
152
+
153
+ ## Checkpoints
154
+
155
+ Training starts UniSHARP heads from scratch and loads the original pretrained UniK3D weights through the UniK3D loader. The official launcher does not resume from a previous UniSHARP checkpoint by default.
156
+
157
+ Released UniSHARP checkpoints are available at [Insta360-Research/Unisharp](https://huggingface.co/Insta360-Research/Unisharp/tree/main). Place a checkpoint anywhere on disk and pass the path to validation or inference:
158
+
159
+ ```bash
160
+ CHECKPOINT=/path/to/step_XXXXXXX.pt
161
+ ```
162
+
163
+ ## Training
164
+
165
+ Use the official gt-override training launcher:
166
+
167
+ ```bash
168
+ bash scripts/train.sh
169
+ ```
170
+
171
+ Training outputs are saved under:
172
+
173
+ ```text
174
+ outputs/<run_name>/
175
+ β”œβ”€β”€ config.json
176
+ β”œβ”€β”€ losses.csv
177
+ β”œβ”€β”€ step_XXXXXXX.pt
178
+ └── vis/
179
+ ```
180
+
181
+ ## Validation
182
+
183
+ Run validation with a checkpoint:
184
+
185
+ ```bash
186
+ bash scripts/validate_unisharp.sh /path/to/step_XXXXXXX.pt
187
+ ```
188
+
189
+ ## Inference
190
+
191
+ Run single-image inference:
192
+
193
+ ```bash
194
+ python scripts/infer_unisharp.py \
195
+ --checkpoint /path/to/step_XXXXXXX.pt \
196
+ --image /path/to/image.jpg \
197
+ --out-dir outputs/inference
198
+ ```
199
+
200
+ Run a directory or image list:
201
+
202
+ ```bash
203
+ python scripts/infer_unisharp.py \
204
+ --checkpoint /path/to/step_XXXXXXX.pt \
205
+ --image-dir /path/to/images \
206
+ --out-dir outputs/inference
207
+ ```
208
+
209
+ If calibrated camera parameters are available, pass them through a JSON file. Without this file, the script predicts rays with UniK3D and fits the camera parameters automatically.
210
+
211
+ Example perspective camera JSON:
212
+
213
+ ```json
214
+ {
215
+ "camera": "perspective",
216
+ "intrinsics": {
217
+ "fx": 820.0,
218
+ "fy": 820.0,
219
+ "cx": 512.0,
220
+ "cy": 384.0
221
+ }
222
+ }
223
+ ```
224
+
225
+ ```bash
226
+ python scripts/infer_unisharp.py \
227
+ --checkpoint /path/to/step_XXXXXXX.pt \
228
+ --image /path/to/perspective.jpg \
229
+ --camera-json /path/to/perspective_camera.json
230
+ ```
231
+
232
+ Example Fisheye624 camera JSON:
233
+
234
+ ```json
235
+ {
236
+ "camera": "fisheye",
237
+ "camera_params": [820.0, 820.0, 512.0, 384.0, 0.01, -0.001, 0.0, 0.0]
238
+ }
239
+ ```
240
+
241
+ ```bash
242
+ python scripts/infer_unisharp.py \
243
+ --checkpoint /path/to/step_XXXXXXX.pt \
244
+ --image /path/to/fisheye.jpg \
245
+ --camera-json /path/to/fisheye_camera.json
246
+ ```
247
+
248
+ For batched inference, the JSON can also contain per-image entries:
249
+
250
+ ```json
251
+ {
252
+ "default": {
253
+ "camera": "perspective",
254
+ "intrinsics": [820.0, 820.0, 512.0, 384.0]
255
+ },
256
+ "images": {
257
+ "panorama.jpg": {
258
+ "camera": "panorama"
259
+ },
260
+ "fisheye.jpg": {
261
+ "camera": "fisheye",
262
+ "camera_params": [820.0, 820.0, 512.0, 384.0, 0.01, -0.001, 0.0, 0.0]
263
+ }
264
+ }
265
+ }
266
+ ```
267
+
268
+
269
+ ## Acknowledgement
270
+
271
+ This project builds on open-source work from:
272
+
273
+ - [SHARP](https://github.com/apple/ml-sharp) for monocular Gaussian view synthesis
274
+ - [UniK3D](https://github.com/lpiccinelli-eth/UniK3D) for universal camera geometry and features
275
+ - [3DGEER](https://github.com/boschresearch/3dgeer) for generic-camera Gaussian rasterization
276
+ - [gsplat](https://github.com/nerfstudio-project/gsplat) for Gaussian splatting utilities
277
+
278
+ ## Citation
279
+
280
+ ```bibtex
281
+ @article{song2026unisharp,
282
+ title={UniSHARP: Universal Sharp Monocular View Synthesis},
283
+ author={Song, Meixi and Zhang, Dizhe and Ren, Hao and Zhang, Ruiyang and Du, Bo and Yang, Ming-Hsuan and Qi, Lu},
284
+ journal={arXiv},
285
+ year={2026}
286
+ }
287
+ ```
requirements.txt ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ torch==2.8.0
2
+ torchvision==0.23.0
3
+ torchaudio==2.8.0
4
+ triton>=3.4.0
5
+
6
+ gsplat==1.5.3
7
+ ninja>=1.11.1
8
+
9
+ numpy>=2.0.0
10
+ scipy>=1.11.0
11
+ Pillow>=10.2.0
12
+ pillow-heif>=0.16.0
13
+ imageio>=2.34.0
14
+ imageio-ffmpeg>=0.5.1
15
+ matplotlib>=3.8.0
16
+ h5py>=3.10.0
17
+ opencv-python>=4.9.0
18
+ plyfile>=1.0.3
19
+
20
+ click>=8.1.7
21
+ tqdm>=4.66.0
22
+ requests>=2.31.0
23
+ PyYAML>=6.0.1
24
+ rich>=13.7.0
25
+
26
+ huggingface-hub>=0.22.0
27
+ timm>=1.0.0
28
+ safetensors>=0.4.2
29
+ einops>=0.7.0
30
+ protobuf>=4.25.3
31
+
32
+ lpips>=0.1.4
33
+ pandas>=2.2.0
34
+ tables>=3.9.0
35
+ tabulate>=0.9.0
36
+ termcolor>=2.4.0
37
+ trimesh>=4.3.0