<figure><img src="image_1.png" /></figure>

HAL
open science

# Image-Guided Shape-from-Template Using Mesh Inextensibility Constraints

Thuy Tran, Ruochen Chen, Shaifali Parashar

► To cite this version:

Thuy Tran, Ruochen Chen, Shaifali Parashar. Image-Guided Shape-from-Template Using Mesh In-
extensibility Constraints. International conference on computer vision, Oct 2025, Honolulu, United
States. hal-05199849

HAL Id: hal-05199849

https://hal.science/hal-05199849v1

Submitted on 5 Aug 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Image-Guided Shape-from-Template Using Mesh Inextensibility Constraints

Thuy Tran

Ruochen Chen

Shaifali Parashar

CNRS, École Centrale de Lyon, INSA Lyon, Université Claude Bernard Lyon 1, LIRIS, UMR5205

{dinh-vinh-thuy.tran, ruochen.chen, shaifali.parashar}@liris.cnrs.fr

## Abstract

Shape-from-Template (SfT) refers to the class of methods that reconstruct the 3D shape of a deforming object from images/videos using a 3D template. Traditional SfT methods require point correspondences between images and the texture of the 3D template in order to reconstruct 3D shapes from images/videos in real time. Their performance severely degrades when encountered with severe occlusions in the images because of the unavailability of correspondences. In contrast, modern SfT methods use a correspondence-free approach by incorporating deep neural networks to reconstruct 3D objects, thus requiring huge amounts of data for supervision. Recent advances use a fully unsupervised or self-supervised approach by combining differentiable physics and graphics to deform 3D template to match input images. In this paper, we propose an unsupervised SfT which uses only image observations: color features, gradients and silhouettes along with a mesh inextensibility constraint to reconstruct at a 400× faster pace than (best-performing) unsupervised SfT. Moreover, when it comes to generating finer details and severe occlusions, our method outperforms the existing methodologies by a large margin. Code is available at https://github.com/dvttran/nsft.

## 1. Introduction

Recovering 3D shapes of objects from monocular RGB images, obtained through a video sequence or wide-baseline viewpoints, is a key goal in 3D computer vision. Given a 3D template of an object, comprising a known geometric configuration of the object along with known texture details, [3, 44] established that a unique 3D shape can be recovered from a single image of an object in a configuration different from the 3D template. It showed that combining projective geometry of the calibrated images with isometric (or geodesic-preserving) constraints on the 3D template deformation, the underlying 3D structure of any point in the image can be uniquely identified merely from the point-

<figure><img src="image_3.png" /><figcaption>Figure 1. Image-guided SfT vs SoTA. Our method recovers finer details, resolves self-occlusions and handles strong perspectivities better than existing methods. We evaluated traditional SfT [3] with correspondences obtained from Cotracker v3 [18].</figcaption></figure>

wise registration between the input image and the texture map associated with the 3D template. Template-based 3D reconstruction from images, a.k.a SfT, is therefore proven to be a well-posed problem with reliable solutions [8] that can perform real-time 3D reconstructions [9, 32, 47, 50]. [31] extends the traditional SfT to adapt to handle occlusions by interpolating the non-corresponding points on images from the reconstructed 3D points of the relevant neighbors. However, all these methods fail when the deforming object causes large (self-)occlusions, sharp motion, and high perspectivities in the images, such as in the case of the deforming cloth shown in Figure 1. This is because a unique solution of 3D shape is possible only if the point correspondences between the template texture map and the input images are known. Such occlusion artifacts appear quite often while capturing deforming objects; thus the efficacy of traditional SfT to process them poses a severe limitation to their applicability. Sharp motions and strong perspectivities also significantly degrade the reliability of point correspondences which causes these methods to fail. To mitigate this issue, several modern SfT methods [10–12, 25, 37, 48] use deep neural networks (DNN) that can jointly perform template-image registration and 3D reconstruction. These methods may require a large amount of

arXiv:2507.22699v1 [cs.CV] 30 Jul 2025
data for supervision and/or several restrictions on the scene
and camera. However, they fail to recover finer details and
severe occlusions.

Alternatively, φ-SfT [17] proposed to take advantage of the physics-based simulation of thin-shell objects [22, 30] to deform a 3D template and render using differentiable graphics to match input images in a complete unsupervised fashion. Although successful in handling fine details and severe occlusions to some extent, it incurs a huge computational cost, which makes it practically limited. Recently, PGSfT [49] used self-supervised learning of physics-based thin-shell simulations [6, 45] to learn a neural cloth model which allowed a 400× speedup over [17], although with a degraded performance in handling severe occlusions and generating fine details.

In this paper, like [17], we present a correspondence-free, unsupervised SfT technique to reconstruct 3D shapes. However, instead of using physics-based simulation of thin shell objects, we rely on simple image-related measures only to guide the 3D template mesh deformations. Consequently, we achieve a 400× computational speed up with a significantly improved performance than [17], especially while recovering finer details and challenging motion. Moreover, we initialize the simulation of a given video frame with its previous one, allowing a simpler and faster prediction of the current shape. Furthermore, we enforce an inextensibility measure of the template mesh rather than a strict isometric deformation [3] to allow the template to change its geometry according to the deformations observed in the images. Such a non-strict measure allows us to deal with isometric objects such as a paper and elastic objects such as clothes equally well. Our experiments show that the proposed method outperforms traditional and modern methodologies by large margins, especially while reconstructing finer details and severe occlusions.

## 2. Related Works

**Traditional SfT methods.** Given the registration between images and the texture map of the 3D template, these methods reconstruct surfaces as seen in input images assuming certain constraints on the deformations. [4, 36, 43, 44] assume that the template is represented with a mesh and enforce inextensibility constraints on its deformations to reconstruct the surfaces. [3, 8] assume a continuous representation of the template and enforce strict isometric constraints on its deformations. The reconstructions are obtained as a solution to a Partial Differential Equation. These methodologies have been extended to other deformation models such as conformality [3], equiareality [5, 34], ARAP [33], smoothness [55] and elasticity [1, 14, 26-28] in order to incorporate more realistic deformation scenarios. These methods are mostly computationally efficient and perform well in generic scenarios, but they are prone to high

errors when encountered with strong deformations, severe occlusions, and lighting changes in the images. Under these conditions, the point correspondences obtained from the registration are highly inaccurate which contributes strongly to the degradation in their performance. [23, 32] attempted to jointly estimate the shape and registration in order to overcome these issues; however, they could not achieve any significant performance improvement.

**DNN-based SfT methods.** [12, 37] consider the template to be a flat, regular mesh and estimate the displacement of 3D vertices to comply with observed images using an encoder-decoder network. These methods learn object-specific models that rely on both registration and reconstructions as ground truth for the supervision. Such data is difficult to obtain, and the learned models are limited to the images seen in training scenarios for which registration could be computed. Therefore, these methods do not generalize well and do not handle complex deformation scenarios. [11] proposed an object-specific model that can be learned without using registration data as labels and is not limited to flat surfaces. It trains an encoder-decoder network from a large amount of deformed shapes (typically 100K samples) of the given object. It can reconstruct volumetric objects as well using an additional RGBD sensor as an input to monitor the non-visible surface. It can generalize better to unseen object configurations than [12, 37], but cannot handle severe occlusions and lighting changes. [25] simplifies [11] by restricting the training to learn registration. Instead of relying on ground truth optical flow for training as in [12, 37], it uses an off-the-shelf optical flow method to calculate training registration and imposes external losses to control the quality of tracks. [10, 48] extend [12] and [11] respectively by training networks with fixed object geometry but variable textures; thus improving the models from strictly object-specific to only geometry-specific. However, this does not significantly improves performance. All these methods cannot handle strong deformations, sharp motions, severe occlusions and fail to generate finer details.

