ARTICULATED PART EXTRACTION FROM SPRITE SHEETS USING MACHINE LEARNING
Embodiments are disclosed for articulated part extraction using images of animated characters from sprite sheets by a digital design system. In particular, in one or more embodiments, the disclosed systems and methods comprise receiving an input including a plurality of images depicting an animated character in different poses. The disclosed systems and methods further comprise, for each pair of images in the plurality of images, determining, by a first machine learning model, pixel correspondences between pixels of the pair of images, and determining, by a second machine learning model, pixel clusters representing the animated character, each pixel cluster corresponding to a different structural segment of the animated character. The disclosed systems and methods further comprise selecting a subset of clusters that reconstructs the different poses of the animated character. The disclosed systems and methods further comprise creating a rigged animated character based on the selected subset of clusters.
Animation involves the manipulation of characters and/or objects to give the appearance of movement. The traditional method of animating characters is to independently draw each frame of animation. Over time, tools have been developed to decrease the amount of time required to create animation. For example, tools have been developed to allow rigged two-dimensional characters, or puppets, to be easily rendered in different poses by manipulating a character rig representation of the character. Thus, an important part of the animation process is creating or obtaining a character rig of an animated character. Existing solutions that involve the manual creation of character rigs have limitations and drawbacks, as they require advanced experience and can be time-consuming.
SUMMARYIntroduced here are techniques/technologies that allow a digital design system to extract articulated parts or segments of an animated character using a number of poses of the animated character provided on a sprite sheet. The digital design system uses two neural networks to identify candidate segments from the number of poses and an optimization algorithm to select segments from the candidate segments to generate a character rig of the animated character that can be used to produce animation.
In particular, in one or more embodiments, a digital design system can receive a sprite sheet including a plurality of images depicting an animated character in different poses as an input. The digital design system can then generate image pairs from the plurality of images and provide each image pair to a first machine learning model configured to determine pixel correspondences between pixels of the image pair. Using the pixel correspondence data, a second machine learning model can then determine pixel clusters, where each pixel cluster corresponds to a different segment of the animated character (e.g., head, torso, arms, etc.). The pixel clusters can be identified as candidate segments of the animated character. The digital design system then uses an optimization algorithm to determine which segments of the candidate segments should be selected as segments that, when formed into a character rig, can reproduce the different poses in the sprite sheet with minimal reconstruction error.
Additional features and advantages of exemplary embodiments of the present disclosure will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of such exemplary embodiments.
The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.
The detailed description is described with reference to the accompanying drawings in which:
One or more embodiments of the present disclosure include a digital design system that uses trained neural networks to select segments from a plurality of different poses of an animated character. Once selected, the segments can be used to generate a character rig capable of reproducing the plurality of different poses of the animated character with minimal reconstruction error. Character rigs, or rigged puppets, is one of the most prevalent representations to create two-dimensional character animations. Creating these character rigs requires partitioning animated characters into independently moving segments (e.g., head, torso, arm, leg, etc.), where the segments can be manipulated or deformed to create different poses and movement of the animated character.
One existing solution of creating character rigs involves an animator specifically defining the points and skeletal structure of the animated character. Another solution requires an animator to define segments of the character and the range of motions of each of the segments. Character rigs can also be created using sprite sheets that depict different poses and configurations of a character. The animators then manually segment out the common parts in the sprite sheet and digitally stitch them together to create the final character rig, which can then be articulated to reconstruct the poses in the sprite sheet. These solutions can be time-consuming and require significant skill or expertise, as they typically require a user to either manually segment out parts of an animated character or to create a full character rig, with knowledge and understanding of the range of motion of each segment.
To address these issues, the digital design system receives an input sprite sheet that includes a plurality of images of an animated character, where each of the plurality of images depicts the animated character in a different pose. The digital design system the generates images pairs from the sprite sheet image, where each image pair of image pairs includes a pair of different poses from the sprite sheet image. For example, where the image sprite sheet includes six different poses of the animated character, the digital design system can generate all unique pair combinations (e.g., fifteen image pairs). The image pairs are then passed to a correspondence module, a machine learning model trained to process each image pair separately to determine the pixel correspondences between pixels of the image pair based on comparing the motions of pixels in one image to the motions of pixels in other image in the image pair. For example, for each pixel in a first image of the image pair, the correspondence module predicts the closest pixel in the second image of the image pair, based on pixel features.
The digital design system then passes the pixel correspondence data to a clustering module, a second machine learning model trained to determine pixel clusters representing the animated character based on the determined pixel correspondences for an image pair. For example, the clustering module uses the pixel correspondence data between the first image and the second image of an image pair to determine segments of the animated character by grouping or clustering pixels with similar motion transformations. Each pixel cluster determined by the clustering module corresponds to a different structural segment of the animated character (e.g., head, torso, arm, leg, etc.). To efficiently process the pixel correspondence data, the clustering module uses a superpixel segmented version of the images in the image pair, where the pixels that are in a same superpixel share the same or similar motion transformations. This allows the clustering module to analyze fewer pixels to generate the clusters.
After processing each image pair separately through the correspondence module and the clustering module, the resulting output is a plurality of candidate segments for each of the image pairs. For example, the correspondence module and the clustering module can produce a head segment, a torso segment, arm segments, and leg segments as the candidate segments for each image pair. The digital design system then selects a subset of segments from the plurality of candidate segments that best reconstruct the poses in the input sprite sheet image with minimal reconstruction error, while also having a minimum overlap with each other. The subset of segments can then be used to create a rigged animated character that can be manipulated to produce animation of the rigged animated character.
The embodiments described herein provide a significant increase in speed and scalability. For example, by learning on training sprite sheets, the digital design system described herein is trained to determine how to predict corresponding pixels of an animated character in different poses, predict which pixels of an animated character have similar transformations, indicating that they are pixels from a same segment of the animated character, and using an optimization algorithm select the segments that best reconstruct the poses in the sprite sheet. These selected segments can then be used to create the character rig for the animated character.
As illustrated in
In one or more embodiments, the image processing module 108 generates images pairs 110, at numeral 4. Each image pair of image pairs 110 includes a pair of different poses from the sprite sheet image. In some embodiments, the image processing module 108 generates all possible pair combinations from the poses in the sprite sheet image. For example, given a sprite sheet image that includes eight images of an animated character in a plurality of different poses, the image processing module 108 generates 28 different pairs of poses as image pairs 110. In other embodiments, the image processing module 108 generates less than all possible pair combinations. After the image processing module 108 generates images pairs 110, the images pairs 110 are sent to a correspondence module 112, as shown at numeral 5.
In one or more embodiments, the correspondence module 112 determines the pixel correspondence data 114 for each pair of the image pairs 110, at numeral 6. In one or more embodiments, the correspondence module 112 is a trained neural network. In one or more embodiments, a neural network includes deep learning architecture for learning representations of images. A neural network may include a machine-learning model that can be tuned (e.g., trained) based on training input to approximate unknown functions. In particular, a neural network can include a model of interconnected digital neurons that communicate and learn to approximate complex functions and generate outputs based on a plurality of inputs provided to the model. For instance, the neural network includes one or more machine learning algorithms. In other words, a neural network is an algorithm that implements deep learning techniques, i.e., machine learning that utilizes a set of algorithms to attempt to model high-level abstractions in data.
In one or more embodiments, pixel correspondence data 114 determined by the correspondence module 112 captures the candidate motions of pixels from a first image (e.g., a source image, Is) to a second image (e.g., a target image, It) of an image pair. In one or more embodiments, given a pair of images Is, It and corresponding binary foreground masks Ms, Mt from the image pairs 110, the correspondence module 112 predicts the candidate motion mapping of foreground pixels between the two images in an image pair. For example, for each pixel in the first image, the correspondence module 112 predicts the closest pixels in the second image, based on pixel features. In some embodiment, the correspondence module 112 first concatenates each input image and masks and transforms them into a feature map, Fs∈H×W×64, using a convnet. In one embodiment, the neural network of the correspondence module 112 follows a U-Net architecture and includes ten convolutional layers in its encoder and another ten layers in its decoder. The convolutional layers in the encoder implement gated convolution, which offers a gating mechanism such that the background pixels indicated by the masks are prevented from influencing the foreground pixel correspondences. The feature vector of each pixel is further normalized according to its L2 norm to acquire a unit-length feature vector.
For each foreground pixel x=(x, y) in the first image Is, a corresponding pixel x′=(x′, y′) in the second image It can be identified as the pixel with the most similar features, based on feature vectors, in terms of cosine similarity, using the following:
The correspondence module 112 repeats this process for each pixel in the first image of an image pair to generate the pixel correspondence data 114 for that image pair.
Returning to
In one or more embodiments, because gathering votes from correspondences of all possible pixel pairs can be computationally and resource intensive, and because pixel pairs that are a large distance apart are more likely to be from different segments, the clustering module 116 may not select all possible pixel pairs as the voting pairs. For example, to accelerate the computation, instead of gathering votes from correspondences of all possible pixel pairs, the clustering module 116 uses a superpixel segmented version of the images. In one or more embodiments, the superpixel segmented versions of the images can be provided in the input 200. In other embodiments, they can be generated by the digital design system 102 (e.g., by the image processing module 108 or by another module). In either embodiment, a superpixel segmentation algorithm that groups pixels into regions can be used to generate the superpixel segmented versions of the images. Continuing the example in
In one or more embodiments, to extract the rotation from corresponding pairs of pixels (e.g., the voting pairs), the clustering module 116 uses a convnet approach that learns to estimate the transformations from approximate correspondences. The input to the clustering module 116 is a map storing the voting pairs. Specifically, for each first image pixel x1, the clustering module 116 stores the 2D vector x1−xc, representing its relative position with respect to its superpixel centroid xc, and also the corresponding 2D vector x′1−x′c, representing the relative position of corresponding second image pixel x′1 with respect to its superpixel centroid x′c. This results in an H×W×4 input voting map. Pixels without any correspondences can be indicated by an additional binary mask. The voting map and binary mask map are processed through a U-Net backbone and gated convolutions similar to the convnet of the correspondence module 112. The output is an H×W×64 feature map representing motion features per pixel in the first image. Average pooling is spatially applied over each superpixel area to acquire motion feature K
In one or more embodiments, to extract the translation from corresponding pairs of pixels (e.g., the voting pairs), the clustering module 116 uses the same network architecture and process used to extract the rotation, as described above. In one or more embodiments, the voting pairs used to extract the translation are modified to remove the rotation component. In some embodiments, the rotation component can removed by multiplying the rotation matrix to the coordinates of the pixels in the corresponding superpixel. In such embodiments, after removing the rotation component from the voting pairs, the remaining transformation from x1−xc to x′1−x′c, will be mostly translation-related. The output of the translation extraction process is a translation matrix.
Given extracted rotation and translation matrices for each superpixel, the clustering module 116 then determines their motion similarity, or affinity. In one or more embodiments, the affinity can be computed based on motion residuals. The clustering module 116 applies the estimated rotation and translation of each superpixel to transform all other superpixels and computes the position difference between the transformed superpixels and their corresponding superpixels. For example, given a superpixel pi, with an estimated rotation matrix Rs[i] and translation matrix ts[i], the motion residual for the superpixel pj can be represented as:
where |pj| is the number of pixels in the superpixel pj. The motion residual matrix Ds∈K
Continuing the example of
Returning to
In one or more embodiments, using the above, the number of the selected segments 122 can be minimized. The above integer linear programming problem can be solved through relaxation. This yields a continuous linear programming problem solved using the interior point method. A randomized-rounding algorithm is then applied to convert the continuous result to the desired binary predictions. The randomized-rounding algorithm can provide multiple possible solutions. The quality of the multiple solutions can be measured by deforming the selected segments in each solution to best reconstruct all the given poses in the input 100. In one or more embodiments, the deformation is based on as-rigid-as-possible (ARAP) surface modeling. The solution with the smallest reconstruction error can then be selected as the selected segments 122.
Returning to
As shown in
In one or more embodiments, the digital design system 102 includes an input analyzer 104 that receives the training input 500. In some embodiments, the input analyzer 104 analyzes the training input 500, at numeral 2. In some embodiments, the input analyzer 104 analyzes the training input 500 to identify the training image pair 504 and the ground truth pixel correspondences 506 for the training image pair 504. In one or more embodiments, the input analyzer 104 sends the training image pair 504 to a correspondence module 112, as shown at numeral 3.
In one or more embodiments, the correspondence module 112 determines the pixel correspondence data 508 for the training image pair 504, at numeral 4. In one or more embodiments, the correspondence module 112 is a trained neural network. In one or more embodiments, a neural network includes deep learning architecture for learning representations of images. A neural network may include a machine-learning model that can be tuned (e.g., trained) based on training input to approximate unknown functions. In particular, a neural network can include a model of interconnected digital neurons that communicate and learn to approximate complex functions and generate outputs based on a plurality of inputs provided to the model. For instance, the neural network includes one or more machine learning algorithms. In other words, a neural network is an algorithm that implements deep learning techniques, i.e., machine learning that utilizes a set of algorithms to attempt to model high-level abstractions in data.
In one or more embodiments, pixel correspondence data 508 determined by the correspondence module 112 captures the candidate motions of pixels from a first image (e.g., a source image, Is) of the training image pair 504 to a second image (e.g., a target image, It) of the training image pair 504. In one or more embodiments, given a pair of images Is, It and corresponding binary foreground masks Ms, Mt from the training image pair 504, the correspondence module 112 predicts the candidate motion mapping of foreground pixels between the two images. For example, for each pixel in the first image, the correspondence module 112 predicts the closest pixels in the second image, based on pixel features. In some embodiment, the correspondence module 112 first concatenates each image of the training image pair 504 and masks and transforms them into a feature map, Fs∈H×W×64 using a convnet. In one embodiment, the neural network of the correspondence module 112 follows a U-Net architecture and includes ten convolutional layers in its encoder and another ten layers in its decoder. The convolutional layers in the encoder implement gated convolution, which offers a gating mechanism such that the background pixels indicated by the masks are prevented from influencing the foreground pixel correspondences. The feature vector of each pixel is further normalized according to its L2 norm to acquire a unit-length feature vector.
For each foreground pixel x=(x, y) in the first image I s of the training image pair 504, a corresponding pixel x′=(x′, y′) in the second image It of the training image pair 504 can be identified as the pixel with the most similar feature vector in terms of cosine similarity. In one or more embodiments, during training, the “arg max” of the cosine similarity equation, described with respect to
where U(x) represent the most similar target pose pixels to x using cosine similarity. The closest pixels are updated after each forward pass through the network.
In one or more embodiments, the correspondence module 112 sends the pixel correspondence data 508 to a loss function 510, as shown at numeral 5. The loss function 510 can also receive the ground truth pixel correspondences 506 (e.g., received in the training input 500), as shown at numeral 6. The loss function 510 uses the ground truth pixel correspondences 506 and the pixel correspondence data 508 to calculate a loss, at numeral 7. In one or more embodiments, the correspondence module 112 is trained through a contrastive learning approach with the supervision of the pixel correspondences from the pixel correspondence data 508. Specifically, given a pair of input images Is, It, the InfoNCE loss is minimized to encourage the representation of ground-truth corresponding pixel pairs (x, x′) (e.g., from the ground truth pixel correspondences 506) to be more similar than non-corresponding pixel pairs using the following equation:
where Ut is a predefined number of pixels randomly sampled from the foreground region of the image It indicated by its mask Mt. In one or more embodiments, the value of Ut is set to 1024. The temperature τ is used to scale the cosine similarities. In some embodiment, the value of τ is initially set as 0.07, and is learned simultaneously as the correspondence module 112 is trained. In one or more embodiments, the total correspondence loss, Lc, is averaged over corresponding pairs of pixels from the pixel correspondence data 508 over a plurality of training pairs. The loss calculated using the loss function 510 can then be backpropagated to the correspondence module 112, as shown at numeral 8.
As shown in
In one or more embodiments, the digital design system 102 includes an input analyzer 104 that receives the training input 600. In some embodiments, the input analyzer 104 analyzes the training input 600, at numeral 2. In some embodiments, the input analyzer 104 analyzes the training input 600 to identify the training pixel correspondence data 604 and the ground truth candidate segments 606 corresponding to the training pixel correspondence data 604. In one or more embodiments, the input analyzer 104 sends the training pixel correspondence data 604 to a clustering module 116, as shown at numeral 3.
In one or more embodiments, using the training pixel correspondence data 604, the clustering module 116 determines pixels with similar motion patterns and groups them into a set of candidate articulating parts or segments (e.g., training candidate segments 608), at numeral 4. In one or more embodiments, the clustering module 116 is a trained neural network. In one or more embodiments, a neural network includes deep learning architecture for learning representations of images. A neural network may include a machine-learning model that can be tuned (e.g., trained) based on training input to approximate unknown functions. In particular, a neural network can include a model of interconnected digital neurons that communicate and learn to approximate complex functions and generate outputs based on a plurality of inputs provided to the model. For instance, the neural network includes one or more machine learning algorithms. In other words, a neural network is an algorithm that implements deep learning techniques, i.e., machine learning that utilizes a set of algorithms to attempt to model high-level abstractions in data.
In one or more embodiments, using the training pixel correspondence data 604, the clustering module 116 gathers votes for two types of transformations, two-dimensional rotation and translation, from pairs of corresponding points (x1, x′1) and (x2, x′2), where x1 and x2 are pixels in a first training image of a training pair, and x′1 and x′2 are their correspondences in a second training image of the training pair. In some embodiments, because gathering votes from correspondences of all possible pixel pairs can be computationally expensive and because pixel pairs that are a large distance apart are more likely to be from different segments, the clustering module 116 may not select all possible pixel pairs as the voting pairs. For example, to accelerate the computation, instead of gathering votes from correspondences of all possible pixel pairs, the clustering module 116 uses a superpixel segmentation method or algorithm, which group pixels together into superpixel groups, where pixels within a same superpixel are assumed to share the same or similar motion transformations.
In one or more embodiments, the clustering module 116 extracts the rotation data and translation data from corresponding pairs of pixels (e.g., the voting pairs), as described with respect to
where |pj| is the number of pixels in the superpixel pj. The motion residual matrix Ds∈K
In one or more embodiments, the clustering module 116 sends the training candidate segments 608 to a loss function 610, as shown at numeral 5. The loss function 610 can also receive the ground truth candidate segments 606 (e.g., received in the training input 600), as shown at numeral 6. The loss function 610 uses the ground truth candidate segments 606 and the training candidate segments 608 to calculate a loss, at numeral 7. In one or more embodiments, the clustering module 116 is trained with the binary cross-entropy (BCE) loss over the supervision of ground-truth affinity matrix Asgt(i, j), with the following:
Ls(αff)=BCE(As, Asgt)
An additional loss on the motion residual matrix, Ds, can also be introduced to encourage consistent rigid transformation predictions across superpixels of the same segment, using the following:
where [·] is an indicator function.
A soft Intersection over Union (IoU) loss can also be adopted to push the clustering memberships of superpixels in matrix Gs to be as similar as possible to the clustering memberships of superpixels in the ground truth matrix, Gsgt, using the following:
where gc and gcgt represent the column of the Gs and Gsgt matrices, respectively, Csgt is the total number of parts in the ground-truth, and (c) represents the matched column index c of predicted cluster to the ground-truth cluster based on Hungarian matching. The losses calculated using the loss function 610 can then be backpropagated to the clustering module 116, as shown at numeral 8.
As illustrated in
As further illustrated in
As further illustrated in
As further illustrated in
As further illustrated in
As further illustrated in
As further illustrated in
As further illustrated in
Each of the components 702-716 of the digital design system 700 and their corresponding elements (as shown in
The components 702-716 and their corresponding elements can comprise software, hardware, or both. For example, the components 702-716 and their corresponding elements can comprise one or more instructions stored on a computer-readable storage medium and executable by processors of one or more computing devices. When executed by the one or more processors, the computer-executable instructions of the digital design system 700 can cause a client device and/or a server device to perform the methods described herein. Alternatively, the components 702-716 and their corresponding elements can comprise hardware, such as a special purpose processing device to perform a certain function or group of functions. Additionally, the components 702-716 and their corresponding elements can comprise a combination of computer-executable instructions and hardware.
Furthermore, the components 702-716 of the digital design system 700 may, for example, be implemented as one or more stand-alone applications, as one or more modules of an application, as one or more plug-ins, as one or more library functions or functions that may be called by other applications, and/or as a cloud-computing model. Thus, the components 702-716 of the digital design system 700 may be implemented as a stand-alone application, such as a desktop or mobile application. Furthermore, the components 702-716 of the digital design system 700 may be implemented as one or more web-based applications hosted on a remote server. Alternatively, or additionally, the components of the digital design system 700 may be implemented in a suit of mobile device applications or “apps.”
As shown in
As shown in
In one or more embodiments, the first machine learning model is trained to determine the pixel correspondences between the pixels of the pair of images includes generating a preprocessed image by concatenating a first image from the pair of images with a second image from the pair of images. The processing device then generates a feature map of the preprocessed image, where each feature vector of the generated feature map corresponds to a pixel of the preprocessed image. The feature vectors associated with pixels of the first image and the feature vectors associated with pixels of the second image can then be compared to identify the pixel correspondences between the pixels of the pair of images. In some embodiments, the digital design system identifies pixel correspondence using nearest neighbor matching to identify a first feature vector for a first pixel in the first image and a second feature vector for a second pixel in the second image that most closely match based on their corresponding features. In one or more embodiments, nearest neighbor matching is performed until all, or a subset of all, pixel correspondences are identified.
In one or more embodiments, the second machine learning model is trained to determine the pixel clusters representing the animated character based on the determined pixel correspondences between the pair of images. In one or more embodiments, the processing devices generates a first superpixel representation of the first image and a second superpixel representation of the second image. In some embodiments, the superpixels are determined using a superpixel segmentation method or algorithm, which group pixels together into superpixel groups, where pixels within a same superpixel are assumed to share the same or similar motion transformations.
The processing device then extracts rotation data and translation data for each superpixel. In one or more embodiments, extracting rotation data and translation data for each superpixel includes selecting pairs of pixel correspondences from the determined pixel correspondences, where each pair includes a first pixel in the first image and a corresponding second pixel in the second image. Position data is then determined for each pair of pixel correspondences, including position data associated with the first pixel in the first image and position data associated with the corresponding second pixel in the second image. The second machine learning model then extracts the rotation data and the translation data for the selected pairs of pixel correspondences. The processing device then averages the results for pairs of pixel correspondences associated with the same superpixel to generate the rotation data and the translation data for the superpixel.
The processing device then clusters pixels based on the extracted rotation data and the extracted translation data based on their motion similarity, or affinity. In one or more embodiments, the affinity can be computed based on motion residuals. In one or more embodiments, the processing device applies the extracted rotation data and the extracted translation data of a first superpixel to a second superpixel to create a transformed second superpixel, computes motion residue using first position data of pixels of the first superpixel and second position data of pixels of the transformed second superpixel, and then computes a superpixel affinity matrix using the computed motion residue. Spectral clustering can then be applied to the superpixel affinity matrix to obtain a cluster assignment for the first superpixel and the second superpixel.
As shown in
As shown in
As shown in
As shown in
As shown in
Although
Similarly, although the environment 1000 of
As illustrated in
Moreover, as illustrated in
In addition, the environment 1000 may also include one or more servers 1004. The one or more servers 1004 may generate, store, receive, and transmit any type of data, including input data 720 and training data 722 or other information. For example, a server 1004 may receive data from a client device, such as the client device 1006A, and send the data to another client device, such as the client device 1006B and/or 1006N. The server 1004 can also transmit electronic messages between one or more users of the environment 1000. In one example embodiment, the server 1004 is a data server. The server 1004 can also comprise a communication server or a web-hosting server. Additional details regarding the server 1004 will be discussed below with respect to
As mentioned, in one or more embodiments, the one or more servers 1004 can include or implement at least a portion of the digital design system 700. In particular, the digital design system 700 can comprise an application running on the one or more servers 1004 or a portion of the digital design system 700 can be downloaded from the one or more servers 1004. For example, the digital design system 700 can include a web hosting application that allows the client devices 1006A-1006N to interact with content hosted at the one or more servers 1004. To illustrate, in one or more embodiments of the environment 1000, one or more client devices 1006A-1006N can access a webpage supported by the one or more servers 1004. In particular, the client device 1006A can run a web application (e.g., a web browser) to allow a user to access, view, and/or interact with a webpage or website hosted at the one or more servers 1004.
Upon the client device 1006A accessing a webpage or other web application hosted at the one or more servers 1004, in one or more embodiments, the one or more servers 1004 can provide a user of the client device 1006A with an interface to provide inputs, including a sprite sheet. Upon receiving the sprite sheet, the one or more servers 1004 can automatically perform the methods and processes described above to extract articulated parts of an animated character from the sprite sheet.
As just described, the digital design system 700 may be implemented in whole, or in part, by the individual elements 1002-1008 of the environment 1000. It will be appreciated that although certain components of the digital design system 700 are described in the previous examples with regard to particular elements of the environment 1000, various alternative implementations are possible. For instance, in one or more embodiments, the digital design system 700 is implemented on any of the client devices 1006A-1006N. Similarly, in one or more embodiments, the digital design system 700 may be implemented on the one or more servers 1004. Moreover, different components and functions of the digital design system 700 may be implemented separately among client devices 1006A-1006N, the one or more servers 1004, and the network 1008.
Embodiments of the present disclosure may comprise or utilize a special purpose or general-purpose computer including computer hardware, such as, for example, one or more processors and system memory, as discussed in greater detail below. Embodiments within the scope of the present disclosure also include physical and other computer-readable media for carrying or storing computer-executable instructions and/or data structures. In particular, one or more of the processes described herein may be implemented at least in part as instructions embodied in a non-transitory computer-readable medium and executable by one or more computing devices (e.g., any of the media content access devices described herein). In general, a processor (e.g., a microprocessor) receives instructions, from a non-transitory computer-readable medium, (e.g., a memory, etc.), and executes those instructions, thereby performing one or more processes, including one or more of the processes described herein.
Computer-readable media can be any available media that can be accessed by a general purpose or special purpose computer system. Computer-readable media that store computer-executable instructions are non-transitory computer-readable storage media (devices). Computer-readable media that carry computer-executable instructions are transmission media. Thus, by way of example, and not limitation, embodiments of the disclosure can comprise at least two distinctly different kinds of computer-readable media: non-transitory computer-readable storage media (devices) and transmission media.
Non-transitory computer-readable storage media (devices) includes RAM, ROM, EEPROM, CD-ROM, solid state drives (“SSDs”) (e.g., based on RAM), Flash memory, phase-change memory (“PCM”), other types of memory, other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store desired program code means in the form of computer-executable instructions or data structures and which can be accessed by a general purpose or special purpose computer.
A “network” is defined as one or more data links that enable the transport of electronic data between computer systems and/or modules and/or other electronic devices. When information is transferred or provided over a network or another communications connection (either hardwired, wireless, or a combination of hardwired or wireless) to a computer, the computer properly views the connection as a transmission medium. Transmissions media can include a network and/or data links which can be used to carry desired program code means in the form of computer-executable instructions or data structures and which can be accessed by a general purpose or special purpose computer. Combinations of the above should also be included within the scope of computer-readable media.
Further, upon reaching various computer system components, program code means in the form of computer-executable instructions or data structures can be transferred automatically from transmission media to non-transitory computer-readable storage media (devices) (or vice versa). For example, computer-executable instructions or data structures received over a network or data link can be buffered in RAM within a network interface module (e.g., a “NIC”), and then eventually transferred to computer system RAM and/or to less volatile computer storage media (devices) at a computer system. Thus, it should be understood that non-transitory computer-readable storage media (devices) can be included in computer system components that also (or even primarily) utilize transmission media.
Computer-executable instructions comprise, for example, instructions and data which, when executed at a processor, cause a general-purpose computer, special purpose computer, or special purpose processing device to perform a certain function or group of functions. In some embodiments, computer-executable instructions are executed on a general-purpose computer to turn the general-purpose computer into a special purpose computer implementing elements of the disclosure. The computer executable instructions may be, for example, binaries, intermediate format instructions such as assembly language, or even source code. Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the described features or acts described above. Rather, the described features and acts are disclosed as example forms of implementing the claims.
Those skilled in the art will appreciate that the disclosure may be practiced in network computing environments with many types of computer system configurations, including, personal computers, desktop computers, laptop computers, message processors, hand-held devices, multi-processor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, mobile telephones, PDAs, tablets, pagers, routers, switches, and the like. The disclosure may also be practiced in distributed system environments where local and remote computer systems, which are linked (either by hardwired data links, wireless data links, or by a combination of hardwired and wireless data links) through a network, both perform tasks. In a distributed system environment, program modules may be located in both local and remote memory storage devices.
Embodiments of the present disclosure can also be implemented in cloud computing environments. In this description, “cloud computing” is defined as a model for enabling on-demand network access to a shared pool of configurable computing resources. For example, cloud computing can be employed in the marketplace to offer ubiquitous and convenient on-demand access to the shared pool of configurable computing resources. The shared pool of configurable computing resources can be rapidly provisioned via virtualization and released with low management effort or service provider interaction, and then scaled accordingly.
A cloud-computing model can be composed of various characteristics such as, for example, on-demand self-service, broad network access, resource pooling, rapid elasticity, measured service, and so forth. A cloud-computing model can also expose various service models, such as, for example, Software as a Service (“SaaS”), Platform as a Service (“PaaS”), and Infrastructure as a Service (“IaaS”). A cloud-computing model can also be deployed using different deployment models such as private cloud, community cloud, public cloud, hybrid cloud, and so forth. In this description and in the claims, a “cloud-computing environment” is an environment in which cloud computing is employed.
In particular embodiments, processor(s) 1102 includes hardware for executing instructions, such as those making up a computer program. As an example, and not by way of limitation, to execute instructions, processor(s) 1102 may retrieve (or fetch) the instructions from an internal register, an internal cache, memory 1104, or a storage device 1108 and decode and execute them. In various embodiments, the processor(s) 1102 may include one or more central processing units (CPUs), graphics processing units (GPUs), field programmable gate arrays (FPGAs), systems on chip (SoC), or other processor(s) or combinations of processors.
The computing device 1100 includes memory 1104, which is coupled to the processor(s) 1102. The memory 1104 may be used for storing data, metadata, and programs for execution by the processor(s). The memory 1104 may include one or more of volatile and non-volatile memories, such as Random Access Memory (“RAM”), Read Only Memory (“ROM”), a solid state disk (“SSD”), Flash, Phase Change Memory (“PCM”), or other types of data storage. The memory 1104 may be internal or distributed memory.
The computing device 1100 can further include one or more communication interfaces 1106. A communication interface 1106 can include hardware, software, or both. The communication interface 1106 can provide one or more interfaces for communication (such as, for example, packet-based communication) between the computing device and one or more other computing devices 1100 or one or more networks. As an example, and not by way of limitation, communication interface 1106 may include a network interface controller (NIC) or network adapter for communicating with an Ethernet or other wire-based network or a wireless NIC (WNIC) or wireless adapter for communicating with a wireless network, such as a WI-FI. The computing device 1100 can further include a bus 1112. The bus 1112 can comprise hardware, software, or both that couples components of computing device 1100 to each other.
The computing device 1100 includes a storage device 1108 includes storage for storing data or instructions. As an example, and not by way of limitation, storage device 1108 can comprise a non-transitory storage medium described above. The storage device 1108 may include a hard disk drive (HDD), flash memory, a Universal Serial Bus (USB) drive or a combination these or other storage devices. The computing device 1100 also includes one or more I/0 devices/interfaces 1110, which are provided to allow a user to provide input to (such as user strokes), receive output from, and otherwise transfer data to and from the computing device 1100. These I/0 devices/interfaces 1110 may include a mouse, keypad or a keyboard, a touch screen, camera, optical scanner, network interface, modem, other known I/O devices or a combination of such I/O devices/interfaces 1110. The touch screen may be activated with a stylus or a finger.
The I/O devices/interfaces 1110 may include one or more devices for presenting output to a user, including, but not limited to, a graphics engine, a display (e.g., a display screen), one or more output drivers (e.g., display drivers), one or more audio speakers, and one or more audio drivers. In certain embodiments, I/O devices/interfaces 1110 is configured to provide graphical data to a display for presentation to a user. The graphical data may be representative of one or more graphical user interfaces and/or any other graphical content as may serve a particular implementation.
In the foregoing specification, embodiments have been described with reference to specific exemplary embodiments thereof. Various embodiments are described with reference to details discussed herein, and the accompanying drawings illustrate the various embodiments. The description above and drawings are illustrative of one or more embodiments and are not to be construed as limiting. Numerous specific details are described to provide a thorough understanding of various embodiments.
Embodiments may include other specific forms without departing from its spirit or essential characteristics. The described embodiments are to be considered in all respects only as illustrative and not restrictive. For example, the methods described herein may be performed with less or more steps/acts or the steps/acts may be performed in differing orders. Additionally, the steps/acts described herein may be repeated or performed in parallel with one another or in parallel with different instances of the same or similar steps/acts. The scope of the invention is, therefore, indicated by the appended claims rather than by the foregoing description. All changes that come within the meaning and range of equivalency of the claims are to be embraced within their scope.
In the various embodiments described above, unless specifically noted otherwise, disjunctive language such as the phrase “at least one of A, B, or C,” is intended to be understood to mean either A, B, or C, or any combination thereof (e.g., A, B, and/or C). As such, disjunctive language is not intended to, nor should it be understood to, imply that a given embodiment requires at least one of A, at least one of B, or at least one of C to each be present.
Claims
1. A method comprising:
- receiving, by a processing device, an input including a plurality of images depicting an animated character in different poses;
- for each pair of images in the plurality of images, determining, by a first machine learning model, pixel correspondences between pixels of the pair of images, and determining, by a second machine learning model, pixel clusters representing the animated character based on the determined pixel correspondences between the pair of images, each pixel cluster of the pixel clusters corresponding to a different structural segment of the animated character;
- selecting a subset of clusters from the determined pixel clusters that reconstructs the different poses of the animated character; and
- creating a rigged animated character based on the selected subset of clusters.
2. The method of claim 1, wherein determining pixel correspondences between the pixels of the pair of images comprises:
- generating a preprocessed image by concatenating a first image from the pair of images with a second image from the pair of images;
- generating a feature map of the preprocessed image, wherein each feature vector of the generated feature map corresponds to a pixel of the preprocessed image; and
- identifying the pixel correspondences between the pixels of the pair of images based on comparing feature vectors associated with pixels of the first image with feature vectors associated with pixels of the second image.
3. The method of claim 2, wherein identifying the pixel correspondences between the pixels of the pair of images further comprises:
- using nearest neighbor matching to identify a first feature vector for a first pixel in the first image and a second feature vector for a second pixel in the second image.
4. The method of claim 2, wherein determining pixel clusters representing the animated character based on the determined pixel correspondences between the pair of images comprises:
- generating a first superpixel representation of the first image and a second superpixel representation of the second image, wherein the pixels associated with a superpixel have similar features;
- extracting rotation data and translation data for each superpixel; and
- clustering pixels based on the extracted rotation data and the extracted translation data.
5. The method of claim 4, extracting the rotation data and the translation data for each superpixel further comprises:
- selecting pairs of pixel correspondences from the determined pixel correspondences, each pair including a first pixel in the first image and a corresponding second pixel in the second image;
- determining position data for each pair of pixel correspondences, including position data associated with the first pixel in the first image and position data associated with the corresponding second pixel in the second image; and
- providing the position data to the second machine learning model to extract the rotation data and the translation data for the selected pairs of pixel correspondences.
6. The method of claim 5, further comprising:
- averaging results for pairs of pixel correspondences associated with a superpixel to generate the rotation data and the translation data for the superpixel.
7. The method of claim 5, wherein clustering pixels based on the extracted rotation data and the extracted translation data further comprises:
- applying the extracted rotation data and the extracted translation data of a first superpixel to a second superpixel to create a transformed second superpixel;
- computing motion residue using first position data of pixels of the first superpixel and second position data of pixels of the transformed second superpixel;
- computing a superpixel affinity matrix using the computed motion residue; and
- applying spectral clustering to the superpixel affinity matrix to obtain a cluster assignment for the first superpixel and the second superpixel.
8. The method of claim 1, wherein selecting a subset of clusters from the determined pixel clusters that reconstructs the different poses of the animated character further comprises:
- selecting a number of clusters that reconstructs the different poses of the animated character with a minimal reconstruction error.
9. The method of claim 1, wherein selecting the subset of clusters from the determined pixel clusters that reconstructs the different poses of the animated character further comprises: aggregating the determined pixel clusters for each pair of images in the plurality of images.
10. A non-transitory computer-readable storage medium storing executable instructions, which when executed by a processing device, cause the processing device to perform operations comprising:
- receiving, by a processing device, an input including a plurality of images depicting an animated character in different poses;
- for each pair of images in the plurality of images, determining, by a first machine learning model, pixel correspondences between pixels of the pair of images, and determining, by a second machine learning model, pixel clusters representing the animated character based on the determined pixel correspondences between the pair of images, each pixel cluster of the pixel clusters corresponding to a different structural segment of the animated character;
- selecting a subset of clusters from the determined pixel clusters that reconstructs the different poses of the animated character; and
- creating a rigged animated character based on the selected subset of clusters.
11. The non-transitory computer-readable storage medium of claim 10, wherein to determine pixel correspondences between the pixels of the pair of images the instructions further cause the processing device to perform operations comprising:
- generating a preprocessed image by concatenating a first image from the pair of images with a second image from the pair of images;
- generating a feature map of the preprocessed image, wherein each feature vector of the generated feature map corresponds to a pixel of the preprocessed image; and
- identifying the pixel correspondences between the pixels of the pair of images based on comparing feature vectors associated with pixels of the first image with feature vectors associated with pixels of the second image.
12. The non-transitory computer-readable storage medium of claim 11, wherein to identify the pixel correspondences between the pixels of the pair of images the instructions further cause the processing device to perform operations comprising:
- using nearest neighbor matching to identify a first feature vector for a first pixel in the first image and a second feature vector for a second pixel in the second image.
13. The non-transitory computer-readable storage medium of claim 11, wherein to determine pixel clusters representing the animated character based on the determined pixel correspondences between the pair of images the instructions further cause the processing device to perform operations comprising:
- generating a first superpixel representation of the first image and a second superpixel representation of the second image, wherein the pixels associated with a superpixel have similar features;
- extracting rotation data and translation data for each superpixel; and
- clustering pixels based on the extracted rotation data and the extracted translation data.
14. The non-transitory computer-readable storage medium of claim 13, wherein to extract the rotation data and the translation data for each superpixel the instructions further cause the processing device to perform operations comprising:
- selecting pairs of pixel correspondences from the determined pixel correspondences, each pair including a first pixel in the first image and a corresponding second pixel in the second image;
- determining position data for each pair of pixel correspondences, including position data associated with the first pixel in the first image and position data associated with the corresponding second pixel in the second image; and
- providing the position data to the second machine learning model to extract the rotation data and the translation data for the selected pairs of pixel correspondences.
15. The non-transitory computer-readable storage medium of claim 14, wherein to cluster the pixels based on the extracted rotation data and the extracted translation data the instructions further cause the processing device to perform operations comprising:
- applying the extracted rotation data and the extracted translation data of a first superpixel to a second superpixel to create a transformed second superpixel;
- computing motion residue using first position data of pixels of the first superpixel and second position data of pixels of the transformed second superpixel;
- computing a superpixel affinity matrix using the computed motion residue; and
- applying spectral clustering to the superpixel affinity matrix to obtain a cluster assignment for the first superpixel and the second superpixel.
16. The non-transitory computer-readable storage medium of claim 10, wherein to select a subset of clusters from the determined pixel clusters that reconstructs the different poses of the animated character the instructions further cause the processing device to perform operations comprising:
- selecting a number of clusters that reconstructs the different poses of the animated character with a minimal reconstruction error.
17. A system comprising:
- a memory component; and
- a processing device coupled to the memory component, the processing device to perform operations comprising: receiving a first training input including images representing different poses of an animated character and a second training input including pixel correspondences between pairs of poses of the different poses; training a first machine learning model based on the first training input to generate a trained first machine learning model to determine pixel correspondences between pixels of a pair of poses from the different poses; and training a second machine learning model based on the second training input to generate a trained second machine learning model to determine pixel clusters representing structural segments of the animated character.
18. The system of claim 17, wherein to generate the first machine learning model based on the first training input further the processing device further performs operations comprising:
- generating first training data from the first training input, the first training data including a training image pair, each image in the training image pair representing a different pose of the animated character.
19. The system of claim 17, wherein to train the first machine learning model based on the first training input the processing device further performs operations comprising:
- generating a preprocessed training image by concatenating a first image from a training image pair with a second image from the training image pair;
- generating a feature map of the preprocessed training image, wherein each feature vector of the generated feature map corresponds to a pixel of the preprocessed training image;
- identifying the pixel correspondences between the pixels of the training image pair based on comparing feature vectors associated with pixels of the first image with feature vectors associated with pixels of the second image; and
- training the first machine learning model by calculating a loss using the identified pixel correspondences with ground truth pixel correspondences.
20. The system of claim 17, wherein to train the second machine learning model based on the second training input the processing device further performs operations comprising:
- determining pixel clusters representing the animated character based on the pixel correspondences between a training image pair representing different poses of the animated character;
- determining the structural segments of the animated character based on the determined pixel clusters; and
- training the second machine learning model by calculating a loss using the determined structural segments of the animated character with ground truth structural segments of the animated character.
Type: Application
Filed: May 31, 2022
Publication Date: Jan 4, 2024
Inventors: Matthew David FISHER (San Carlos, CA), Zhan XU (Amherst, MA), Yang ZHOU (Sunnyvale, CA), Deepali ANEJA (Seattle, WA), Evangelos KALOGERAKIS (Amherst, MA)
Application Number: 17/829,120