---
title: "StyleSDF — paper by Or-El et al. (2022) — summary and ideas"
description: "StyleSDF learns from single photographs to generate high-resolution images of the same subject from different views, together with a 3D surface."
canonical: "https://research.elamur.ai/free/en/papers/el-2022-stylesdf-high-resolution-3d-consistent/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/el-2022-stylesdf-high-resolution-3d-consistent/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2022](https://md.research.elamur.ai/free/en/papers/2022/) / StyleSDF: High-Resolution 3D-Consistent Image and Geometry Generation

# StyleSDF: High-Resolution 3D-Consistent Image and Geometry Generation

Paper · 2022 · Roy Or-El, Xuan Luo, Mengyi Shan et al.

**Authors:** Roy Or-El, [Xuan Luo](https://md.research.elamur.ai/free/en/authors/xuan-luo/), Mengyi Shan, [Eli Shechtman](https://md.research.elamur.ai/free/en/authors/eli-shechtman/), Jeong Joon Park and Ira Kemelmacher-Shlizerman · **Year:** 2022 · **Venue:** IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings · **Licence:** [CC BY-NC-ND 4.0 (arXiv)](https://creativecommons.org/licenses/by-nc-nd/4.0/)

[**245** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W4312703683) · Cited by **7** papers in our library of more than 163,000 papers whose bibliographies we read · [IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings](https://openalex.org/S4210176548) · [licence](https://creativecommons.org/licenses/by-nc-nd/4.0/)

- [PDF](https://arxiv.org/pdf/2112.11427)
- [DOI 10.1109/cvpr52688.2022.01314](https://doi.org/10.1109/cvpr52688.2022.01314)
- [arXiv 2112.11427](https://arxiv.org/abs/2112.11427)
- [OpenAlex](https://openalex.org/W4312703683)

Citations: OpenAlex, 2026-10-14.

## Summary

A generated portrait can look convincing head-on and lose the person’s identity as soon as the camera moves. To produce several views of the same subject, an image generator needs some way to keep the features it draws attached to a common shape. StyleSDF tackles that problem using collections of ordinary color photographs. The training collection gives it individual views, without paired photographs of the same subject from different angles or measured surfaces. Its aim is to generate a new subject whose appearance carries across viewpoints and whose underlying shape can also be inspected.

StyleSDF first creates a three-dimensional description of the subject. A neural network assigns each point in space a signed distance that indicates how far the point lies from the surface and on which side. The locations where that distance is zero define the surface. The same network supplies color and learned visual features. A renderer gathers those signals along camera rays to produce a 64×64 feature map, and a generator adapted from StyleGAN2 turns the map into a detailed color image. This division makes it possible to generate images at 1024×1024 while keeping the expensive search along rays on a much smaller grid. The underlying representation can also produce depth maps and meshes.

The authors evaluate the method on FFHQ human portraits and AFHQ animal photographs. At the common image evaluation resolution of 256 × 256, StyleSDF records a Fréchet Inception Distance of 11.5 on FFHQ and 12.8 on AFHQ, the lowest values among the systems compared in the paper’s main image evaluation. The authors also hold a generated subject fixed and compare the depth maps from frontal and side views. On FFHQ, the average discrepancy under their modified Chamfer measure is 0.40 for StyleSDF and 11.04 for PiGAN. On AFHQ, the corresponding values are 0.63 and 8.66. Color reprojection tests give further evidence that major visible features stay in place as the camera moves.

The experiments show that image quality and geometric agreement can improve together even when training uses only individual photographs. The agreement is strongest for major structures and identity. Fine details such as fur, hair, and teeth can flicker or shift, and a bright reflection can leave an indentation in the generated surface. The experiments establish consistency between views of generated subjects. The shape that would have been measured for a real subject is outside the task.

## Deep dive: StyleSDF: High-Resolution 3D-Consistent Image and Geometry Generation

StyleSDF learns from single photographs to generate high-resolution images of the same subject from different views, together with a 3D surface. · about 38 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### A convincing photograph and a convincing change of view

If a system generates a convincing portrait, what should happen when asked for a view from the side? The visible outline will change, one ear may disappear, and a different part of the cheek will come into view. These changes should still describe the same person. A camera control is therefore meaningful only if moving it changes what is visible while preserving the subject whose image is being drawn. StyleSDF addresses that requirement alongside the familiar demand for a convincing individual image.

The StyleGAN family supplied the authors with an example of how much detail a generator could put into a still image. Its ordinary output was a single RGB view, with red, green, and blue values at each pixel. Researchers had also found ways to move through a generator’s latent space, the space of internal codes that select what it produces. Such moves could yield realistic edits. The paper describes several routes to more specific control, including learned directions in that space, constraints derived from examples, and methods informed by inverse graphics. Approaches that offered greater control over pose could depend on an external face-shape prior or on reconstructing a surface in advance. A latent edit and a camera movement have different requirements. For the latter, the system needs a stable account of where the subject’s features are in space.

The training setup makes that account hard to learn. If the same subject is photographed from multiple known positions, each photograph constrains what the others say about its shape. A surface that explains a frontal silhouette might fail to explain the profile. A collection of single photographs of different subjects takes away that direct check. It still contains information about what subjects tend to look like from different angles, but using it means learning regularities over the collection. A generated face can therefore have plausible images even if the explanation that connects them in three dimensions is poor.

StyleSDF belongs to a line of work that uses [generative adversarial networks](https://md.research.elamur.ai/free/en/papers/goodfellow-2014-generative-adversarial-nets/) to learn from such collections. A generator produces images and a discriminator learns to judge whether images come from the collection or from the generator. To extend this setup to controlled viewpoints, the generator makes images from sampled camera positions. Each image supplies feedback about plausibility from its sampled position. The central engineering question is what structure to put inside the generator so that this feedback also leads to a coherent underlying subject.

#### What coordinate-based rendering contributed

The paper describes earlier neural representations that use a spatial location as an input to a network. An ordinary image stores values at specified positions on a grid. A coordinate-based network supplies a value when queried at a location, including locations between previously sampled points. Depending on the task, the value may describe occupancy, distance from a surface, color, or some other local property. This gives a renderer a way to ask a single three-dimensional representation what lies along different lines of sight. The same principle had been used for objects, local parts, and full scenes in work that used explicit geometry or multiple images for supervision.

NeRF provided an example of how to compose such queries into a photograph. Its representation supplied density and radiance. Density governs how strongly a point contributes to obscuring what lies behind it. Radiance gives the color that a point contributes towards a particular viewing direction. Several evaluations of this field along a ray can be combined into the color seen by a camera pixel. Because the combination is differentiable, a change in a pixel can be traced back to the field values that produced it. The earlier NeRF work discussed by the authors used this property to fit a particular scene from multiple images. In generative work, the same rendering principle could be used for a field that changes with the sampled subject.

SIREN contributed a way to build the coordinate network itself. Its layers use sine functions as activations. An activation is the operation that follows the weighted combination of incoming values and allows a network to express more than a succession of linear transformations. In the rendition used by StyleSDF, the generated subject can alter the frequency and phase of those sine functions. This lets the network share its weights across subjects while varying how it responds to the same point in space.

#### Where earlier generators placed the burden

GRAF and PiGAN were especially close to StyleSDF’s starting point. They used implicit radiance fields for generation under single-view supervision and relied on density as a proxy for geometry. A renderer can combine color and density successfully even when the resulting field gives no unambiguous surface. A ray might accumulate its color across several locations, for example. An image discriminator can reward the resulting color without knowing which depth the ray should have been assigned. As the camera moves, the network can then explain the same visual feature using different parts of the volume. A dense set of coordinate queries gives the system a shared space in which to describe the subject, while the choice of what those queries represent determines how strongly that space constrains shape.

The authors describe related attempts to improve geometry within this family. ShadeGAN added guidance from shading. GOF narrowed the region sampled along each ray as training progressed. The paper gives 128×128 as the image resolution for these approaches when discussing the cost of rendering. That cost is fundamental to the design problem. Each new image pixel needs its own set of spatial queries, and adversarial feedback requires a complete image for the discriminator. Increasing the number of pixels increases the work done before the discriminator sees anything.

GIRAFFE distributed that work between a volume renderer and an image-space network. Its renderer produced a 16×16 map of features, and a convolutional network turned that map into images at 256 × 256. The idea is to render a compact description of the view in space and draw the finer detail on an image grid. The authors identify a difficulty with this arrangement. If the projected map gives the second network too little information, it has room to change hair, expression, or identity as the viewpoint changes. They suggest that the resolution of the rendered features may help explain those changes. The paper also discusses concurrent attempts to reach higher resolution through divided rendering or selective sampling. It distinguishes its own goal by requiring both a useful surface and a high-resolution picture of that surface from the chosen view.

These lines of work made the problem concrete. A surface representation would have to remain compatible with differentiable volume rendering. A high-resolution generator would have to receive sufficient information about which subject the renderer had drawn and how the camera saw it. And the training objectives would have to impose geometric structure even though the real photographs provided no corresponding surfaces. StyleSDF makes a separate design choice for each requirement, then tests whether the resulting choices work together.

### The method, step by step

#### Choosing a subject and a camera

The system begins by drawing a latent vector from a unit normal distribution. This vector supplies the variation that lets the network produce different subjects. It also draws two camera angles from distributions chosen for the training collection. Azimuth controls the camera’s horizontal position around the subject and elevation controls its vertical angle. The camera lies on a unit sphere and looks towards the origin. These choices give the generator a common scene coordinate system and keep the input that selects a subject separate from the input that selects its view.

The distinction is easiest to see by imagining several images generated with a single latent vector. The spatial description is queried from a new camera position each time. Along a ray through the projected cheek, for example, the renderer samples a series of points at increasing distances from the camera. For each point, the network supplies its relation to the surface, its possible contribution to color, and a set of learned features. The renderer combines the values from the points into a pixel of a small image and a pixel of a feature map. The larger image generator takes the feature map and draws the final view. If the output needed is a mesh, the surface can instead be extracted directly from the signed distances.

From a sampled subject to an image and surface The steps in order.

The camera is described by the ray equation below. The notation distinguishes the direction used to march a ray through space from the direction supplied to the appearance network when they are handled differently at inference.

```
r(t) = o + t v
```

Here `r(t)` is the point on the ray at distance parameter `t`, `o` is the camera origin, and `v` is the direction of the ray. The multiplication by `t` scales that direction, and addition to `o` places the sample in the scene. The camera specifies a ray for each pixel to be rendered. The appearance network also accepts a viewing direction, which the authors can hold fixed while still moving the camera and tracing the appropriate rays.

#### Giving the scene a definite boundary

The shape network represents a signed distance field, abbreviated SDF. For a queried point `x` and a subject code `z`, its answer `d(x, z)` gives the signed distance to the boundary. The sign convention uses positive values outside and negative values inside. A zero value marks the surface. Thus the representation answers two related questions with one value. It locates the boundary, and it provides information about how the volume is arranged near that boundary. In discussing the equations for a single scene, the paper leaves `z` implicit.

An SDF value is a distance, while the renderer needs a density. StyleSDF uses the distance to produce a density with a sigmoid, a function that smoothly approaches a low or high value on opposite sides of its transition. The paper treats the object as solid for this conversion. The sign of distance then determines which side contributes substantial density.

```
σ(x) = Kα(d(x)) = (1/α) · Sigmoid(−d(x)/α)
```

In this equation `x` is the queried point and `d(x)` is its signed distance. The symbol `σ(x)` denotes the resulting density. `Kα` names the transformation from distance to density when its learned parameter is `α`. `Sigmoid` denotes the sigmoid function. The minus sign reverses the signed distance before the sigmoid is applied, while division by `α` governs how quickly the function changes near the boundary. The prefactor `1/α` scales the resulting density.

A point well outside has a positive distance with a large magnitude relative to `α`. After the sign reversal, the sigmoid receives a negative argument and contributes little density. Well inside, the sign reversal sends the argument in the other direction and the density approaches its interior value. When `α` approaches zero, the transition is sharp. A larger value softens the transition and lets the object affect a ray over a wider neighborhood of its boundary. The sigmoid therefore supplies a smooth quantity that the renderer can use during optimization, while the distance field still defines where a mesh should go.

The authors obtain a mesh with Marching Cubes. This algorithm looks across a sampled grid for places where the distance changes sign and builds surface triangles at the zero level. Volume-rendered depth is another way to inspect the shape. It summarizes where a ray is expected to terminate under the density field. The mesh and the depth image answer related questions from the same spatial representation. The mesh describes the boundary throughout the sampled volume. The depth image describes what a specified camera encounters along its visible rays.

#### Accumulating information along a ray

A point contributes visibly to a camera ray when the density at that point is substantial and enough light from it can pass through the preceding part of the ray. The renderer holds these conditions together using transmittance. At the beginning of a ray’s integration interval, nothing sampled in that interval has yet blocked the camera. Further along, the accumulated density can make the contribution from a new sample small, even if the sample itself is dense.

```
T(t) = exp(−∫[tₙ to t] σ(r(s)) ds)
```

`T(t)` is the transmittance up to distance `t`, `tₙ` is the near end of the integration interval, and `s` is the integration variable running from that endpoint to `t`. The notation `r(s)` refers to the point on the ray at `s`. `σ(r(s))` gives the density there, and `ds` indicates integration with respect to the distance variable. The function `exp` applies the exponential to the negative accumulated density. The negative sign makes transmittance fall as more density is encountered.

The color of a rendered pixel is the accumulated contribution from the ray. The same weighting can be used to gather features. This makes the projected features sensitive to the location of material and to what the camera can see through the foreground.

```
C(r) = ∫[tₙ to tբ] T(t) σ(r(t)) c(r(t), v) dt
```

`C(r)` denotes the resulting RGB color for ray `r`. The symbols `tₙ` and `tբ` stand for the near and far limits of the ray interval, respectively. `t` is distance along the ray, `T(t)` is the transmittance up to that distance, and `σ(r(t))` is the density at the current location. The function `c` gives the location’s color for viewing direction `v`, and `dt` indicates integration along the ray. Multiplying transmittance, density, and color weights the local color by its visibility and its chance of contributing at that position.

```
F(r) = ∫[tₙ to tբ] T(t) σ(r(t)) f(r(t), v) dt
```

`F(r)` is the projected feature vector for ray `r`. The symbol `f` denotes the features returned by the network at `r(t)` for direction `v`. The integration limits `tₙ` and `tբ`, distance variable `t`, transmittance `T(t)`, density `σ(r(t))`, and integration element `dt` have the same roles as in the color equation. The integral operates on each element of the feature vector. The network supplies a 256 element vector, so the resulting pixel carries a learned description of the visible content in addition to the color predicted by the separate color output.

Putting these integrals together over the pixel grid gives a 64 × 64 RGB image and a feature map on the same grid. The RGB image allows a discriminator to judge the volume renderer from the first stage of training. The feature map is the input for the high-resolution stage. Both signals come through the same density and transmittance weights, so a change in the learned shape can change both what the first discriminator sees and what information ultimately reaches the image generator.

#### Deciding where to sample

The integrals describe an ideal continuous calculation. The renderer approximates them by querying a finite set of points. StyleSDF divides the near-to-far interval into equal bins, then draws a single random offset for the samples on the ray. Each sample occupies the same relative position in its bin. The paper contrasts this with stratified sampling that can vary the position independently within each bin. Independent positions make distances between neighboring samples vary, even when the bins themselves have the same width.

```
δ ∼ U[0, (tբ − tₙ)/N]
```

`δ` is the shared offset for the samples along the ray. The symbol `∼` means that it is drawn from the stated distribution, and `U` denotes a uniform distribution. The interval starts at `0` and ends at the width of one bin, obtained by dividing the difference between the far limit `tբ` and near limit `tₙ` by the number of bins `N`.

```
qᵢ = ((tբ − tₙ)/N) · i + δ,   i ∈ {0, …, N − 1}
```

In this restatement of the sampling expression, `qᵢ` names the offset of sample `i` within the near-to-far interval. Its position along the ray is measured from the near end. The index `i` ranges from `0` to `N − 1`, where `N` is the number of bins and samples. The symbol `∈` means belongs to, and the braces describe the allowed index values. The difference `tբ − tₙ` is the interval length and `δ` is the same random offset for every index on that ray. Moving from one index to the next therefore moves by one bin width.

The method also dispenses with hierarchical sampling. A hierarchical scheme uses a preliminary pass to decide where to concentrate additional queries, typically near material likely to contribute to the ray. The paper reports a reduction of 50% in the number of samples from dropping that second sampling stage. The SDF supplies a direct indication of where the surface lies, and the authors find that they can use the simplified procedure while retaining usable geometry. Their samples still span the prescribed near-to-far interval. Following the SDF boundary explicitly to concentrate queries there is a separate proposal they discuss for future work.

#### Sharing spatial computations between shape and appearance

The volume network follows much of PiGAN’s design. A 3 layer mapping network uses LeakyReLU activations to transform the sampled code `z` into an intermediate code `w`. A LeakyReLU allows a reduced response for negative inputs, so its outputs can still convey information about those inputs. The intermediate code provides frequency and phase controls for the sine activations in the volume network. This makes it possible for the same spatial coordinate to have different geometric and visual meaning for different sampled subjects.

```
φᵢ(u) = sin(γᵢ(Wᵢ · u + bᵢ) + βᵢ),   i ∈ {0, …, 7}
```

`φᵢ` is the operation at shared layer `i`, with indices running from `0` through `7`. The symbol `u` denotes that layer’s input, beginning with the spatial coordinate and then taking the preceding layer’s output. `Wᵢ` is a weight matrix, `·` denotes its multiplication by `u`, and `bᵢ` is the bias vector. The subject-dependent signal `γᵢ` modulates the frequency of the sine activation, while `βᵢ` shifts its phase. `sin` applies the sine function to the resulting argument. The subject code enters these layers through the modulation signals.

After the shared layers, one branch produces a signed distance through a fully connected output layer. The viewing direction enters the other branch. There the network takes the shared spatial representation together with the direction and transforms them in an additional modulated sine layer. The result is the feature vector. A final fully connected layer turns those features into the local color. The paper’s composition notation can be unpacked by writing the density, feature, and color expressions separately.

```
σ(x) = (Kα ∘ φ_d ∘ φ₇ ∘ … ∘ φ₀)(x)
```

Here `x` is the spatial coordinate, and `φ₀` through `φ₇` are the shared layers. The ellipsis covers the intervening shared layers. The composition symbol `∘` means the operations are applied from right to left. `φ_d` is the distance output layer and `Kα` converts its distance into the rendering density `σ(x)` using parameter `α`.

```
f(x, v) = φ_f((φ₇ ∘ … ∘ φ₀)(x), v)
```

`f(x, v)` is the feature vector at position `x` for viewing direction `v`. The composed layers `φ₀` through `φ₇` supply the shared spatial representation, with the ellipsis again standing for the intervening layers. The layer `φ_f` is the additional modulated sine layer. Its inputs are formed by concatenating the shared representation with `v`. The subject remains implicit through the layer controls.

```
c(x, v) = φ_c(f(x, v))
```

`c(x, v)` is the color at position `x` for direction `v`. The symbol `f(x, v)` denotes the feature vector from the preceding equation, and `φ_c` is the fully connected color output layer. In this branch, changing `v` can change the features and the color. The distance branch has no corresponding direction input, which gives each subject a boundary defined independently of the camera.

The authors make a distinction between the treatment of direction during training and at inference. They report that training without view-dependent color failed to converge. Yet allowing color to vary with direction at inference can reproduce correlations in the training data. The example in the paper is smiling. In FFHQ, smiles are more common among people who face the camera. A generator that learns this association can change a subject’s apparent expression when asked for another direction, even while the distance field stays fixed. StyleSDF therefore trains with direction-dependent appearance and uses the frontal viewing direction for appearance queries at inference. The selected camera still moves, tracing a new set of rays through space. The compromise preserves parts of what direction-dependent training makes possible at the cost of some physically meaningful changes in appearance with the viewpoint.

#### Training the volume renderer

The authors initialize the volume network by fitting a sphere. They sample spatial points, evaluate their signed distances to a sphere of fixed radius centered at the origin, and train the network to predict these distances for 10k iterations. This gives it an initial surface with the intended inside and outside. The sphere supplies a generic starting shape. The subsequent images supply the training signal that distinguishes the shapes of the generated subjects from one another.

During the first main stage, the discriminator judges the 64×64 images drawn directly by the renderer. The adversarial objective uses the non-saturating GAN loss with R1 regularization. The discriminator has the architecture used for PiGAN and an additional role in supervising camera alignment. It estimates the azimuth and elevation used to generate an image. Because sampled camera parameters are available for generated images, the discriminator’s predictions can be compared with those inputs. The authors have no ground-truth camera labels for the real photos, so this part of the discriminator’s objective is applied on generated examples.

```
L_view = { (θ̂ − θ)²   if |θ̂ − θ| ≤ 1
         { |θ̂ − θ|   otherwise
```

`L_view` is the pose loss shown for elevation. `θ` is the sampled elevation and `θ̂` is the elevation predicted by the discriminator. The bars denote absolute value and the superscript `²` denotes squaring. For an absolute discrepancy at or below `1` the loss is quadratic. Beyond that point it rises linearly with the absolute discrepancy. The same rule is applied to azimuth, using the sampled angle `φ` and its prediction `φ̂`. The pose loss also acts on the generator, encouraging it to produce views that convey the specified angles. This gives the generated subjects a shared meaning for the camera controls.

A second source of supervision comes from what a distance field should look like locally. Where distance is differentiable, moving in the direction in which it increases fastest should change the distance at unit rate. A network that outputs signs correctly but varies the numerical scale of distance over space could respond quite differently to the renderer’s density conversion. The Eikonal term penalizes deviations from the expected gradient magnitude.

```
L_eik = Eₓ[(‖∇d(x)‖₂ − 1)²]
```

`L_eik` denotes the Eikonal loss, and `Eₓ` denotes the expectation over sampled locations `x`. The operator `∇` takes the spatial gradient of the signed distance `d(x)`. The notation `‖·‖₂` is the Euclidean norm of that gradient. The subtraction measures its departure from `1`, and squaring gives a non-negative penalty for deviations on either side of that target. The term constrains how the network changes its distance values around a point. It gives the training process a way to favor the behavior of a distance field without supplying a target distance from a real image.

A third term discourages surfaces that the image objective has little reason to remove. A near-zero value can mark a small stray surface or a part of the volume that the camera rarely reveals. A loss that increases near zero raises the cost of such regions.

```
L_surf = Eₓ[exp(−100|d(x)|)]
```

`L_surf` is the minimal surface loss. As above, `Eₓ` averages over sampled locations `x`, and `d(x)` is the signed distance. The bars remove the sign so the loss treats small distances on either side of the boundary alike. `exp` is the exponential function, and `100` controls how quickly the penalty decays as the distance magnitude increases. The penalty is strongest near zero, where a sample could contribute to a new piece of surface. The term favors an economical boundary through sampled distances. The ablation examines its effect on generated surfaces empirically.

```
L_vol = L_adv + λ_view L_view + λ_eik L_eik + λ_surf L_surf
```

`L_vol` is the overall objective for the volume-rendering stage. `L_adv` denotes the adversarial objective associated with R1 regularization. `L_view` is the camera alignment term, `L_eik` is the gradient-norm term, and `L_surf` penalizes near-zero distances. The `λ` symbols are weights for their respective terms. The authors set `λ_view` to 15, `λ_eik` to 0.1, and `λ_surf` to 0.05. The R1 weight is chosen separately for each dataset.

These objectives address different ways in which the first stage can go wrong. The discriminator supplies an image-based demand for realism. The camera term asks the generator to use its viewpoint input recognizably across subjects. The gradient and surface penalties act in space and constrain what kinds of fields produce the images. A generated image can satisfy the discriminator while the depth field is poor, so the spatial terms matter even if a reader is interested chiefly in the appearance of the final result.

#### Bringing the feature map to high resolution

The authors estimate that rendering a 1024×1024 image entirely by volume queries would require over 10⁷ queries for one image. The expense applies during training because the discriminator needs a full image. The small projected map is the point where StyleSDF changes how it spends computation. It uses spatial sampling to decide what the camera sees, then uses image-space convolution to add detail on finer grids.

To make this handoff, the authors remove the early layers of the StyleGAN2 generator and feed its later layers the renderer’s 64×64 features. The StyleGAN2 mapping network is shortened from eight layers to five. It takes the intermediate code `w` from the renderer’s mapping network as its input, so both parts of the generator receive style information derived through a common transformation. The StyleGAN2 discriminator keeps its original architecture. The roles of the projected features and the intermediate code are complementary. The projected map changes with the camera and conveys visible structure from that position. The code conveys the style of the selected subject to the layers that turn that structure into a detailed image.

The second stage begins with the volume renderer’s weights frozen. The high-resolution generator learns with a non-saturating adversarial loss, R1 regularization, and path regularization, following the original StyleGAN2 setup. Path regularization controls how the image changes in response to movements in the style representation. The second stage does not impose a reconstruction loss matching its output to the small RGB render. The authors rely on the projected features, shared style information, and convolutional architecture to retain important subject structures. That choice allows the high-resolution generator to add image details and sometimes repair an unconvincing background signal from the first stage. It also means the shape field learned in the first stage receives no corrective signal from the high-resolution discriminator.

#### Settings for the two image collections

For FFHQ, the R1 weight is 10 and the training camera has a field of view of 12°. Azimuth and elevation come from zero-mean normal distributions with standard deviations of 0.3 and 0.15, respectively. The near and far bounds are [0.88, 1.12], and the renderer uses 24 points per ray during training. The authors train the volume renderer for 200k iterations and the high-resolution stage for 300k iterations. These settings specify the coverage and granularity of the rays during training. The depth evaluation later uses its own sampling setup.

For AFHQ, the authors combine the training images from the animal classes into one training set. They use an R1 weight of 50, and both camera angles have zero-mean Gaussian distributions with standard deviation 0.15. The field of view is 12°. The near and far bounds and ray sample count match the FFHQ setup. The training duration is 200k iterations for the volume renderer and 200k iterations for the styled generator.

The volume-rendering stage uses a batch size of 24 and the [Adam optimizer](https://md.research.elamur.ai/free/en/papers/kingma-2014-adam-method-stochastic-optimization/), with a learning rate of 2 · 10⁻⁵ for the generator and 2 · 10⁻⁴ for its discriminator. Its Adam settings are β₁ = 0 and β₂ = 0.9. The β settings govern the moving estimates used in optimization. The authors accumulate gradients across forward passes to fit the batch into memory, and use an exponential moving average of the learned weights at inference. In the styled stage, the batch size is 32 and Adam uses a learning rate of 0.002, β₁ = 0, and β₂ = 0.99. That stage also uses StyleGAN2’s equalized learning rate, lazy application of R1 and path regularization, and an exponential moving average. The stated training setup illustrates the resources behind the split. The volume stage took approximately 3.5 days in the configuration described with 2 NVIDIA A6000 GPUs, and the styled stage was trained on 8 NVIDIA TeslaV100 GPUs for 7 days.

### Experiments and results

#### What the image collections test

FFHQ contains 70,000 face images at 1024 × 1024. Its photographs are centered and aligned according to the preparation procedure cited by the authors. AFHQ contains 15,630 images at 512 × 512, covering cats, dogs, and wild animals. The animal photographs are unaligned and span different species. They give the generator a different challenge from portraits. The network has to represent a wider range of facial structures and textures while learning from photographs whose subjects have less uniform framing. Neither collection supplies the matched calibrated views that would ordinarily let a reconstruction procedure check a particular subject’s shape.

The main comparisons involve HoloGAN, GRAF, PiGAN, and GIRAFFE. The authors train the baselines following their own pipelines for 256 × 256 output, with an exception in PiGAN’s training resolution. PiGAN is trained with 128 × 128 images and renders at 256 × 256 at inference. The image metrics are evaluated at 256 × 256 for each dataset. This is the scale of the quantitative comparison even though the paper separately demonstrates larger StyleSDF output. Geometry comparisons use the methods that expose suitable spatial outputs for the particular check.

#### Image quality and diversity

The paper uses Fréchet Inception Distance, abbreviated FID, and Kernel Inception Distance, abbreviated KID. Both compare generated samples with real images through features extracted from the images. They are distribution-level measurements. A generator has to represent the variety of the reference collection as well as make plausible individual samples. A lower distance indicates closer agreement on the metric. A camera sweep, in contrast, asks how one generated subject changes under a particular intervention. The distinction matters because a good score across a collection can be achieved without keeping any particular subject stable across views.

Generator comparison on FFHQ by FID StyleSDF has the lowest FID among the systems in the comparison.

**The numbers**

| System or setting | FID |
| --- | --- |
| HoloGAN | 90.9 |
| GRAF | 79.2 |
| PiGAN | 83.0 |
| GIRAFFE | 31.2 |
| StyleSDF (this paper) | 11.5 |

On FFHQ, GIRAFFE gives the closest scores to StyleSDF among the listed baselines. Its KID is 20.1 on the paper’s reported scale, compared with 2.65 for StyleSDF. The other FFHQ KID results are 75.5 for HoloGAN, 55.0 for GRAF, and 85.8 for PiGAN. The paper displays KID multiplied by 1000, so these values belong to that reporting convention. Both metrics put the same system first on the face-image comparison, even though the ordering of some of the other systems varies with the metric.

Generator comparison on AFHQ by FID StyleSDF leads the AFHQ comparison, with GIRAFFE the closest baseline.

**The numbers**

| System or setting | FID |
| --- | --- |
| HoloGAN | 95.6 |
| GRAF | 129.5 |
| PiGAN | 52.4 |
| GIRAFFE | 33.5 |
| StyleSDF (this paper) | 12.8 |

For AFHQ, StyleSDF’s KID is 4.47 and GIRAFFE’s is 15.1 on the same reported scale. PiGAN records 30.7, HoloGAN 77.5, and GRAF 85.1. The main table therefore favors StyleSDF on both metrics in the portrait and animal settings. The authors also describe their image results as comparable to those reported for the concurrent StyleNeRF and CIPS-3D approaches. That observation draws on reported scores, while the four baselines in the table are the systems used for the paper’s direct comparison.

#### Inspecting what happens when the camera moves

In the qualitative comparison, the authors render a fixed latent identity from 4 camera viewpoints. This makes it possible to follow such features as the shape of the face or the arrangement of the hair through a change in camera angle. They also show a mesh for StyleSDF, PiGAN, and GRAF. PiGAN and GRAF use learned opacity fields for this visualization, while StyleSDF can extract the zero set of its signed distance field. The comparison for HoloGAN and GIRAFFE is limited to rendered images because their pipelines in this comparison do not yield meshes.

The example views show different kinds of failure. The authors describe lower image quality for HoloGAN and GRAF, visible artifacts in the PiGAN surfaces, and identity changes in some of the GIRAFFE views. These observations refer to the examples shown. A subject may look convincing in one image and still expose an inconsistency when a corresponding feature can be followed across other images. Conversely, a prominent problem in a mesh may be concealed by color when viewed from one of the sampled cameras.

A separate visual comparison follows the same subject from the volume-rendered RGB image to the high-resolution output. The low-resolution image is shown alongside the full view and its depth. The broad structures and identity carry across the two RGB renderings in the examples. The jaguar and cheetah examples also show the second stage correcting some poorly rendered background information. This illustrates both the value and the freedom of the image stage. The projected features can preserve the central subject while the image network changes what is drawn around it.

The authors also vary inputs beyond the more typical training views. Though training uses a fixed field of view, they show examples with the field of view increased or decreased by 25%. They also show camera angles at 1.5 standard deviations of the training distribution. These examples demonstrate that the system can render plausible images under the illustrated changes. They are a visual check of particular departures from the training setup. The paper’s accompanying sequences make it possible to watch the movement continuously and inspect corresponding RGB and depth videos for the same generated identities.

#### Measuring whether depth from different views agrees

A depth map assigns a distance to the content visible along each ray. To compare two maps, the authors place their depth samples in the common three-dimensional coordinate system and look for the closest match from one set of points to the other. The depth experiment uses 1,000 sampled identities per dataset and renders a frontal view and a fixed side view for each identity. Each depth map is 128 × 128. For this test depth is the expected termination distance obtained with 128 uniformly sampled points along each ray. Rays whose accumulated opacity falls below 0.5 are discarded because they have little evidence of a termination. The side view is placed at 1.5× the standard deviation of the training azimuth distribution.

A change of camera can expose surfaces that were invisible from the previous view. It can also change the part of the background visible near a subject. A raw average of nearest-point distances would give large errors in these regions considerable influence, including where the views have no meaningful counterpart. The paper uses a modified Chamfer distance that takes medians in the two matching directions. The normalization by the volume sampling bin size puts the discrepancies on the scale of the steps along a ray.

```
CD(S₁, S₂) = med[x ∈ S₁] min[y ∈ S₂] ‖x − y‖₂² + med[y ∈ S₂] min[x ∈ S₁] ‖x − y‖₂²
```

`CD` denotes the modified Chamfer distance between the depth point sets `S₁` and `S₂`. The point `x` belongs to `S₁` and `y` belongs to `S₂`, as indicated by `∈`. The vector `x − y` is their spatial displacement, and `‖·‖₂²` is its squared Euclidean length. In the first term, `min` finds the closest point of `S₂` for each point of `S₁`, and `med` takes the median over those nearest distances. The second term exchanges the directions of matching. The plus sign adds the two medians. A lower result indicates better typical agreement between the depth point sets under this definition.

Frontal and side depth agreement on FFHQ and AFHQ StyleSDF has a lower depth discrepancy than PiGAN on each dataset.

**The numbers**

| System or setting | Modified Chamfer distance |
| --- | --- |
| FFHQ PiGAN | 11.04 |
| FFHQ StyleSDF (this paper) | 0.40 |
| AFHQ PiGAN | 8.66 |
| AFHQ StyleSDF | 0.63 |

These are averages of the pairwise measure over the sampled identities. The visualizations help explain what gives rise to the scores. The authors color frontal depth samples by their nearest distance to the side-view points. For StyleSDF, the larger discrepancies tend to occur around occlusions and the background. PiGAN shows discrepancies and noise on more of the subject, including an implausibly concave region around a dog’s nose. The authors also overlay the frontal and side point clouds with different colors so that alignment can be judged directly, and show meshes from steep viewing angles. Together these views connect an aggregate error to recognizable features of the surfaces.

#### Checking color with depth reprojection

Depth provides a way to test appearance as well. If the side-view depth puts a visible feature at the right place in space, projecting that point into the frontal camera should carry its side-view color to the corresponding location in the frontal image. The experiment therefore asks whether the generated colors and depths tell a compatible story. A mismatch can occur because the depth maps move a point to the wrong location, because the two views assign it different colors, or because the point is hidden in one view. How the evaluation handles the last case depends on the experiment.

For the numeric comparison of RGB volume renders, the authors use 1,000 random identities per dataset. They render RGB and depth at 256×256, with a side-view angle of 0.45 radians on FFHQ and 0.225 radians on AFHQ. These are the angles chosen using 1.5× the training azimuth standard deviation. They project side-view pixels into the frontal camera and keep occluded pixels in the comparison. The error for a pixel is the mean absolute difference across its RGB channels on the 0 - 255 scale. The median over pixels dampens the effect of large occlusion errors. The reported figure averages these medians over the generated identities. To match PiGAN’s FFHQ preparation, the authors apply the same transformation to their result before computing the error, resizing to 320 × 320 and center-cropping to 256 × 256.

On FFHQ the averaged color error is 2.9 for StyleSDF’s volume renderer and 14.7 for PiGAN. On AFHQ it is 2.6 for StyleSDF’s volume renderer and 16.5 for PiGAN. In the accompanying pictures, StyleSDF’s largest errors often cluster near occlusion boundaries. PiGAN’s mismatches also affect eyes, mouths, highlights, and fur within the visible subject. This test extends the depth comparison by requiring projected features to land on compatible colors. Its numerical results pertain to the RGB output produced by volume rendering, before the styled image generator.

For the final high-resolution images, the authors present reprojection visualizations. They vary azimuth and elevation, warp side views into a frontal view using the corresponding depth maps, and display pixels that pass occlusion testing. They also average the surviving reprojections across views and compare that average with the frontal rendering. The reprojected views preserve identity and major structures. Differences remain on hair, ears, eyes, and other regions with fine texture or geometry, as well as around occlusion boundaries. An average across views makes the stable structures easier to inspect while smoothing some individual discrepancies. The individual error maps and the mean image consequently answer different questions about the high-resolution output.

### What the ablations show

#### Removing the penalty on near-surface samples

The first dedicated ablation takes away the minimal surface loss. The paper shows low-resolution RGB and depth from renderers trained with and without that term. It also views depth-derived surfaces from the front and side. The latter views matter because something that looks like a plausible highlight in a frontal image may prove to be a bump or indentation when the surface is turned. The comparison makes visible an error that an adversarial image objective can leave unresolved.

With the loss in place, the shown surfaces are smoother and have fewer implausible structures. The authors also find less evidence of a reflection being represented as a deformation of shape. A patch of brighter color can come from the appearance of a surface or from changing how a rendered ray meets that surface. With isolated photos, the training process has few direct observations that tell it which explanation is correct. By charging for samples close to a surface, the loss makes adding or distorting pieces of boundary less attractive. It still allows a transition between positive and negative distance wherever the learned shape requires it.

This experiment tests the role of one objective inside the volume-rendering stage. Its evidence is visual and shows the kinds of structures the loss suppresses in the examples. The comparative depth and image scores for the complete system measure the outcome of several design choices together. The ablation gives a more specific view of what happens to shape when the penalty is absent, without giving a separate numerical contribution for that change.

#### Starting with a sphere

The other dedicated ablation removes sphere initialization. The authors report that the optimizer can settle on a concave shape for content that should bulge outward. The views in the comparison include depth renderings inspected from the side, where this problem becomes apparent. In the examples, fitting a sphere before adversarial training helps the renderer reach shapes with the expected orientation.

The paper explains the failure as an ambiguity between concave and convex interpretations. A mirrored interpretation of a surface can yield plausible images when rendered with the opposite azimuth. With no paired observations of real subjects and their camera angles, the discriminator has little basis for recognizing this reversal from image plausibility alone. A generator can consequently find a way to render believable images while producing an anatomically wrong surface. An initially convex sphere puts the optimization on one side of that ambiguity. The subsequent optimization can deform it as it learns the image collection.

The result identifies a difference between the initialization and the surface penalty. The penalty acts throughout training and changes the cost of representing a boundary. Initialization changes where the search starts. A smooth surface can still have the wrong curvature or face the wrong way. The sphere experiment shows the consequence of that kind of early error, while the loss experiment shows what happens when smaller surface structures are too easy for the training objective to accept. The remaining eye artifacts reported elsewhere in the paper also put the result in perspective. A prior that helps with the overall orientation can leave local curvature unresolved.

#### Keeping the distance between samples constant

The authors separately compare the meshes obtained using their equally spaced samples with those obtained using stratified sampling. Their example meshes show more noise with stratified sampling. The proposed explanation follows from how quadrature changes when neighboring samples move relative to one another. Each sample’s relation to a density transition may change, and the distance from that sample to its neighbor may change as well. Sharing the random offset preserves equal spacing even when sample positions are randomized. This gives the ray integration a more regular set of intervals.

The paper also associates random variation in sampling with amplified flicker when the renderer is used for sequences. The mesh pictures provide visual evidence for the effect on surface noise. The statement about saving samples belongs to a different design choice, the decision to omit hierarchical sampling. The comparison of sampling positions helps explain why the authors favor the shared offset within a ray. It supplies no separate timing or cross-view metric for that change alone.

#### Retaining a direction input for training

The authors report a further practical comparison from developing the renderer. When color was trained without a view-direction input, the network did not converge. With a direction input it could train, but appeared to exploit correlations between camera direction and the attributes in FFHQ. The expression example shows how such a correlation can affect the visible image while leaving the geometry unchanged.

This observation explains why the authors hold the appearance query at the frontal direction for inference. The control affects the appearance branch. Camera position still determines which parts of the subject are sampled and where they land on the rendered grid. The paper gives a qualitative account of the convergence problem and the bias, instead of a score for alternative methods of handling viewing direction. It shows a practical dependence of training on the appearance input, with consequences for which kinds of view dependence the final rendering can express.

#### Attaching noise to the surface for video

The appendix considers a different source of view instability in the high-resolution stage. StyleGAN2 uses random noise to add fine detail. Applied in image coordinates, that noise can make newly positioned pixels carry unrelated details when the camera moves. Fur on AFHQ subjects makes the effect especially visible. The authors test a way to anchor the noise in three dimensions so that related views can draw on the same detail.

For each sequence they extract a mesh on a grid of resolution 128, attach unit Gaussian noise to its vertices, and render the noise through vertex coloring. As the styled generator reaches larger feature grids, the mesh triangles are subdivided once per layer beginning at 128×128. Noise maps can be needed up to 1024×1024. The resulting videos show less flicker in the animal examples, while some flickering persists. The authors also observe less pronounced fine detail in individual frames and suggest that rendering the noise changes its Gaussian distribution. This comparison exposes a tradeoff visible at the image stage itself. Making the fine detail better attached across frames can change how strong that detail looks in any given frame.

### Limitations

#### Limits identified by the authors

Aliasing and flicker are most visible where image content changes sharply over a few pixels. The paper points to teeth and hair, and the supplementary experiments show the difficulty on animal fur. A small change in viewpoint can produce a disproportionate change in how a fine pattern falls on the pixel grid. The high-resolution generator can therefore draw the same recognizable subject across a sequence while its fine texture changes abruptly. Geometry-aware noise reduces an important part of the problem in the videos, but visible changes remain. The authors point to anti-aliasing work in Mip-NeRF and alias-free StyleGAN as directions for addressing it.

Strong lighting effects can also distort the learned geometry. Without observations of the same subject from several cameras, the renderer has limited evidence for deciding whether a bright or dark patch belongs to shape or lighting. The authors show depth dents associated with specularities or shadows. They report that human eyes can have concave curvature where a convex eyeball would be expected, and suggest that this defect can contribute to small gaze changes as the camera moves. A related consequence comes from the fixed frontal direction used for RGB queries at inference. It prevents the renderer from expressing a specular highlight that moves with the camera in the usual way.

The whole scene is represented with a single SDF. Foreground and background are not assigned separate renderers. In one example, the cat’s face appears convincing but gives way to the background too abruptly. This reduces the plausibility of the complete image even if the face itself survives the change of view. The authors propose giving the background a separate volume renderer, following the kind of arrangement they cite in NeRF++.

The authors also identify costs in the separation of training stages. Joint training could let the high-resolution discriminator influence the volume renderer and might improve the features or geometry. It would also require more [GPU](https://md.research.elamur.ai/free/en/topics/gpu-parallel-computing/) memory. The paper describes the resulting choice between using a smaller batch, with possible effects on performance, and accumulating gradients over more passes, with a cost in time. Its other proposed route to closer geometry and image agreement is to concentrate volume samples near the SDF boundary. If the cost of querying the volume falls far enough, more of the final image could be rendered directly from it. Neither proposal has a measured outcome in the paper.

The paper discusses social consequences of the training and output as well. A generator that supplies several views of a person can contribute to more realistic fabricated videos. A generator trained to reproduce a photo collection can also absorb imbalances and biases in that collection. The authors raise detection of generated imagery and the use of more balanced data as possible responses. Their experiments study image and geometry generation, so those responses are discussed as directions rather than evaluated interventions.

#### Limits visible in the evaluation

The depth experiment measures agreement between generated observations. A low discrepancy means that typical samples from a frontal depth map have nearby counterparts in the side-view depth map, and vice versa. A geometrically incorrect surface can still agree under this test if the system draws it consistently. The curvature issues reported by the authors give specific examples of why this distinction matters. The depth comparison also focuses on a frontal view and one prescribed side view per generated subject. The paper adds examples from other angles, but those examples leave the breadth of quantitative support tied to the stated camera protocol.

The filtering and summary statistics further define the scope of the numbers. Unlikely ray terminations are removed before the depth clouds are compared. Medians reduce the influence of regions exposed by only one view, which is sensible when the objective is to measure typical agreement between comparable parts of the visible subject. This also reduces sensitivity to spatially concentrated errors. In the volume RGB comparison, the median has a related role because occluded pixels are retained. The localized error maps give information that can disappear in the final aggregate scores, including whether the remaining discrepancy concerns a small facial feature or the boundary of the whole subject.

The evidence for high-resolution agreement has a different form from the numerical volume-rendering comparisons. It consists of side-to-front reprojections, averages of reprojected views, and visual inspection of individual errors. The renderer’s lower color errors therefore quantify the consistency of its own RGB output. The high-resolution stage introduces detail later, and the visible errors on fine structures show why an aggregate result at the volume stage cannot settle how every such detail behaves. The image-distribution metrics have their own scope as well. Their common evaluation size of 256 × 256 supports a comparison at that size, while the paper demonstrates 1024×1024 rendering through examples.

Finally, the shared camera setup and the choice of training collections matter to the interpretation. The experiments cover aligned portraits and unaligned animal photographs, with cameras assumed to face a common origin and with dataset-specific angle distributions. The examples with changed angles or field of view give evidence about those particular variations. More general scene layouts and camera paths would pose additional questions about how a single field accounts for foreground, background, and visibility. The demonstrated result is the generation of coherent views and plausible underlying surfaces for the subject distributions studied.

### What came after

No later work that builds on StyleSDF is documented here. The paper closes with several directions for future research, including more direct use of the surface at high resolution, better separation of lighting from shape, and stronger coupling between the volume renderer and the image generator. These are proposals from the authors. The paper leaves open how much high-resolution detail can be attached directly to the generated surface while retaining the image quality of the styled generator.

## Cite

Cite as Roy Or-El, Xuan Luo, Mengyi Shan, Eli Shechtman, Jeong Joon Park and Ira Kemelmacher-Shlizerman. 2022. StyleSDF: High-Resolution 3D-Consistent Image and Geometry Generation. IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.1109/cvpr52688.2022.01314](https://doi.org/10.1109/cvpr52688.2022.01314) · [arXiv 2112.11427](https://arxiv.org/abs/2112.11427)

```bibtex
@inproceedings{orel2022stylesdf,
  title = {{StyleSDF: High-Resolution 3D-Consistent Image and Geometry Generation}},
  author = {Roy Or-El, Xuan Luo, Mengyi Shan, Eli Shechtman, Jeong Joon Park and Ira Kemelmacher-Shlizerman},
  booktitle = {IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings},
  year = {2022},
  doi = {10.1109/cvpr52688.2022.01314},
  eprint = {2112.11427},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/cvpr52688.2022.01314}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