Inspired by physics-based simulation [21, 22, 30, 38] and recent advances in physics recovery from videos [13, 16, 20, 41, 52], [17] proposed to solve SfT using differentiable physics and graphics to recover template deformation/motion according to input images in an unsupervised fashion. This approach does not require/compute registration, and recovers a decent 3D shape even in the cases of strong deformations and severe occlusions. A huge downside is that it is prohibitively slow: it can take upto 30 hours to process 50-60 images. Measures have been proposed to speed-up the computation; however they are based upon reducing the quality of 3D template mesh which significantly affects the quality of reconstruction. Using the strategy proposed in [2] to transform physics-based simulation into an optimisation problem, [6, 45] perform a self-
supervised learning of clothed garments under various motions. [49] adapted this methodology to solve SfT using self-supervised learning of template deformations. It learns a mesh-specific and a motion-specific model with a 400× speedup over [17]; however at a degraded performance.

In this paper, we simplify the unsupervised physics-based simulation in [17] to achieve a 400× speedup while outperforming it by large margins, even in complex deformations scenario. Instead of estimating the physical parameters related to stress, strain and bending energies, we pose the template deformation as an offset prediction of template mesh’s vertices. This is a widely used approach in computer graphics [6, 45]. Instead of directly manipulating the physical forces to achieve equilibria in the above-mentioned energies, we rely solely on image observations to indirectly find the equilibrium matching the input images. In addition, we force mesh inextensibility on the template as a regularizer. It allows us to deal with both isometric and elastic surfaces, allowing mesh extensions pertaining to input images.

### Summary of contributions.

1) We propose a simple, image-guided framework to simulate deformations using only vision cues (color, edges, gradients) to recover the motion as opposed to explicit estimation of physical properties.

2) We model deformations with mesh offset prediction using a deformation network. It is a compact, low-dimensional module that captures the essential deformations while naturally leaving out redundant learning variables associated with explicit physics-based learning.

3) We use an adaptive data loss structure to compute vision losses which allows us to effectively handle shading variations arising due to deformations. It is crucial for reconstructing finer details.

4) We propose a simplified optimization strategy that reduces computational complexity from $O(T^2N)$ in [17, 49] to $O(TN)$, where T is the number of frames in the length of the video sequence and N is average number of iterations needed to reconstruct a single frame. Moreover, our framework optimization implicitly enforces temporal coherence rather than optimizing temporal losses additionally.

5) Our method outperforms SoTA by large margins in terms of speed and accuracy. It handles complex deformation scenarios extremely well. We show the strengths of our method, optimization strategy and data loss structure with extensive evaluation.

## 3. Image-guided SfT

Figure 2 shows our pipeline. We consider template as a textured triangle mesh $M = (V, E, F, T)$ with topological connectivity given by the edges $e \in E$, the triangular faces $f \in F$ and texture map $T$. The geometry of the mesh is the set of vertex coordinates $x = \{x_v \in \mathbb{R}^3 | v \in V\} \in \mathbb{R}^{|V| \times 3}$. We consider that the 3D shape at the initial frame

is a rigid transformation of the template. We denote $x_0$ for the template and $x_t$, for $t = 1, \dots, T$ the shapes to be reconstructed. In addition, we assume that the video input is accompanied by the camera calibration, the intrinsic matrix $K \in \mathbb{R}^{3 \times 3}$. Since we are reconstructing as per camera frame, we do not require camera extrinsic to be known.

### 3.1. Deformation Model

Surface moves according to a deformation field $\phi_t : \mathbb{R}^3 \to \mathbb{R}^3$. To reconstruct a surface shape, we need to learn such a vertex-wise mapping and denote $x_t := \phi(x_0; z_t)$ for some latent variable $z_t$. Unlike physics-based methods that explicitly optimize the physics parameters, e.g. scene or material conditions, etc., we parametrize the surface deformation via a deformation network $f_\theta(x_0, t)$ such that

$$x_t = x_0 + f_\theta(x_0, t). \quad (1)$$

Such a neural network inherently provides a continuous mapping from the domain of vertex coordinates (and time) to their corresponding displacements. Moreover, it allows us to transfer the learning in $z_t$ to learning the network parameters, which enables an adjustable balance between expressivity and computational efficiency by tuning the network architecture. We refer to Appendix 6 for discussion related to the advantages of our choice of deformation modeling with respect to the well established ones, such as vertex offset prediction, physics-based modeling, etc.

### 3.2. Differentiable Renderer

Once the camera calibration is known, we can utilize off-the-shelf differentiable renderers [19, 39] to optimize the shapes by aligning the vision cues within video sequence. We can see such renderers as differentiable functions that map the shape $x_t$ to an RGB image $\hat{x}_t$ and a silhouette $\hat{s}_t$. We note that the renderers require the mesh to be textured, i.e. a texture image $T$ and its corresponding UV map in the normalized coordinate space $[0, 1]^2$ are available.

### 3.3. Data Loss Structure

Before diving into the explicit loss functions, we explain the data loss structure common to all vision losses. We express the adaptive data loss between a pair of prediction and ground-truth data as

$$\ell(\hat{y}, y) = w(|\hat{y} - y|) \odot \ell_p(\hat{y}, y), \quad (2)$$

where $\odot$ denotes the element-wise product, $\ell_p$ is the $\ell-p$ norm and the weighting factor

$$w(d) = \alpha \exp\left(\frac{d}{\sigma}\right), \quad (3)$$

controlled by the hyper-parameters $\alpha$ and $\sigma$. This scheme amplifies element-wise errors exponentially, guiding the optimizer to focus on significant discrepancies.
<figure><img src="image_4.png" /><figcaption>Figure 2. Overview of our frame-wise image-guided SfT pipeline. The template is provided with a texture map $\mathcal{T}$, the mesh connectivity $\mathcal{M}$ and the initial shape $\mathbf{x}_0$. We learn the reconstruction on a video sequence frame-by-frame. At current frame $t$, the deformation network $f_\theta$ predicts a displacement from $\mathbf{x}_0$ to produce the deformed shape $\mathbf{x}_t$. A differentiable renderer then projects this mesh to produce a rendered RGB image $\hat{\mathbf{x}}_t$ and silhouette $\hat{S}_t$. We compute pixel-wise vision losses and a mesh inextensibility regularization, and optimize for the best parameters $\theta_t^*$ via backpropagation. These parameters are passed forward to initialize the next frame’s optimization (the symbol $\circled{0}$). $^\dagger$If ground-truth is not available, an off-the-shelf segmentation network can be employed to generate the reference silhouette masks.</figcaption></figure>

Such an adaptive loss is particularly useful for our vision losses. In practice, many renderers either neglect or approximate lighting effects, while real objects exhibit dynamic variations in brightness across video frames. Thus, the rendered surface can visually differ from the ground truth. However, the color mismatch typically remains more significant than any lighting discrepancies, allowing our adaptive loss to effectively handle these shading variations without sacrificing performance on regions with large errors.

### 3.4. Loss Functions

Like [17], we optimize the shapes using two main losses on RGB images and silhouettes (i.e., masks of the object in the frames). For in-the-wild videos, where the silhouettes might not be available, we propose to use Segment Anything Model 2 (SAM 2) [40] that can generate the object masks in images and videos from user prompts as point click or bounding box, etc.

**RGB Loss.** It measures the pixel-wise difference between the rendered frame $\hat{\mathbf{x}}_t$ and the video frame $\tilde{\mathbf{x}}_t$ that is masked to isolate the object of interest, has the form

$$ \mathcal{L}_{\text{rgb}}(\mathbf{x}_t) = \ell(\hat{\mathbf{x}}_t, I_t). \qquad (4) $$

**Silhouette Loss.** The object position within the frame is

further constrained by silhouette loss. Using data loss $\ell$ as above, we define the silhouette loss as

$$ \mathcal{L}_{\text{sil}}(\mathbf{x}_t) = \ell(\hat{S}_t, S_t), \qquad (5) $$

