SKED: Sketch-guided Text-based 3D Editing

Aryan Mikaeili, Or Perel, Daniel Cohen-Or, Ali Mahdavi-Amiri

Introduction

Recent advancements in text-to-3D generation, such as DreamFusion, have revolutionized our ability to create complex 3D objects from simple natural language prompts. However, the task of editing these existing 3D models remains a significant challenge. When a user wants to modify a specific part of a 3D scene—for example, adding a chef’s hat to a cat—a text-only interface often lacks the necessary spatial precision. The underlying AI may inadvertently change the cat's color, breed, or pose while attempting to accommodate the new accessory.

SKED (SKetch-guided 3D EDiting) addresses this lack of local control by combining the semantic power of text-to-image diffusion models with the geometric constraints of user-provided sketches. This framework allows for localized, shape-accurate 3D edits while ensuring the rest of the 3D scene remains perfectly intact.

Overview of SKED: Users provide a base NeRF, a text prompt, and sparse sketches to guide localized 3D edits like adding a chef's hat to a cat or a cherry to a sundae.

Methodology

SKED operates on a pre-trained Neural Radiance Field (NeRF) and requires a text prompt along with at least two 2D sketches from different viewpoints. The system utilizes Instant-NGP as its underlying representation, enabling rapid optimization in approximately 30-40 minutes.

The core of the framework is a multi-objective optimization process involving four distinct loss functions:

  1. Score Distillation Sampling (SDS) Loss: Borrowed from text-to-3D generation techniques, this loss leverages a pre-trained 2D diffusion model (Stable Diffusion) to ensure the newly generated 3D geometry aligns with the text prompt from all viewing angles.
  2. Preservation Loss ($L_{pres}$): This critical innovation maintains the integrity of the original model. It calculates the distance of 3D points to the 2D sketch regions; points far from the sketch are forced to remain identical to the base NeRF, preventing "global shifting" or unintended changes to the background.
  3. Silhouette Loss ($L_{sil}$): This loss ensures the added 3D volume adheres to the boundaries defined by the user's sketches. It penalizes the model if the rendered alpha masks do not match the hand-drawn silhouettes.
  4. Sparsity Loss ($L_{sp}$): An entropy-based loss used to keep the 3D density clean, preventing the emergence of "floaters" or foggy artifacts in the edited regions.
The SKED pipeline: Optimization utilizes a combination of Score Distillation Sampling (SDS), preservation loss ($L_{pres}$), and silhouette loss ($L_{sil}$) to ensure shape-accurate and localized edits.

Key Insights and Ideas

Geometric Anchoring

A major hurdle in text-to-3D generation is the "Janus problem," where the model generates multiple faces or inconsistent features across different views. By providing sketches, the user offers a geometric anchor that helps the diffusion model correctly place features, significantly reducing these artifacts.

Soft Blending and Progressive Editing

SKED uses a distance-based weight for the preservation loss, allowing for a "soft" blend between new and old geometry. This prevents harsh seams where the edit meets the original model. Furthermore, because the method is so effective at preserving the base model, it supports progressive editing. A user can add a tie to a character in one session and return later to add a hat, with each edit building cleanly upon the last.

Results and Evaluation

SKED is a zero-shot method, meaning it requires no specific training on 3D edit datasets. Instead, it leverages the broad prior knowledge contained within Stable Diffusion.

Quantitative Performance

In comparative tests against text-only baselines, SKED demonstrated superior fidelity. It achieved a PSNR of 27.53 for preserving non-edited regions, compared to just 16.65 for text-only methods. Additionally, the Intersection-over-Sketch (IoS) score reached approximately 0.82, indicating that the final 3D edits closely followed the user's intended boundaries.

Qualitative Versatility

The framework proves versatile across various editing tasks, including additive changes (adding a crown to a teddy bear), replacements (changing a tree into a cactus), and localized refinements (adding a specific bag to an anime character).

Limitations and Future Work

While SKED significantly improves 3D editing, some limitations remain. The quality of the output is inherently tied to the underlying diffusion model (e.g., Stable Diffusion V1.4). Additionally, the system currently focuses on opaque objects; future iterations could expand to handle transparent or refractive materials like glass. Finally, while the system is robust, it requires the user to provide sketches that are relatively consistent across the chosen viewpoints to ensure smooth optimization.

Summary updated

BibTeX
@inproceedings{mikaeili2023sked,
  author = {Aryan Mikaeili and Or Perel and Daniel Cohen-Or and Ali Mahdavi-Amiri},
  title = {{SKED: Sketch-guided Text-based 3D Editing}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure