File size: 4,238 Bytes
5404f74
 
 
 
 
 
 
 
 
 
 
d46622d
 
 
 
 
 
 
 
 
5404f74
 
d46622d
5404f74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
license: cc-by-4.0
language:
- en
tags:
- camera-pose-estimation
- viewpoint_recommendation
pretty_name: ViewRecDB-100K
size_categories:
- 10K<n<100K

configs:
- config_name: default
  data_files:
  - split: train
    path: train/metadata.csv
  - split: validation
    path: val/metadata.csv
  - split: test
    path: test/metadata.csv
---


# ViewRecDB-100K

<div align="center">
  <img src="./docs/fig1.png" alt="fig1" width="95%">
</div>


## Dataset Summary

`ViewRecDB-100K` is a 3D viewpoint recommendation dataset for AI photography. It contains 100K training samples and 1K test samples. Each sample consists of a paired suboptimal and optimal image, along with the corresponding 3D viewpoint change annotation. Given a suboptimal image, the task is to predict the 3D viewpoint change toward the optimal image.

The dataset is automatically constructed from the `Unsplash Full Dataset`. The test samples form a dedicated benchmark, where each optimal image has been verified by experts to have better photographic composition than the corresponding suboptimal image.

## Dataset Structure

## Data Structure

The dataset is organized into `train`, `val`, and `test` splits. Each sample folder contains one optimal image and `1 or 2` generated suboptimal images with corresponding viewpoint change annotations.

```text
ViewRecDB-100K/
├── train/
│   └── photo_id/                # photo_id in Unsplash Full Dataset 
│       ├── original.jpeg        # optimal image
│       ├── generated_0.jpeg     # suboptimal image
│       ├── generated_0.json     # viewpoint change annotation
│       ├── generated_1.jpeg     # optional suboptimal image
│       └── generated_1.json     # optional viewpoint change annotation
├── val
└── test
```

### Data Instances

A sample from the training set is provided below:

<div align="center">
<table>
<tr>
<td align="center"><strong>Suboptimal Image</strong></td>
<td align="center"><strong>Optimal Image</strong></td>
<td align="center"><strong>Viewpoint Change</strong></td>
</tr>
<tr>
<td><img src="./docs/example1.jpeg" width="360"></td>
<td><img src="./docs/example2.jpeg" width="260"></td>
<td align="left">
<pre><code>{
  "change_orientation": true,
  "pose": [
    0.06223759800195694,
    -0.004903144668787718,
    -0.06147797778248787,
    -0.007686913013458252,
    -0.1884094774723053,
    -0.017775092273950577,
    0.981899619102478,
    0.4500928404485889,
    0.651864323785646
  ]
}</code></pre>
</td>
</tr>
</table>
</div>
### Data Fields 

Each data instance contains the following fields:

- `suboptimal_image` / `optimal_image`: The input suboptimal image. It is an RGB image with a total pixel budget of `1024 × 1024`.
- `viewpoint_change`: The 3D viewpoint change annotation from the suboptimal image to the optimal image.
  - `change_orientation`: A boolean value indicating whether the image orientation should be changed, i.e., switching between landscape and portrait.
  - `pose`: A 9-dimensional viewpoint descriptor:
    - `pose[0:3]`: translation vector.
    - `pose[3:7]`: rotation quaternion.
    - `pose[7:9]`: FoV scaling factor `s`, which denotes the FoV shrinking ratio, equivalent to the focal length scaling ratio.

## Uses

Due to the redistribution restrictions of the `Unsplash Full Dataset`, the `original.jpeg` files in `ViewRecDB-100K` are not directly included in this release. Users need to apply for and download the `Unsplash Full Dataset` from the [official source](https://unsplash.typeform.com/to/HPVbjo?typeform-source=unsplash.com).

- After obtaining the Unsplash metadata files, specify their path with `--csv_root` and set `--id_root` to the split directory where the original images should be downloaded.

  ```bash
  python -m script.download \
    --csv_root /path/to/unsplash_metadata \
    --id_root /path/to/ViewRecDB-100K/train | val | test \
    --csv_pattern "*.csv*"
  ```

  Arguments:

  - `--csv_root`: Path to the directory containing the Unsplash metadata files.
  - `--id_root`: Path to the dataset split directory, such as `train`, `val`, or `test`.
  - `--csv_pattern`: Filename pattern used to match the metadata files, such as `*.csv*` or `*.tsv*`.