where $\hat{S}_t$ is the rendered silhouette and $S_t$ denotes the ground-truth mask. A Gaussian blur filter is also applied for smooth gradients on the boundaries, as in [17].

**Image Gradient Loss.** To exploit more information from the video, we propose to use the image gradient loss

$$ \mathcal{L}_{\text{grad}}(\mathbf{x}_t) = \ell(k(\hat{\mathbf{x}}_t), k(I_t)), \qquad (6) $$

where $k(\cdot)$ denotes an image gradient operator (e.g., Sobel). By extracting first-order information from each image, this operator highlights edges and localized intensity variations, which can be crucial for guiding surface reconstructions on well-textured objects.

### 3.5. Mesh Inextensibility Regularization

To keep the optimization more stable, we use a mesh inextensibility introduced by [6], of the form

$$ \mathcal{L}_{\text{inext}}(\mathbf{x}_t) = w_{\text{inext}} \sum_{v \in \mathcal{V}} |\det(\hat{C}_{t,v} - \Lambda_{0,v})|, \qquad (7) $$
where $\hat{C}_{t,v}$ represents the predicted covariance matrix at vertex $x_{t,v}$ about its neighborhood $\mathcal{N}_{t,v}$ with mean $\bar{x}_{t,v}$ given by

$$ \hat{C}_{t,v} = \frac{1}{|\mathcal{N}_{t,v}|} \sum_{n \in \mathcal{N}_{t,v}} (x_{t,n} - \bar{x}_{t,v})(x_{t,n} - \bar{x}_{t,v})^{\top}, \quad (8) $$

and the matrix $\Lambda_{0,v}$ is derived from the eigenvalues of the template covariance matrix $C_{0,v}$ as

$$ \Lambda_{0,v} = \begin{bmatrix} \lambda_{0,v}^1 & 0 & 0 \\ 0 & \lambda_{0,v}^2 & 0 \\ 0 & 0 & \lambda_{0,v}^3 \end{bmatrix}. \quad (9) $$

The weighting factor $w_{inext}$ is computed adaptively with respect to the mesh scale.

### 3.6. Frame-wise Optimization

As discussed in Section 3.1, our goal is to learn the optimal parameters of the deformation network to reconstruct the shape $\mathbf{x}_t$, using the loss functions and regularization above. Our main idea is to reconstruct the object shapes for each frame independently. In particular, for each frame $t$, we seek the parameters $\theta_t^*$ such that the reconstructed surface $\mathbf{x}_t = \mathbf{x}_0 + f_{\theta_t^*}(\mathbf{x}_0, t)$ minimizes the losses aforementioned. Once attained, the parameters $\theta_t^*$ is passed as the initialization for the next frame, $\theta_{t+1}^{(0)} = \theta_t^*$. This choice benefits from temporal continuity in video data, where consecutive frames tend to have similar displacements, thus requiring relatively small adjustments to the network. This frame-wise scheme is the key to our significant speedup, especially for long video sequences. More details on complexity are described in Appendix 8.1.

## 4. Experiments

We implemented our framework in PyTorch [35], leveraging automatic differentiation to use gradient-based optimization to learn the deformation network, and the libigl [15] library for geometry processing on mesh. We used the nvdiffrast [19] to render as it is faster than PyTorch3D [39].

We specify here the default setting for most of our experiments. Our base network is a simple multi-layer perceptron (MLP) with ReLU activations and 8 hidden layers of width 256 for all video sequences. The frame-wise optimization strategy is employed with AdamW optimizer [24], learning rate of $10^{-4}$ and weight decay of $10^{-2}$. The learning process warms up with 500 iterations and then runs 200 iterations for each frame. The data loss in Equations (2) and (3) is used for $\mathcal{L}_{rgb}$, $\mathcal{L}_{sil}$ and $\mathcal{L}_{grad}$ with $\alpha = 10$ and $\sigma = 1$. The Sobel operator is used on both first- and second-order to compute $\mathcal{L}_{grad}$ using the Kornia library [42]. The experiments are evaluated on a single NVIDIA V100 GPU.

We evaluated our method on Kinect-paper dataset [51] with 193 images and depth maps recorded using Kinect

<table><caption>Table 1. Depth map RMSE comparison on Kinect Paper dataset.</caption><thead><tr><th></th><th>DeepSfT [11]</th><th>TD-SfT [10]</th><th>SfT [3]</th><th>Ours</th></tr></thead><tbody><tr><td>RMSE (mm)</td><td>6.97</td><td>3.37</td><td>6.17</td><td>4.01</td></tr></tbody></table>

<figure><img src="image_5.png" /><figcaption>Figure 3. Visual comparison of DeepSfT vs Ours on Kinect Paper dataset. Depth map error at each frame is reported in mm.</figcaption></figure>

v1. We used SAM2 to generate image masks. We also experimented with $\phi$-SfT dataset [17]. It has 4 synthetic sequences of cloth deformations simulated using ArcSim [22] and 9 real sequences cloth deformation with various shapes and textures recorded from Azure Kinect v2 camera. The texture and template are provided as 3D surface corresponding to first frame in the sequence. Then, we provide an ablation study on various choices of attributes and architectures used in our method.

### 4.1. Evaluation on Kinect Paper Dataset

Table 1 compares quantitative results for traditional SfT [3], supervised SfT: DeepSfT [11] and TD-SfT [10], and unsupervised $\phi$-SfT [17], with our method outperforming DeepSfT and traditional SfT. We did not compute results for $\phi$-SfT [17] due to its high computation time. PGSFT [49] is designed to work with square meshes only. We could not evaluate Kinect-paper sequence on it. Selected reconstructed frames are shown in Figure 3. The code for TD-SfT [10] is not publicly available, so we cannot show visual results. While DeepSfT [11] and TD-SfT [10] have almost real-time performance, Ours takes almost 2 seconds to process each frame. The traditional SfT [3] takes almost 10 seconds per frame. The correspondences were computed using CoTracker v3 [18].

### 4.2. Evaluation on Synthetic $\phi$-SfT Dataset

We evaluated our method on 4 sequences of this dataset and compared with $\phi$-SfT and PGSFT. The results are shown in Table 1. The errors are computed as relative 3D error between the ground truth and the reconstructed mesh. We could not run the supervised method, DeepSfT on this
<table><caption>Table 2. Quantitative comparison on φ-SfT synthetic dataset. Average error between ground-truth and predited meshes is reported.</caption><thead><tr><th>Seq.</th><th>Traditional SfT [3]</th><th>φ-SfT [17]</th><th>PGSfT [49]</th><th>Ours</th></tr></thead><tbody><tr><td>S1</td><td>0.0328</td><td>0.0420</td><td>0.0298</td><td><strong>0.0229</strong></td></tr><tr><td>S2</td><td>0.0483</td><td><strong>0.0230</strong></td><td>0.0420</td><td>0.0254</td></tr><tr><td>S3</td><td>0.0481</td><td><strong>0.0330</strong></td><td>0.0823</td><td>0.0357</td></tr><tr><td>S4</td><td>0.0232</td><td>0.0050</td><td>0.0919</td><td><strong>0.0031</strong></td></tr></tbody></table>

sequence as it requires to be trained separately on each sequence and the training requires almost 100K samples of simulated data. These sequences each have 50 frames only, which are insufficient to train DeepSfT. In the papers, DeepSfT and TD-SfT report limitations with large occlusions and have not shown any experiments with complex geometries. A recent, weakly-supervised SfT [25] also requires more than 50 frames to train. Thus, we do not make further comparison with supervised methodologies.

### 4.3. Evaluation on Real φ-SfT Dataset

We evaluate our method on 9 real sequences in the φ-SfT dataset and compare our performance with φ-SfT and PGSfT, the best performing state of the art methods. We compute errors as average chamfer distance between ground truth point clouds and predicted point clouds (recovered from sampling on the reconstructed meshes the same number of points as the ground-truth) on each video sequence. Table 3 shows that our method outperforms φ-SfT [17] and PGSfT [49] in all sequences by large margins. Our vision-based adaptive data losses allow us to recover finer details of the object motion and geometry.

