A Learning-Based Approach to Parametric Rotoscoping of Multi-Shape Systems

Luis Bermudez, Nadine Dabby, Yingxi Adelle Lin, Sara Hilmarsdottir, Narayan Sundararajan, Swarnendu KarWACV 2021

TL;DR

This paper introduces a novel machine learning approach to automate rotoscoping, a tedious process in visual effects. By learning from existing artist-created rotoscoped assets, their method can predict landmark points and reconstruct parametric shapes, significantly reducing manual effort and enabling artists to rotoscope nearly 73% of shots with minimal adjustments.

What Problem Does This Paper Address?

Rotoscoping, the process of creating object masks frame-by-frame in video, is a critical but labor-intensive task in visual effects (VFX). Artists meticulously draw parametric contours that must be spatially and temporally smooth. However, these highly detailed, manually supervised assets are often discarded after use and rarely reused. This paper addresses the challenge of leveraging these existing, unstructured rotoscoped assets to build a trainable dataset and develop a machine learning system that can automate and accelerate the rotoscoping process, particularly for complex multi-shape systems like those found in stop-motion animation.

Methods

The core of the proposed solution involves a two-stage learning process:

  1. Landmark Prediction: A ResNet50-based model is trained to predict semantic landmark points on a face from a rough crop of the image. This model is designed to be data-efficient, leveraging a combination of artist-created ground truth data and synthetically generated data. A custom loss function, LMAE, is introduced, which is a generalized Mean Absolute Error that incorporates validity parameters (to handle occluded points), point-specific scaling (to weight important points), and part-specific scaling (to handle relative shape importance and pose invariance).
  2. Shape Regression: Once landmark points are predicted, a separate model is trained to reconstruct the parametric roto shapes. This involves several steps:
  3. Canonical Representation: Raw roto shapes are converted into a canonical form by extracting and defining semantically consistent landmark points, including corner points and points along contours.
  4. Preprocessing: Canonical shapes are transformed for location and scale invariance.
  5. Shape Augmentation: To bridge the gap between training and domain distributions, shape augmentation techniques are applied, including random tweaking of points and affine transformations.
  6. Shape Models: Various strategies are explored, including cusping (for simple shapes like eyes) and a neural network model that predicts tangents and remaining landmarks. The shape regression model focuses on minimizing tangent endpoint errors.

Crucially, the system is designed for interactivity, integrating directly into the artist's workflow (e.g., Nuke plugin) allowing for artist intervention and adjustment of inferred points and shapes.

Datasets

The paper introduces a novel dataset derived from LAIKA's stop-motion animation production. This dataset consists of:

  • Training Data: 5 shots of artist-generated rotoscoped data.
  • Test Data: 200 frames from 12 annotated shots, balanced across different face poses.

This dataset is described as the first of its kind for rotoscoped multi-shape fine feature systems from a real film production. The authors also utilized synthetically generated data and data augmentation to supplement the limited ground truth data.

Key Insights and Ideas

  • Repurposing Existing Assets: The most significant insight is the idea of treating existing, manually created rotoscoped assets not as final outputs, but as valuable, albeit unstructured, training data for machine learning models. This bypasses the need for entirely new annotation efforts.
  • Data Efficiency is Key: Given the scarcity of VFX data, the authors emphasize techniques for maximizing performance with limited ground truth, including synthetic data generation and augmentation.
  • Interactivity is Crucial for Adoption: For a tool to be useful in a professional VFX pipeline, it must integrate seamlessly into existing workflows and allow for artist control and correction. The plugin-based approach in Nuke is a prime example.
  • Domain-Specific Loss Functions: Standard loss functions are insufficient. The development of a custom loss function that accounts for occlusions, point importance, and shape scaling is vital for robust performance on this specific task.
  • Synthetic Data as a Bridge: Synthetically generated data, when properly augmented, can effectively bridge the domain gap between synthetic and real-world data, significantly improving model performance even with limited real data.

Key Results

  • Significant Time Savings: In preliminary production testing, artists were able to rotoscope nearly 73% of shots with either no adjustment (26%) or minor adjustments (47%) using the tool.
  • Improved Accuracy: The neural network model with shape augmentation achieved lower average tangent endpoint error (LEPE) compared to linear models or a simple cusping technique. For example, for eyebrows, the nn-aug model achieved an LEPE of 0.22, significantly better than lin-noaug (0.26) or cusp (0.24).
  • Data Efficiency Impact: Training on a single shot of augmented ground truth data without synthetic data improved MAE from 602.22 to 60.26. Adding synthetic data and augmentations to one shot of ground truth data improved performance by almost 35X (from 602.22 to 17.31).
  • Augmentation Benefits: Both synthetic data and augmentation techniques were shown to significantly improve landmark prediction accuracy, reducing the Mean Absolute Error (MAE).

Limitations and Future Work

Limitations: * The paper acknowledges that the current system does not explicitly address smoothness between frames, though it allows for post-inference tracking. * The dataset, while novel, is limited in size and scope, primarily focusing on one character. * The current model's performance on challenging shots with occlusions (hats, sideways faces) is noted as an area for improvement.

Future Work: * Broader Applications: Extending the method to other fine rotoscoping tasks on human faces and other complex objects. * Contour-Aware Loss: Developing a loss function that better utilizes tangent information from ground truth shapes. * Confidence Scoring: Improving confidence scores to better predict how much time an artist will save. * Animated Transforms: Enabling animation of points and shapes, and introducing keyframe interpolation. * Improved Synthetic Data: Incorporating more diverse facial expressions and potentially pre-production rendered animation. * Optical Flow: Utilizing optical flow for better temporal coherence of inferred shapes.

Summary updated

BibTeX
@inproceedings{bermudez2021learning,
  author = {Luis Bermudez and Nadine Dabby and Yingxi Adelle Lin and Sara Hilmarsdottir and Narayan Sundararajan and Swarnendu Kar},
  title = {{A Learning-Based Approach to Parametric Rotoscoping of Multi-Shape Systems}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2021},
}
Figure