φ-SfT [17] is computationally expensive. On average, it processes a single frame in 2800s. Our runtime performance is comparable to PGSfT [49], which is a self-supervised technique. Our frame-wise optimization strategy, detailed in Section 3.6 simplifies optimization scheme used in φ-SfT and PGSfT by large margins. Table 4 shows that our runtime in minutes, over φ-SfT real sequences matches PGSfT [49]. We refer to Appendix 8.1 for more details on complexity comparison of these methods with respect to Ours.

**Sharp folds, strong motion and high perspectives.** Figure 1 shows some visual results on a sample frame from R3 and R5 sequence. Ours closely match the ground-truth folds and contours, outperforming the other approaches. The traditional SfT [3] underestimates surface variation in certain regions (e.g., the upper corner in R3) due to noises in correspondences computed from CoTracker v3 [18]. The physics-based methods φ-SfT and PGSfT are slightly better but they still fail to capture subtle curvatures accurately.

Figure 4 shows the 3D reconstruction of our method from frontal and side perspectives, together with the ones

<table><caption>Table 3. Quantitative comparison φ-SfT real dataset. Average chamfer distance between ground-truth and predicted points is reported. All values are multiplied by 10⁴ to improve readability.</caption><thead><tr><th>Seq.</th><th>φ-SfT [17]</th><th>PGSfT [49]</th><th>Ours</th></tr></thead><tbody><tr><td>R1</td><td>9.36</td><td>6.05</td><td><strong>0.66</strong></td></tr><tr><td>R2</td><td>11.60</td><td>4.11</td><td><strong>1.30</strong></td></tr><tr><td>R3</td><td>6.76</td><td>10.41</td><td><strong>4.49</strong></td></tr><tr><td>R4</td><td>11.59</td><td>13.19</td><td><strong>8.15</strong></td></tr><tr><td>R5</td><td>14.93</td><td>11.97</td><td><strong>8.04</strong></td></tr><tr><td>R6</td><td>9.95</td><td>15.46</td><td><strong>3.37</strong></td></tr><tr><td>R7</td><td>12.34</td><td>7.20</td><td><strong>4.62</strong></td></tr><tr><td>R8</td><td>3.23</td><td>10.21</td><td><strong>2.76</strong></td></tr><tr><td>R9</td><td>3.71</td><td>9.18</td><td><strong>2.12</strong></td></tr></tbody></table>

<figure><img src="image_6.png" /><figcaption>Figure 4. Qualitative comparison on φ-SfT real sequences.</figcaption></figure>

from φ-SfT [17] and PGSfT [49]. In sequence R1, the deformation is relatively simple, with a straight upper boundary throughout the frames and only slight movement in the lower region. Hence, our approach achieves an accurate reconstruction with minimal difficulty. Although the rendered frame lacks shading effects, the side view reveals that our method successfully captures the surface folds, which are absent in the other two methods. The sequences R2 and R4 contain high-frequency movement, due to manual folding at the corners and strong wind turbulence, respectively. By using low-resolution templates in φ-SfT dataset [17], Ours captures fine-winkle and high-curvature details very well. Moreover, our reconstructions are smooth and physically plausible without using any smoothness regularization. These detailed reconstructions are attributed to deformation modeling, adaptive loss implementation strategy and efficient frame-wise optimisation, as discussed in Section 3. Compared to Ours, φ-SfT could reconstruct some folds but they are not well aligned with the object shapes. PGSfT, on the other hand, over-smoothed the surfaces and cannot capture any much detail.

**Self-occlusions.** Among φ-SfT real sequences, we observe that R3 and R6 have strongest self-occlusion in their final
<table><caption>Table 4. Runtime comparison with PGSfT [49]. All numbers represent the runtime (in minutes) for the optimization loop until convergence.</caption><thead><tr><th>Method</th><th>R1</th><th>R2</th><th>R3</th><th>R</th><th>R5</th><th>R6</th><th>R7</th><th>R8</th><th>R9</th></tr></thead><tbody><tr><td>PGSfT [49]</td><td>2.62</td><td>2.37</td><td>2.39</td><td>2.32</td><td>2.61</td><td>2.36</td><td>2.41</td><td>2.38</td><td>2.31</td></tr><tr><td>Ours</td><td>3.58</td><td>2.88</td><td>2.75</td><td>2.69</td><td>2.21</td><td>2.91</td><td>2.83</td><td>2.76</td><td>2.63</td></tr></tbody></table>

<figure><img src="image_7.png" /><figcaption>Figure 5. Comparison on frames with strongest self-occlusions on R6 and R3 sequences of the φ-SfT real dataset.</figcaption></figure>

frames. When such behaviors occur, especially over a large number of frames, the surface reconstruction task becomes more challenging for most methods. An image-guided approach typically benefits from temporal constraints to handle the invisible regions. φ-SfT[17] shows that their physics-based model could provide reasonable results for self-occluded parts. Indeed, their incremental learning has built-in temporal consistency along with Newtonian dynamics. This is also incorporated into the pre-trained neural cloth model proposed by PGSFT [49]. However, training such a general-purpose model in self-supervised approach restricts the performance to having low-frequency wrinkles. In contrast, our frame-wise strategy employs no explicit temporal constraint yet still handles self-occlusion effectively. As illustrated in Figure 5, our reconstructed surfaces for both R3 and R6 align more closely to the ground-truth point clouds than the other physics-based methods. We attribute this capability to our initialization scheme in Section 3.6, in which each frame’s deformation network starts from the suboptimal parameters of the preceding frame.

## 4.4. Ablation Study

**Loss Functions.** The RGB and silhouette loss, together with the mesh inextensibility is quite crucial for every SfT method. We have additionally imposed image gradient loss. In addition, we have enforced all losses in an adaptive format. Thus, we evaluate importance of gradients and adaptive data loss in our default setting. We compare three configurations of our loss functions on φ-SfT real sequences [17], and report error as chamfer distance between ground

<table><caption>Table 5. Ablation study evaluating the impact of removing image gradient and adaptive data loss terms on our performance. Average chamfer distance (×10⁴) on φ-SfT real dataset is reported.</caption><thead><tr><th>Seq.</th><th>No image grad.</th><th>No adaptive data loss</th><th>Default</th></tr></thead><tbody><tr><td>R1</td><td>0.71</td><td><strong>0.52</strong></td><td>0.66</td></tr><tr><td>R2</td><td><strong>1.15</strong></td><td>1.44</td><td>1.30</td></tr><tr><td>R3</td><td><strong>4.23</strong></td><td>9.73</td><td>4.49</td></tr><tr><td>R4</td><td>8.61</td><td>11.1</td><td><strong>8.15</strong></td></tr><tr><td>R5</td><td>7.47</td><td>8.05</td><td><strong>8.04</strong></td></tr><tr><td>R6</td><td>4.09</td><td>5.85</td><td><strong>3.37</strong></td></tr><tr><td>R7</td><td>5.23</td><td><strong>4.37</strong></td><td>4.62</td></tr><tr><td>R8</td><td>2.36</td><td><strong>2.22</strong></td><td>2.76</td></tr><tr><td>R9</td><td>1.71</td><td><strong>1.56</strong></td><td>2.12</td></tr><tr><td>Avg.</td><td>3.95</td><td>4.98</td><td><strong>3.91</strong></td></tr></tbody></table>

truth and prediction. As shown in Table 5, removing the image gradient loss sometimes yields marginal improvements as in R2 and R3, but generally increases the error on other sequences. Similarly, omitting the adaptive data loss can help certain cases such as R7-R9 but often leads to higher overall error, especially in sequences R3 and R4. In contrast, our default setting, which employs both gradient and adaptive data losses, tends to strike a balanced compromise, achieving better or comparable results in most sequences. We study more about the adaptive data loss, silhouette loss and mesh inextensibility loss in Appendix 7.

**Deformation Network.** To evaluate the deformation model proposed in Section 3.1, we run our optimization on the φ-SfT real sequences under the default configuration, but replacing our deformation network with a vertex-offset parameterization as illustrated in first column of Figure 6. The resulting meshes contain noticeable non-smoothness compared to the deformation network outputs. We then incorporate the discrete thin-shell bending energy from [46] to examine whether this additional regularization can rectify the artifacts. Although it does yield smoother surfaces, the high-frequency folds are lost, indicating that the bending term enforces a trade-off during optimization. As mentioned in Section 3.1, our deformation network is naturally a continuous latent model that can capture the essential deformations and leave out redundant degrees of freedom that can cause unrealistic shapes.

**Network Architecture.** In addition to our base (8-layer,
<figure><img src="image_8.png" /><figcaption>Figure 6. Qualitative comparison on modeling formulation.</figcaption></figure>

256-width) deformation network, we analyze the network architecture with a small (4-layer, 64-width) and a large (12-layer, 512-width) version. We report the average reconstruction error in terms of chamfer distance between ground truth and predicted data of the three architectures on φ-SfT real sequences in Table 6. We can see that the larger networks generally give better performance due to their greater capacity, which might be able to reach a suboptimal solution more quickly. The small one, on the other hand, struggles to capture high-frequency wrinkles as shown in Figure 7 on sequences R2 and R4. For sequence R7, smaller networks perform much better quantitatively, where, in Table 6, we have 4.95 and 4.62 compared to 6.00 of the large one. We visually perceive that the motion of the cloth in this sequence is relatively simpler than others. Therefore, these observations suggests us to select the network architecture which aligns with the complexity of the object deformation within the video sequence. Moreover, to handle a more complex motion sequence, one can simply increase the network capacity without incurring a computational overhead. Hence, in our experiments, we have chosen between base and large MLP, depending on the complexity of the sequence. However, in sequences where large MLP outperforms our base one, the performance gap is not huge. It is important to note that learning on these three networks has almost no difference in runtime.

## 4.5. Limitations

We noticed that the performance on Kinect Paper dataset is slightly worse than TD-SfT [25] due to some dips while reconstructing frames with relatively high inter-image motion, as shown at frame 170 in Figure 3. In these cases, we need more than 200 iterations or other optimization strategies as discussed in Appendix 8. Moreover, although the adaptive data loss structure is designed from an intuition about shading, our formulation cannot reconstruct textureless or specular surfaces, which requires for light source and reflectance modeling in shape-from-shading literature [54].

<figure><img src="image_9.png" /><figcaption>Figure 7. Qualitative comparison on network architecture.</figcaption></figure>

<table><caption>Table 6. Quantitative comparison on network architecture. Average chamfer distance (×10⁴) on φ-SfT real dataset is reported.</caption><thead><tr><th>Seq.</th><th>Small</th><th>Base</th><th>Large</th></tr></thead><tbody><tr><td>R1</td><td>0.75</td><td>0.69</td><td><strong>0.63</strong></td></tr><tr><td>R2</td><td>2.49</td><td>1.30</td><td><strong>0.96</strong></td></tr><tr><td>R3</td><td>4.00</td><td>4.49</td><td><strong>3.11</strong></td></tr><tr><td>R4</td><td>15.85</td><td><strong>8.15</strong></td><td>8.38</td></tr><tr><td>R5</td><td>9.97</td><td><strong>8.04</strong></td><td>9.11</td></tr><tr><td>R6</td><td>4.73</td><td>3.37</td><td><strong>3.02</strong></td></tr><tr><td>R7</td><td>4.95</td><td><strong>4.62</strong></td><td>6.00</td></tr><tr><td>R8</td><td>4.06</td><td>2.76</td><td><strong>2.15</strong></td></tr><tr><td>R9</td><td>3.74</td><td>2.12</td><td><strong>1.73</strong></td></tr></tbody></table>

## 5. Conclusion

In this paper, we presented an unsupervised approach to template-based 3D reconstruction using only vision cues (images, gradients and silhouettes) and mesh inextensibility regularization; thus providing the very first SfT solely guided by image observations. We introduced an adaptive strategy to enforce vision losses, a function-based deformation network to estimate deformations and an implicitly temporally-coherent frame-wise optimization strategy to devise a simple methodology which not only outperforms state-of-the-art methods by large margins but also achieves a 400× faster computation than the best-performing counterpart, φ-SfT. We also tested several aspects of our proposed methodology and network architectures. Although our work focuses on triangle meshes, it is worth noting that other representations, such as parametric surfaces, implicit fields, or point-based structures, can also be adapted. We plan to incorporate them in future works. We also plan to extend our frame-wise to a window-wise approach, which allows us to constrain the object shapes with temporal consistency loss to improve the overall performance in terms of timing and accuracy. Moreover, we would like to discover other object categories that have servere self-occlusion.
**Acknowledgments.** This work is supported by the project RHINO (ANR-22-CE33-0014-01), a JCJC research grant. We also thank $\phi$-SfT [17] and PGSfT [49] authors for releasing the dataset, the code, and their valuable discussions about the benchmarks.

## References

[1] Antonio Agudo and Francesc Moreno-Noguer. Simultaneous pose and non-rigid shape with particle dynamics. In CVPR, 2015. 2

[2] David Baraff and Andrew Witkin. Large steps in cloth simulation. In SIGGRAPH, 1998. 2

[3] Adrien Bartoli, Yan Gérard, Francois Chadebecq, Toby Collins, and Daniel Pizarro. Shape-from-template. IEEE TPAMI, 37(10):2099–2118, 2015. 1, 2, 5, 6

[4] F. Brunet, A. Bartoli, and R.I. Hartley. Monocular template-based 3d surface reconstruction: Convex inextensible and nonconvex isometric methods. Computer Vision and Image Understanding, 125:138–154, 2014. 2

[5] David Casillas-Perez, Daniel Pizarro, David Fuentes-Jimenez, Manuel Mazo, and Adrien Bartoli. Equiareal shape-from-template. Journal of Mathematical Imaging and Vision, 61(5):607–626, 2014. 2

[6] Ruochen Chen, Shaifali Parashar, and Liming Chen. Gaps: Geometry-aware, physics-based, self-supervised neural garment draping. In International Conference on 3D Vision (3DV), 2024. 2, 3, 4

[7] Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. Advances in neural information processing systems, 31, 2018. 1

[8] Ajad Chhatkuli, Daniel Pizarro, Adrien Bartoli, and Toby Collins. A stable analytical framework for isometric shape-from-template by surface integration. IEEE TPAMI, 39(5): 833–850, 2016. 1, 2

[9] Toby Collins and Adrien Bartoli. [poster] realtime shape-from-template: System and applications. In 2015 IEEE International Symposium on Mixed and Augmented Reality, 2015. 1

[10] David Fuentes-Jimenez, Daniel Pizarro, David Casillas-Perez, Toby Collins, and Adrien Bartoli. Texture-generic deep shape-from-template. IEEE Access, 9:75211–75230, 2021. 1, 2, 5

[11] David Fuentes-Jimenez, Daniel Pizarro, David Casillas-Pérez, Toby Collins, and Adrien Bartoli. Deep shape-from-template: Single-image quasi-isometric deformable registration and reconstruction. Image and Vision Computing, 127: 104531, 2022. 2, 5

[12] Vladislav Golyanik, Soshi Shimada, Kiran Varanasi, and Di-dier Stricker. Hdm-net: Monocular non-rigid 3d reconstruction with learned deformation model. In Virtual Reality and Augmented Reality, 2018. 1, 2

[13] Jingfan Guo, Jie Li, Rahul Narain, and Hyun Soo Park. Inverse simulation: Reconstructing dynamic geometry of clothed humans via optimal control. In CVPR, 2021. 2

[14] Nazim Haouchine and Stephane Cotin. Template-based monocular 3d recovery of elastic shapes using lagrangian multipliers. In CVPR, 2017. 2

[15] Alec Jacobson, Daniele Panozzo, et al. libigl: A simple C++ geometry processing library, 2018. https://libigl.github.io/. 5

[16] Miguel Jaques, Michael Burke, and Timothy Hospedales. Physics-as-inverse-graphics: Unsupervised physical parameter estimation from video. In ICLR, 2020. 2

[17] Navami Kairanda, Edith Tretschk, Mohamed Elgharib, Christian Theobalt, and Vladislav Golyanik. $\phi$-sft: Shape-from-template with a physics-based deformation model. In CVPR, 2022. 2, 3, 4, 5, 6, 7, 9, 1

[18] Nikita Karaev, Iurii Makarov, Jianyuan Wang, Natalia Neverova, Andrea Vedaldi, and Christian Rupprecht. Co-tracker3: Simpler and better point tracking by pseudolabelling real videos. arXiv preprint arXiv:2410.11831, 2024. 1, 5, 6

[19] Samuli Laine, Janne Hellsten, Tero Karras, Yeongho Seol, Jaakko Lehtinen, and Timo Aila. Modular primitives for high-performance differentiable rendering. ACM TOG, 39 (6):1–14, 2020. 3, 5

[20] Yue Li, Marc Habermann, Bernhard Thomaszewski, Stelian Coros, Thabo Beeler, and Christian Theobalt. Deep Physics-aware Inference of Cloth Deformation for Monocular Human Performance Capture. In 3DV, 2021. 2

[21] Yifei Li, Tao Du, Kui Wu, Jie Xu, and Wojciech Matusik. Diffcloth: Differentiable cloth simulation with dry frictional contact. ACM TOG, 42(1), 2022. 2

[22] Junbang Liang, Ming Lin, and Vladlen Koltun. Differentiable cloth simulation for inverse problems. In NeurIPS, 2019. 2, 5

[23] Qi Liu-Yin, Rui Yu, Lourdes Agapito, Andrew Fitzgibbon, and Chris Russell. Better together: Joint reasoning for non-rigid 3d reconstruction with specularities and shading. In BMVC, 2016. 2

[24] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017. 5

[25] Sara Luengo-Sanchez, David Fuentes-Jimenez, Cristina Losada-Gutierrez, Daniel Pizarro, and Adrien Bartoli. Weakly-supervised deep shape-from-template. IEEE Access, 13:22868–22892, 2025. 1, 2, 6, 8

[26] Abed Malti and Cédric Herzet. Elastic shape-from-template with spatially sparse deforming forces. In CVPR, 2017. 2

[27] Abed Malti, Richard Hartley, Adrien Bartoli, and Jae-Hak Kim. Monocular template-based 3d reconstruction of extensible surfaces with local linear elasticity. In CVPR, 2013.

[28] Abed Malti, Adrien Bartoli, and Richard Hartley. A linear least-squares solution to elastic shape-from-template. In CVPR, 2015. 2

[29] Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik, Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng. Nerf: Representing scenes as neural radiance fields for view synthesis. Communications of the ACM, 65(1):99–106, 2021. 1

[30] Rahul Narain, Armin Samii, and James F. O'Brien. Adaptive anisotropic remeshing for cloth simulation. ACM TOG, 31 (6), 2012. 2
[31] Dat Tien Ngo, Sanghyuk Park, Anne Jorstad, Alberto Crivellaro, Chang D. Yoo, and Pascal Fua. Dense image registration and deformable surface reconstruction in presence of occlusions and minimal texture. In *ICCV*, 2015. 1

[32] Dat Tien Ngo, Jonas Östlund, and Pascal Fua. Template-based monocular 3d shape recovery using laplacian meshes. *IEEE TPAMI*, 38(1):172–187, 2016. 1, 2

[33] Shaifali Parashar, Daniel Pizarro, Adrien Bartoli, and Toby Collins. As-rigid-as-possible volumetric shape-from-template. In *ICCV*, 2015. 2

[34] Shaifali Parashar, Daniel Pizarro, and Adrien Bartoli. Local deformable 3d reconstruction with cartan's connections. *IEEE TPAMI*, 42(12):3011–3026, 2020. 2

[35] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. In *NeurIPS*, 2019. 5

[36] Mathieu Perriollat, Richard Hartley, and Adrien Bartoli. Monocular template-based reconstruction of inextensible surfaces. *IJCV*, 95(2):124–137, 2011. 2

[37] A. Pumarola, A. Agudo, L. Porzi, A. Sanfeliu, V. Lepetit, and F. Moreno-Noguer. Geometry-Aware Network for Non-Rigid Shape Prediction from a Single View. In *CVPR*, 2018. 1, 2

[38] Yi-Ling Qiao, Junbang Liang, Vladlen Koltun, and Ming C. Lin. Scalable differentiable physics for learning and control. In *ICML*, 2020. 2

[39] Nikhila Ravi, Jeremy Reizenstein, David Novotny, Taylor Gordon, Wan-Yen Lo, Justin Johnson, and Georgia Gkioxari. Accelerating 3d deep learning with pytorch3d. *arXiv:2007.08501*, 2020. 3, 5

[40] Nikhila Ravi, Valentin Gabeur, Yuan-Ting Hu, Ronghang Hu, Chaitanya Ryali, Tengyu Ma, Haitham Khedr, Roman Rädle, Chloe Rolland, Laura Gustafson, Eric Mintun, Junting Pan, Kalyan Vasudev Alwala, Nicolas Carion, Chao-Yuan Wu, Ross Girshick, Piotr Dollár, and Christoph Feichtenhofer. Sam 2: Segment anything in images and videos. *arXiv preprint arXiv:2408.00714*, 2024. 4

[41] Davis Rempe, Leonidas J. Guibas, Aaron Hertzmann, Bryan Russell, Ruben Villegas, and Jimei Yang. Contact and human dynamics from monocular video. In *ECCV*, 2020. 2

[42] Edgar Riba, Dmytro Mishkin, Daniel Ponsa, Ethan Rublee, and Gary Bradski. Kornia: an open source differentiable computer vision library for pytorch. In *CVPR*, 2020. 5

[43] Mathieu Salzmann and Pascal Fua. Reconstructing sharply folding surfaces: A convex formulation. In *CVPR*, 2009. 2

[44] Mathieu Salzmann, Francesc Moreno-Noguer, Vincent Lepetit, and Pascal Fua. Closed-form solution to non-rigid 3d surface registration. In *ECCV*, 2008. 1, 2

[45] Igor Santesteban, Miguel A Otaduy, and Dan Casas. SNUG: Self-Supervised Neural Dynamic Garments. In *CVPR*, 2022. 2, 3

[46] Josua Sassen, Henrik Schumacher, Martin Rumpf, and Keenan Crane. Repulsive shells. *TOG*, 43(4):1–22, 2024. 7

[47] Mohammadreza Shetab-Bushehri, Miguel Aranda, Erol Özgür, Youcef Mezouar, and Adrien Bartoli. Robusft: Robust real-time shape-from-template, a c++ library. *Image and Vision Computing*, 141:104867, 2024. 1

[48] Soshi Shimada, Vladislav Golyanik, Christian Theobalt, and Didier Stricker. IsMo-GAN: Adversarial Learning for Monocular Non-Rigid 3D Reconstruction. In *CVPRW*, 2019. 1, 2

[49] David Stotko, Nils Wandel, and Reinhard Klein. Physics-guided shape-from-template: Monocular video perception through neural surrogate models. In *CVPR*, 2024. 2, 3, 5, 6, 7, 9, 1

[50] Dongliang Tan, Huamin Yang, Zhengang Jiang, Weili Shi, Jun Qin, and Feng Qu. Improved shape-from-template method with perspective space constraints for disappearing features. *Complex & Intelligent Systems*, 10(4):5475–5488, 2024. 1

[51] Aydin Varol, Mathieu Salzmann, Pascal Fua, and Raquel Urtasun. A constrained latent variable model. In *CVPR*, 2012. 5

[52] Sebastian Weiss, Robert Maier, Daniel Cremers, Rüdiger Westermann, and Nils Thuerey. Correspondence-free material reconstruction using sparse surface constraints. In *CVPR*, 2020. 2

[53] Ziyi Yang, Xinyu Gao, Wen Zhou, Shaohui Jiao, Yuqing Zhang, and Xiaogang Jin. Deformable 3d gaussians for high-fidelity monocular dynamic scene reconstruction. In *CVPR*, pages 20331–20341, 2024. 1

[54] Ruo Zhang, Ping-Sing Tsai, James Edwin Cryer, and Mubarak Shah. Shape-from-shading: a survey. *TPAMI*, 21 (8):690–706, 2002. 8

[55] Erol Özgür and Adrien Bartoli. Particle-sft: A provably-convergent, fast shape-from-template algorithm. *IJCV*, 123 (2):184–205, 2017. 2
# Image-Guided Shape-from-Template Using Mesh Inextensibility Constraints

## Supplementary Material

### 6. Deformation Network

The object deformation at time step $t$ can be represented by $\varphi(\mathbf{x}_0, t; \mathbf{z}_t) = \mathbf{x}_t - \mathbf{x}_0$, for the initial state $\mathbf{x}_0$ and latent variables $\mathbf{z}_t$. We can learn such deformation in the following ways:

(1) **vertex-offset**: consider $\varphi := \Delta\mathbf{x}_t \in \mathbb{R}^{3V}$ as learning variables directly,

(2) **physics-based**: sequentially predict the per-time-step acceleration $\mathbf{a}_t$ and compute the shape using backward Euler method

$$ \mathbf{v}_t = \mathbf{v}_{t-1} + \Delta t \mathbf{a}_t, $$

$$ \mathbf{x}_t = \mathbf{x}_{t-1} + \Delta t \mathbf{v}_t, $$

(3) **shared-weight network**: learn a network $\varphi(\mathbf{x}_0, t; \theta)$ with the shared parameters $\theta$ and timestep $t$ as input,

(4) **frame-wise network (ours)**: learn a network $\varphi(\mathbf{x}_0; \theta_t)$ with distinct parameters $\theta_t$ for each timestep $t$.

The first idea is intuitive, on which we made an ablation study (see Figure 6) to show that direct estimation may lack smoothness and needs additional regularizers. The state-of-the-art physics-based methods, to which we compare in Section 4, follow the second way. The third approach are widely used in Neural Radiance Fields (NeRF) [29] and Gaussian Splatting (GS) [53], which should optimize for the entire video concurrently so that the input $t$ is informative. In our initial exploration, we modeled the SfT problem as an initial value problem and utilized neural ODE framework [7] to learn the sequence's velocity field. We found it to be as computationally inefficient as $\phi$-SfT. Our method, on the other hand, allows optimizing in a frame-wise strategy described in Section 3.6. This brings the novelty in our work, where we can reconstruct high-quality shapes efficiently.

### 7. Loss Functions

#### 7.1. Adaptive Data Loss

Rather than using the standard $l$-p norm for the vision losses as $\phi$-SfT[17] or PGSfT[49], we propose to use an adaptive data loss as described in Section 3.3. Its adaptive nature comes from the exponential weighting factor on the pixel difference $d$, which allows color errors to remain in focus during optimization despite shading variations. Using this loss is particularly beneficial in complex videos with low-textured areas and/or strong deformations. Indeed, the quantitative results in Table 5 showed a significant improvement on complex sequences while slightly degradation (visually indistinguishable) on the simpler ones. Moreover,

<figure><img src="image_10.png" /><figcaption>Figure 8. Qualitative comparison on using the adaptive data loss.</figcaption></figure>

<table><caption>Table 7. Ablation study on hyper-parameters of the adaptive data loss. Average chamfer distance ($\times 10^4$) are reported in average of all sequences on $\phi$-SfT real dataset.</caption><thead><tr><th>σ \ α</th><th>0.1</th><th>1</th><th>5</th><th>10</th><th>15</th></tr></thead><tbody><tr><th>0.1</th><td>5.59</td><td>17.91</td><td>28.22</td><td>28.86</td><td>26.73</td></tr><tr><th>0.5</th><td>18.43</td><td>4.85</td><td>4.01</td><td>4.22</td><td>4.76</td></tr><tr><th>1</th><td>18.89</td><td>4.95</td><td>3.83</td><td>3.91</td><td>4.23</td></tr><tr><th>2</th><td>19.91</td><td>4.75</td><td>3.93</td><td>3.95</td><td>4.18</td></tr><tr><th>10</th><td>27.87</td><td>4.81</td><td>3.95</td><td>3.92</td><td>4.23</td></tr></tbody></table>

as illustrated in Figure 8, our method is able to reconstruct very high-detailed wrinkles with the adaptive data loss.

The adaptive data loss is computed with an exponential weighting factor $w(d) = \alpha \exp(d/\sigma)$, where we fix $\alpha = 10$ and $\sigma = 1$. To investigate the robustness of the choice of these hyper-parameters, we evaluate the reconstruction results on $\phi$-SfT real dataset with ranges of $\alpha \in \{0.1, 1, 5, 10, 15\}$ and $\sigma \in \{0.1, 0.5, 1, 2, 10\}$, then report the average of all sequences in Table 7. First, we can see that we obtain bad reconstruction when $\sigma = 0.1$. Small $\sigma$ makes the weight and thus the adaptive data loss exponentially large which can cause optimization to fail. Next, when $\alpha = 0.1$, we also get bad results since the optimizer might lose the importance of vision losses. Finally, when $\alpha$ and $\sigma$ are bigger, the results are quite robust compared to our default setting.

#### 7.2. Silhouette Loss

We inherited the silhouette loss from the related works $\phi$-SfT [17] and PGSfT [49]. Hence, the object masks are required in order to optimize the shapes. In case the ground-truth masks are not given, we can estimate them by using a segmentation network, as shown our pipeline (see Figure 2). The Kinect paper dataset does not contain object masks, and we used SAM 2 in our experiments. We additionally report in Table 8 the impact of using silhouette loss on $\phi$-SfT real dataset. In general, we can see that the silhouette loss helps improve the reconstruction performance.
<table><caption>Table 8. Ablation study evaluating the impact of removing silhouette loss terms on our performance. Average chamfer distance (×10⁴) on φ-SfT real dataset is reported.</caption><thead><tr><th>Seq.</th><th>No silhouette loss</th><th>Default</th></tr></thead><tbody><tr><td>R1</td><td>0.71</td><td><strong>0.66</strong></td></tr><tr><td>R2</td><td><strong>1.04</strong></td><td>1.30</td></tr><tr><td>R3</td><td>4.94</td><td><strong>4.49</strong></td></tr><tr><td>R4</td><td><strong>6.57</strong></td><td>8.15</td></tr><tr><td>R5</td><td>8.68</td><td><strong>8.04</strong></td></tr><tr><td>R6</td><td>3.56</td><td><strong>3.37</strong></td></tr><tr><td>R7</td><td>4.79</td><td><strong>4.62</strong></td></tr><tr><td>R8</td><td>3.33</td><td><strong>2.76</strong></td></tr><tr><td>R9</td><td>2.18</td><td><strong>2.12</strong></td></tr><tr><td>Avg.</td><td>3.97</td><td><strong>3.91</strong></td></tr></tbody></table>

### 7.3. Mesh Inextensibility Loss

We note that the mesh inextensibility loss is essential in our method. Learning shapes without such a regularization, the object shapes can be overstretched out of viewing frame, thus misguiding the optimization in subsequent iterations. This is similar to using physics constraints as φ-SfT [17] and PGSfT [49], and bypassing the optimization or prior of cloth's material coefficients. Although classical constraints as-rigid-as-possible (ARAP) [33] or edge preservation can also be imposed considering their computational efficiency, they are still prone to high errors when we have strong deformations or serve occlusion. As suggested by Chen et al. [6], the mesh inextensibility loss relaxes isometry to a weaker form of local rigidity of a point within a neighborhood via preservation of singular values in Equations (7) to (9). We refer to their paper [6] for more discussion on the loss.

The mesh inextensibility loss is originally designed to garment simulation, in which loss variations are not quite large. On the other hand, SfT problem aims to reconstruct various object categories where the inextensibility losses vary a lot. Hence, selecting the weighting factor $w_{inext}$ is essential for our framework to generalize to any object of interest. We observe that the mesh inextensibility loss depends on the mesh scale. Indeed, let us define $\delta$ the scale of the object mesh. We imply that the vector $x_j - \bar{x}_i$ also has scale $\delta$. It follows that the covariance matrices in Equations (8) and (9) have the scale $\delta^2$. Therefore, the mesh inextensibility loss in Equation (7) has scale $\delta^6 = (\delta^2)^3$ due to the determinant computation of 3 × 3 matrices. In our experiments, we thus fix an adaptive weighting factor $w_{inext} := \delta^{-6}$, where $\delta$ approximates the mesh scale by evaluating the median of the edge lengths of the mesh. Since the weighting factors for vision losses are fixed to 1, integrating them into our framework yields an adaptive manner for

reconstructing various 3D objects without extra tuning.

## 8. Optimization Strategies

We analyze the complexity of the proposed frame-wise optimization strategy in Section 8.1 in comparison with the strategies from physics-based approaches. Additionally, we discuss some possible extensions in Sections 8.2 and 8.3. Depending on the practical applications, future works can develope from these fundamentals to balance between the accuracy and efficiency. We make an ablation study of such strategies on the Kinect Paper dataset in Section 8.4, showing promising results on reconstructing high inter-frame motion.

### 8.1. Frame-wise Optimization

We compare our proposed optimization strategy in Sec. 3.6 with the two state-of-the-art methods φ-SfT [17] and PGSfT [49]. A conspicuous bottleneck for image-guided SfT is rendering and backpropagation through the differentiable renderer, especially when the mesh has a high resolution. We show in the following that our strategy reduces the number of renderings from $O(T^2N)$ to $O(TN)$, where T is the video sequence length and N is the average number of iterations used to optimize a single frame.

Let us first analyze the number of renderings used in φ-SfT [17] and PGSfT [49]. These methods rely on the simulation of cloth under Newtonian dynamics. Hence, their proposed optimization strategies are inherently incremental, which requires rendering of prior frames when optimizing the subsequent ones to avoid error accumulation. Assume that the learning process starts with the first frame and gradually incorporates the next frame after N iterations. We can deduce that frame t is rendered $(T - t + 1)N$ times, for $t = 1, \dots, T$, which leads to the total number of renderings

$$ 
\begin{aligned}
\sum_{t=1}^{T} (T - t + 1)N &= N \left[ \sum_{t=1}^{T} (T + 1) - \sum_{t=1}^{T} t \right] \\
&= N \left[ T(T + 1) - \frac{T(T + 1)}{2} \right] \\
&= N \frac{T(T + 1)}{2} \\
&= O(T^2 N).
\end{aligned}
$$

On the other hand, our method renders exactly $TN$ times as each frame is optimized independently. Therefore, our frame-wise strategy scales better for long sequences.

It is to be noted that PGSfT [49] leverages physical priors from a pre-trained surrogate model and uses a much smaller number N than φ-SfT [17] and ours, in order to speed up the optimization process. In future work, this idea can be combined with our strategy on a specific type of object for real-time reconstruction.
<table><caption>Table 9. Ablation study of various optimization strategies on Kinect Paper dataset. Average depth RMSE and runtime are reported.</caption><thead><tr><th></th><th>Default</th><th>250-iter</th><th>Window</th><th>Adaptive</th></tr></thead><tbody><tr><td>RMSE (mm)</td><td>4.01</td><td>3.99</td><td><strong>3.57</strong></td><td>3.64</td></tr><tr><td>Runtime (mins)</td><td><strong>6.04</strong></td><td>7.52</td><td>50.54</td><td>84.37</td></tr></tbody></table>

## 8.2. Window-wise Optimization

Our strategy for optimizing each frame independently can be extended to optimizing each window of *w* frames concurrently, where frame-wise strategy is a special case by taking *w* = 1. Using more than one frames allows us to employ temporal smoothness regularizer, e.g. for *w* = 3, we can impose

$$ \mathcal{L}_{\text{temporal}}(\mathbf{x}_t, \mathbf{x}_{t+1}, \mathbf{x}_{t+2}) = \ell \left( \mathbf{x}_{t+1}, \frac{\mathbf{x}_t + \mathbf{x}_{t+2}}{2} \right), \quad (10) $$

for $\ell$ any choice of data loss. This represents the constraint $\mathbf{x}_{t+1} = \frac{\mathbf{x}_t + \mathbf{x}_{t+2}}{2}$ derived from kinematics equations.

## 8.3. Adaptive Frame-wise Optimization

In our default setting, we used a warmup of 500 iterations and then 200 iterations for each frame to reconstruct the shapes within a video. This setting well balances between accuracy and runtime, as illustrated in our experiments in Section 4. However, this fixed-iteration strategy might fail to capture inter-frame complex and fast deformations as seen at frame 170 in Figure 3 on Kinect Paper dataset. Using more iterations can improve the performance, but the number of iterations vary among sequences and need to be tuned appropriately. Therefore, adaptive stopping criteria for per-frame optimization can be developed. A straightforward approach is to fix a tolerance on the difference of the total loss values between two consecutive iterations.

## 8.4. Ablation Study

We experiment on Kinect Paper dataset using the following optimization strategies:

(1) **Default**: the default frame-wise strategy with 500-iteration warmup and 200 iterations per frame,

(2) **250-iter**: the frame-wise strategy with 500-iteration warmup and 250 iterations per frame,

(3) **Window**: the window-wise strategy in Section 8.2 500-iteration warmup and 600 iterations for each window of *w* = 3 frames. We also add the temporal loss in Equation (10) for $\ell(\mathbf{x}, \mathbf{y}) = ||\mathbf{x} - \mathbf{y}||_2$.

(4) **Adaptive**: the adaptive frame-wise strategy in Section 8.3 with tolerance $\tau = 10^{-6}$.

Table 9 shows the depth map root mean square error (RMSE) and runtime of the four strategies. We additionally plot the per-frame RMSE for the entire sequence in

<figure><img src="image_11.png" /><figcaption>Figure 9. Illustration of depth map RMSE (mm) on the entire Kinect Paper sequence of 193 frames with various optimization strategies.</figcaption></figure>

Figure 9. We can observe that later frames 110-170 are tricky to our method. Using more iterations, **250-iter** improves the accuracy a bit compared to **Default** and thus needs a minute more. However, the overall behavior looks quite similar to **Default**. **Window** can enhance the average accuracy in a temporal smoothness manner on the error curve. This strategy, however, needs more studies on tuning the per-window iterations or window size to achieve better performance. **Adaptive** strategy illustrates its effectiveness of reaching highly accurate reconstruction (e.g. RMSE reduced from 3.22 with **Default** and 7.27 with **Window**, to 2.09 at frame 128) while still struggles with some tricky frames (e.g. RMSE at frame 115 is 17.28 compared to 10.01 with **Window**). Further works can study on the tolerance to improve accuracy, while noticing the costly tradeoff in runtime.