LIGHTWEIGHT REAL-TIME FACIAL ALIGNMENT WITH POINT NEURAL ARCHITECTURE SEARCH
The use of point neural architecture search and expand and shrink training techniques compresses facial alignment networks, enabling real-time performance on edge devices with high accuracy and reduced model size.
Patent Information
- Application Number
- FR2022001813
- Authority / Receiving Office
- FR · FR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-03-02
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-03-02
AI Technical Summary
Existing facial alignment networks using convolutional neural networks (CNNs) achieve high accuracy but come with large model sizes and expensive computational costs, making them unsuitable for real-time applications on peripheral devices like smartphones and tablets.
A method involving point neural architecture search (NAS) is employed to compress the facial alignment network (FAN) model using expand and shrink training (EST) operations, which define candidate sub-models and perform an evolutionary search to select a lightweight FAN model that maintains performance criteria.
The compressed FAN model achieves state-of-the-art accuracy with a 30x smaller size and runs in real-time on devices like smartphones and tablets, demonstrating efficient training and deployment on edge devices.
Smart Images

Figure 00000026_0000 
Figure 00000027_0000 
Figure 00000028_0000
Abstract
Description
Description Title of the invention: REAL-TIME FACIAL ALIGNMENT LIGHTWEIGHT WITH ARCHITECTURAL RESEARCH Punctual Neuron Domain
[0001] — This application relates to the improvement of a computer processing, of a image processing, and neural networks for image processing and more specifically linking systems, processes and techniques for real-time facial alignment lightweight with point-based neural architecture (NAS) search. Context
[0002] = Face alignment is a popular computer visualization task that It locates facial landmarks on human faces. This technology is widely used as a building block in various types of industrial applications related to the face such as lc followed by face cn dircct, geometry estimation of three-dimensional (3D) face scanning and facial feature extraction. During the application of a model designed by artificial intelligence (AI) to an application In reality, the speed and accuracy of computer calculation represent the difficulties main ones due to limited resources on peripheral devices (for example personal computing devices including tablets and smartphones intelligents). Cloud computing provides a solution that can accelerate time of inference of an AI model while maintaining good accuracy, however, a Cloud-based solutions suffer from privacy and stability issues. Others solutions use manually designed models targeted at devices mobiles (Howard et al. 2017) (Sandler et al. 2019) to reduce computation time in- formatology, but these models do not produce sufficiently competent results in comparison with a carefully designed model that focuses solely on alignment of face.
[0003] Thus, with convolutional neural networks (CNNs), alignment networks facial (FAN) measurements achieved significant accuracy across a wide range of sets. of public data, accompanied by a larger model size and costs costly computer calculations, making them impossible to adapt to applications in real-time on peripheral devices. Summary
[0004] — With CNNs, facial alignment networks have achieved significant accuracy across a wide range of public datasets, accompanied by a size larger model sizes and high computing costs make them im- This approach is adaptable to real-time applications on peripheral devices. A model compression approach on a Fan-Assisted Network (FAN) using point-based neural network architecture (PAMA) search is proposed to overcome this problem while preserving performance criteria. Methods and devices ensure efficient training and search (on a single GPU), and resulting models can be deployed to run in real time in browser applications on peripheral devices including tablets and smartphones. The compressed models provide comparable peak accuracy while having a model size 30 times smaller and can run at 40.7 ms per frame in a popular browser on a popular smartphone and operating system. In one embodiment, a method is proposed defining a face alignment network (FAN) model, wherein the definition includes: the generation of a set of candidate submodels from a network structure by training the network structure using i) a training dataset; and ii) extension and shrink training (EST) operations, which EST operations define and retain instances of candidate submodels of various structure parameters with which to define the set of candidate submodels; and performing an evolutionary search of candidate submodels using speed and accuracy evaluation criteria to select the FAN model from among the candidate submodels. In one embodiment, the FAN model is defined for execution by a peripheral device in order to process facial images. In one embodiment, the EST operations initiate training from a previously defined base model in accordance with the network structure. In another embodiment, the EST operations use parameters pre-trained from the base model as partially trained parameters in each of the candidate submodels for further training using EST operations. In another embodiment, the candidate submodels are further trained for any one of the following: between 2 and 60 epochs; between 2 and 25 epochs; and 2 epochs. In one embodiment, the EST operations activate random subnetworks in each training iteration to train partial subnetwork weights integrally and to train weight sharing efficiently between submodels. In one embodiment, the EST operations define a search space for generating candidate submodels in accordance with a plurality of search dimensions including: a depth size; a kernel size; a channel ratio; and an extension ratio. In one embodiment, the EST operations are initiated with a small depth size, a small kernel size, a large channel ratio, and a large extension ratio. Then, in phases and in the following order, the operations gradually extend the depth size and kernel size to respective maxima and, in end phases, gradually shrink the channel ratio and extension ratio to respective minima. In one embodiment, the EST operations include kernel training operations in an early phase that train a first-size kernel and use the first-size kernel to subsequently train a second-size kernel, where the first-size kernel is a center of the second-size kernel. In one embodiment, the EST operations include depth training operations in an intermediate phase that train fewer layers, then gradually add larger layer options to the training. In one embodiment, the EST operations include channel ratio and extension ratio training operations that shrink the channel ratio and extension ratio respectively to final phases. In one embodiment, evolutionary search evaluates the base model to determine speed and accuracy criteria. In another embodiment, evolutionary search evolves from the base model to define a population of candidate submodels for further sampling and evaluation. In one embodiment, the evolutionary search: performs a plurality of cycles comprising: sampling from the population to select a quantity of candidate submodels; selecting the fastest submodel from the quantity; evolving the fastest submodel to determine an associated submodel; eliminating the oldest submodel from the population; and if the associated submodel satisfies a precision threshold test: adding the associated submodel to the population for availability for further sampling and adding the associated submodel to a final set of fastest candidate submodels; and following the performance of the plurality of cycles, selecting the fastest submodel from the final set of fastest candidate submodels as the FAN model. In one embodiment, evolutionary search: performs a plurality of cycles including: sampling from the population to select a quantity of candidate submodels; selecting the most accurate submodel from among the quantity; evolving the most accurate submodel to determine a submodel associated; the elimination of the oldest submodel from the population; and if the associated submodel satisfies a velocity threshold test: the addition of the associated submodel to the population for availability for further sampling and the addition of the associated submodel to a final set of most accurate candidate submodels; and following the completion of the plurality of cycles, selects the most accurate submodel from the final set of most accurate candidate submodels as the FAN model. In one embodiment, the network structure is a two-stage structure providing as output a Region of Interest (RoI) alignment layer to refine extracted features for prediction. In one embodiment, a first stage comprises four blocks and a second stage comprises one block, each block having a maximum of four layers, each including an inverted residual layer. In one embodiment, the method includes defining an application comprising the FAN model for execution by a peripheral device. In respective embodiments, the application is any one of: a makeup simulation application to simulate trying on makeup products on the face; a skin analysis application to analyze and score a region or regions of the face in terms of at least one skin sign; an effects simulation application to simulate a graphic effect associated with a region of the face; and a facial tracking application to track and indicate a location on a face. In one embodiment, the application is configured to process video using the FAN model. In one embodiment, the peripheral device is a smartphone or tablet, and the FAN model is configured for execution by a graphics processing unit (GPU). In one embodiment, the application is either a makeup simulation application or a skin analysis application, and it is configured to provide an interface to an e-commerce purchasing service for buying a product or service related to makeup and skin treatment, respectively. In one embodiment, the application is the makeup simulation application or the skin analysis application and the application is configured to provide an interface with an e-commerce recommendation service that reorders a product or service associated respectively with makeup and skin treatment. In one embodiment, a computer system is proposed comprising a processing unit coupled to a storage device that stores instructions, which, when executed by the processing unit, configure the system in- format to carry out a process according to any one of the process embodiments. In one embodiment, a computer program product is proposed comprising a non-transient storage device storing instructions and data defining a FAN model for execution by a processing unit of a computer device, the FAN model being defined in accordance with a method of any of the process embodiments. In one embodiment, a computer device is proposed comprising a processing unit coupled to a storage device storing instructions which, when executed by the processing unit, configure the computer device to provide a defined FAN model in accordance with a method of any of the process embodiments. Brief description of the drawings [Fig.1] The [Fig.1] is a simplified illustration of the two-stage CNN structure in accordance with one embodiment. [Fig.2A][Fig.2B][Fig.2C][Fig.2D][Fig.3] Figures 2A, 2B, 2C, 2D and 3 are functional diagrams that illustrate a comparison between one-for-all (OFA) training operations and extension and contraction (EST) training operations in accordance with an embodiment. [Fig.4A][Fig.4B][Fig.4C][Fig.4D] are graphs showing experimental results in accordance with embodiments. [Fig.5SA][Fig.5B] Figures 5A and 5B are graphs showing experimental results in accordance with embodiments. [Fig.6A][Fig.6B] Figures 6A and 6B are images illustrating dataset annotations. [Fig.7] The [Fig.7] is a drawing of a computer network showing a development computer device, a website computer device and peripheral computer devices, among others, in accordance with one embodiment. [Fig.8] The [Fig.8] is a drawing of a computer device, in accordance with an embodiment. [Fig.9] The [Fig.9] is an operational flowchart, in accordance with an implementation method. Detailed description Related works Facial landmark alignment The long history of face alignment begins with a classic computer visualization, the whole regression tree algorithm (Kazemi) and Sullivan (2014) provides a fast and sufficiently accurate solution for the early stages of real-time face tracking. These methods achieved reasonable results with extremely large model sizes. Recent CNN-based solutions for face alignment have achieved remarkable accuracy. Most studies use hourglass-shaped stacks of structures (Newell, Yang, and Deng 2016; Liu et al. 2019; Kowalski, Naruniec, and Trzcinski 2017) with thermal maps. These methods significantly improve the accuracy of the markers, while these cascaded structures remain bulky. Efficient models targeting mobile and embedded visualization applications such as MobileNet (Howard et al. 2017) and MobileNet V2 (Sandler et al. 2019) run easily and exhibit good performance. Accuracy and speed for FANs still need improvement. Neural architecture search Early work on NAS (Zoph and Le 2017) achieved significant improvements in classification task results but required over 1000 GPU days to perform the search. Given the search cost resulting from the repetitive training of sampled models, point-based NAS approaches (Liu, Simonyan, and Yang 2019; Cai et al. 2020) propose training a supermodel that covers all parameters of the sampled models. This reduces search time to less than 7 GPU days, making it practical for performing NAS in deployment scenarios. In addition to efficient searches for classification tasks, NAS processes are also suitable for object detection (Chen et al. 2019), segmentation (Nekrasov et al. 2019), and pose estimation (Yang, Yang, and Cui 2020). No work has been done on the crossover domain of NAS and FAN before, but it shares similarities with detection work (Chen et al. 2019) that investigates backbone and difficulties. Methods of implementation CNN model architecture In accordance with one embodiment, a two-stage CNN structure is used in a manner similar to that proposed by (Li et al, Lightweight Real-time Makeup Try-on in Mobile Browsers with Tiny CNN Models for Facial Tracking, 2019 available at URL arxiv.org / abs / 1906.02260, and filed under US patent application No. 16 / 854,993 on 22 / 04 / 2020, entitled CONVOLUTION NEURAL NETWORK BASED LANDMARK TRACKER). Figure 1 is a simplified illustration of the two-stage CNN structure. In accordance with one embodiment, the CNN 100 structure shows Stage 1 (102) and Stage 2 (104). Stage 1 is fed by a Backbone 106 and comprises four blocks (Block 1 (108A), Block 2 (108B), Block 3 (108C), and Block 4 (108D)). Stage 2 receives an output from Block 1. The CNN 100 structure uses a Region of Interest (RoJ) alignment layer 110 to extract features from the Stage 1 output in order to refine the features for prediction in 112. The CNN 100 structure also represents network outputs with heatmaps. In accordance with the embodiment, pixel-scale sigmoid cross-entropy and normal L2 loss are used (during model training) as suggested in the references. In accordance with the embodiment, the layers (for example, of the Dorsal, blocks 1 to 4 and the single block of stage 2) are inverted residual layers. With the following exceptions, the layers use a step size of 1 and maintain the same number of channels within a block: i) the Dorsal (106) layers are convolutional with s=2 in the first layer and c=16 in the second layer; ii) the first layer of Block 1 (108A) as=2 and c=24; the first layer of Block 2 (108B) as=2 and c=32; the first layer of Block 3 (108C) as=2 and c=64; the first layer of Block 4 (108D) as=1 and c=96; the first layer of stage 2 (104) as=1 and c=32 (where c denotes the channels and s denotes the step size). Search space In accordance with one embodiment, a model deployed according to the CNN 100 structure uses a portion of MobileNet V2 (Sandler et al. 2019) as its first layer. This deployed model is referred to as the base model in the following sections. One objective is to compress the model size of this base model by searching for similar structures. Therefore, inverted residual layers were used as the fundamental component of the model, as described with reference to [Fig. 1]. In accordance with some embodiments, a layer depth per block can be chosen from [2, 3, 4], the layer extension rate from [3, 5, 6], the kernel size from [3, 5], and the channel ratio to block scale from [0.7, 0.8, 0.9, 1.0]. This channel ratio, multiplied by the basic channel numbers, can add further variation to the search space. In total, a search space contains (((2 x 3)? + (2 x 3)?+ (2 x 3)#) x 4)5 = 9 x 10!5 different submodels. The largest submodel, obtained by selecting the largest option from each search dimension, is the supermodel. Every model sampled from this search space, including the base model, can be considered a subset of the supermodel. NAS punctual with extension / contraction training By selecting the maximum of each search dimension (described in the previous section), in accordance with one embodiment, the supermodel has 1.14M parameters. According to the point-based NAS training approach, the supermodel is trained only once (i.e., the supermodel is not retrained during a search phase), and its pre-trained weights are provided to the set of sampled models instead of training them from scratch. Sampled models here refer to the submodels generated during the initial training phase that are sampled during the search phase in accordance with the supermodel. Therefore, although the supermodel requires a longer training time (e.g., compared to a similarly structured model in more typical training approaches), once completed, the search time for each sampled model will be O(1) instead of O(N). Training the supermodel as a whole is a naive approach. It is simple, but the shared weights are not optimized for different submodels and are therefore not very promising (discussed below in relation to [Fig. 4C]). The weights are trained fully to allow the supermodel to function globally. In order to optimize all subnetworks simultaneously, a One-for-All (OFA, (Cai et al. 2020)) method is adapted, and a new Extend-and-Shrink (EST) training strategy is proposed, in accordance with an embodiment. While OFA and EST (as presented here) work to solve the same problem, namely making the weights in the supermodel function when they are only partially activated, EST shows improved results, as demonstrated. The following example illustrates the problem in a general and simplified way. Consider a supermodel with layers A, B, and C. We want to run not only the supermodel as a whole (i.e., ABC), but also the submodels AB and BC (partially). Both OFA and EST activate random subnetworks in each training iteration to train partial weights fully. Each targets how to efficiently train weight sharing between submodels, but using different approaches. Referring again to the layer ABC supermodel example: typical training trains ABC fully, meaning that all the parameters of ABC update simultaneously and in the same direction, which is based on the output of A->B->C-@.Therefore, fully partial weight training means that, for a submodel defined solely by the AB layers in the supermodel, these layers can be considered an independent model to be trained. Therefore, when training this submodel, only the AB weights are updated, and the update direction is based on the output of A->B-®. The C weights are still present (for example, in the supermodel), but are ignored (they are not activated), and the training target is limited to only A and B. A similar approach is adopted for the BC submodel, where only these layers are fully trained, with layer A being ignored. The OFA and EST approaches differ in the details of solving the aforementioned problem. Figures 2A, 2B, 2C, and 2D are functional diagrams that compare OFA and EST as follows: Figure 2A shows kernel training operations using OFA 200, in accordance with an example. Operations 200 first train a 5x5 kernel (202A), then apply a linear transformation to its 3x3 center to function as a 3x3 kernel (202B). Figure 2B shows kernel training operations using EST 202, in accordance with an example: Operations 202 are the inverse of Operations 200: in 202A, operations first train a 3x3 kernel, then consider it as the center of a 5x5 kernel to be trained (202B). Figure [Fig. 2C] shows depth training operations by OFA 204, in accordance with an example.Operations 204 first train all layers (204A), then progressively reduce (204B, 204C) the minimum layer option to allow more choices for smaller models; [Fig. 2D] shows depth training operations by EST 206, in accordance with an example. Operations 206 first train with fewer layers (206A), then gradually add larger layer options (206B) to the search space; and [Fig. 3] shows extension ratio and channel selection operations by EST 208, in accordance with an example: according to OFA, when the extension ratio is fixed and a choice must be made among C channels, then the highest-weighted channel C (L1 norm sum of channel-scale weights) will be selected. EST follows this procedure for extension ratios (208A, 208B), and further applies it to the block-wide channel ratio (208C). In summary, OFA tends to drive the largest layer weights first, then distribute the weights to drive smaller layers progressively. Conversely, EST gradually shrinks the layer size for both extension and channel ratios, but expands the search options for depth and core size. (The advantages of EST over OFA are shown with reference to Graphs 500 and 502 in Figures SA and 5B and described below.) Table 1 shows the five phases of EST, in accordance with one implementation mode. The search dimensions include depth (D), core (K), channel ratio (C), and extension ratio (E). Each of these dimensions extends or narrows its search scope accordingly to one of the five phases. The training order shown demonstrated better results than a different order. EST begins with a small depth and kernel size, and large channel-to-extension ratios. Then, EST gradually expands the depth and kernel to their maximum. In the final stages, EST progressively shrinks the channel-to-extension ratios to a minimum. Note that during the expansion and shrinking stages, search options from previous stages are maintained (e.g., expanding the submodel search space for use in a later search). Therefore, the activated (submodel) search space expands step by step as submodels are added using EST operations, and larger and smaller submodels created using EST operations are likely to be trained together. An additional example is helpful.In this example, we have a supermodel with four layers, ABCD, and for simplicity, the search space has only one search option: the number of layers. When there is only one option for the number of layers to choose from, for example, "4", the submodel will have exactly A layers, which is the supermodel itself with ABCD. When the search space is expanded by allowing "2, 3, 4" layers in the search options, then the submodels could be, for example, AB (2 layers), ABC (3 layers), ABCD (4 layers), and so on. Thus, if we allow more options... search (“2,3,4” versus “4”), the chances will be higher (more numerous) that larger models (e.g. ABCD) can be trained with smaller models (AB, ABC). [Table 1] + ee #8 (+ | |Base Extension of |Extension of |Narrowing |Narrowing depth |Extension channel core [pb 2.3 2.3.4 2.3.4 2.3.4 2.3.4 K 3 3 3.5 3.5 3.5 E 1 1 1 0.77 10 0.77 1.0 Table 1: Five phases of extension and contraction training. Performance evaluation and estimation In accordance with one embodiment, model compression is governed at least in part by deployment scenarios, and consequently both model accuracy and speed are evaluated. A complete evaluation with an en- Training from scratch and running on peripheral devices is expensive. To reduce the evaluation cost, in one embodiment, estimators are implemented to predict performance. They must provide consistent performance rankings, as in exhaustive evaluations. In one embodiment, speed (time) estimation uses estimators developed to utilize FLOPS, Params, and Memory Read & Write. (Accuracy is illustrated with reference to graphs 400, 402, 404, and 406 in Figures 4A, 4B, 4C, and 4D and described below.) For accuracy estimation, instead of training a fully sampled model from scratch for N epochs, in one embodiment, considerable use is made of EST operations. With EST, in one embodiment, partial weights of the supermodel are loaded into submodels, and the submodels are trained for rapid convergence. As also shown below and with reference to Figures 4A to 4D, for a child sampled from the search space, loading the corresponding weights from the supermodel and training it for 2 epochs is sufficient to give an accurate estimate. This guarantees an evaluation cost of O(1) rather than O(N). Evolutionary research After extension and contraction training, an evolutionary search (ES) is performed on the search space. According to one embodiment, details of an evolutionary search are shown with the provision of pseudocode for an algorithm. Unlike basic ES (Real et al. 2019), chidacs and childams are both used for evaluation and identification search. Algorithm! Evolutionary search 1: arguments: basic model Æ relative precision threshold 7 initial population / _. evolution over © eycles, F echantiMans per yocle 3: Population, Historical, + Empty Waiting Island, To B 8.5 H, 0° ESTIMATORS "F 4: precision threshold 7. = 861 & while | Pupnelanion | <P 2 donne ë enfant chkf — EVOLUTIHON(SY chi shit. — tempting ESTIMATOR} $ = chi child 7 ESTIMATOR tenfme) sl, © chiké,… then adding chôfe to your right of poneletion 18: Added child to History $i: end if 12: end while 13: tandie ) hismarique | < € gives eu EE CE GES DE LARES 14: Ecnidfidais + SAMPLING (pormlation, S3 is: perest « fastest mod of the cœrdiders is Entfunt ch — EVOLUTION (parent fn ehitd_, chäd___— ESTIMATOR tenfann 15: ehiid_, child, + ES siF,_< child then 3rd: addition of chrdd to fr end of population 28 added to history Is fin si little elements of the model you pins also of the sauclte of dads 32: end while 38: Fastest model return in history The algorithm | shows the case of a speed search, which samples models with an accuracy threshold and sorts the fastest candidates; if a speed threshold is to be used instead, the size of the sampled models can be compressed and the most accurate ones can be searched for. Namely, while a loop from lines 13 to 23, parented in line 15, would be the most accurate model among the candidates, line 18 would compare speed values, and at the terminal line 24, the most accurate model would be returned from the ensemble history comprising the most accurate model candidates generated from loop lines 13 to 23. Another difference, in one embodiment, is the generation of an initial population, whose search begins by evolving from the base instead of random sampling (e.g., via an EVOLVE function in line 16).Further evolution is carried out on the fastest sub-models (in one embodiment) which have been evolved from the base. In the EVOLVE function, a random character is used to select different submodels from the search space. (Just as a mother can Giving birth to different offspring, the evolution of a baseline model also results in different child models. In fact, the probability of two child models evolving identically is equivalent to that of a mother giving birth to twins. Due to the deployment objective, research targets models with both greater efficiency and higher accuracy. If random sampling was used, it is difficult to order model sizes and fairly compare accuracy with the baseline. Dataset An internal dataset (referred to as the "Modi dataset") contains 3,681 images in total. The Modi dataset has 62 internal points defining regions within the face and 3 contour points for each face. For application scenarios, poses are distributed from -30° to 30°. In one implementation mode, the ESTNet model is trained separately on the 300W dataset (Sagonas et al. 2013) to conduct a fair comparison with state-of-the-art methods. The difference between the annotations of the Modi and 300W datasets is shown in images 600 and 602 of Figures 6A and 6B. Results and ablation studies Training and research There are previously mentioned differences between the original OFA and EST techniques, as disclosed here. The following results show that EST expands the workload much better than OFA shrinks the depth and kernel in the FAN search space. In [Fig. 5A] (graph 500), with training at depths of [2, 3] and then [2, 3, 4], the error drops to 0.031, while the error remains high with training starting from the entire [4] layer initially. In [Fig. 5B] (graph 502), training begins with a kernel size of 3 or 5, and the learning rate is adjusted for the transformation matrices. The shrinkage experiments cluster at a much higher error rate. As mentioned, experiments were conducted to validate performance estimators. Seventeen randomly sampled models were evaluated in terms of actual performance, and their performance ranking was compared to the estimates. The sample Pearson correlation coefficient (Freedman, Pisani, and Purves 2007) in Equation 1 is applied to assess the consistency between estimates and actual evaluations. t1) And: — AXIS; = M JE 0 - XF ET te, — PF In [Fig. 4A], graph 400 shows the effective inference time, and in [Fig. 4B], graph 402 shows the time estimate obtained by a weighted average of FLOPS, Params, and Memory Read & Write. Using equation 1, we obtain a strong correlation of 0.677, which validates the estimator. Figures 404 and 406 in Figures 4C and 4D compare two supermodel training strategies: naive training and extension-and-contraction training. In Figure 4C, the models are loaded with naively pre-trained weights and trained for 2 and 25 epochs. The accuracy ranking correlation after adapting for different epochs is only 0.151. Therefore, the naive approach does not provide a good accuracy estimate. Conversely, [Fig. 4D] uses the pre-trained supermodel based on the extension and contraction training strategy described above. The same models are trained for 2, 25, and 60 epochs, and the consistency of model accuracy rankings is very strong: the correlation coefficients for (2, 25), (25, 60), and (2, 60) are 0.667, 0.916, and 0.819, respectively. This demonstrates the effectiveness of EST and that model adaptation for two epochs is sufficient to estimate accuracy performance. Compared to the naive approach, EST provides a much better accuracy estimate without spending significantly more time. In a Tesla™ V-100 (a Tensor Core GPU from NVIDIA Corporation, Santa Clara, California), the stretch-and-short training takes 40 hours, while the naive training also takes 36 hours to complete. In summary, this section demonstrates the effectiveness of both time and accuracy estimators. It also shows the advantages of EST over the naive approach. Research results The search results according to the respective embodiments are shown in Table 2 and Table 3. `a` is a parameter multiplied by the number of channels to be customized for datasets of varying complexities. The Modi dataset uses `a` = 0:5; the 300W dataset has more data, so `a` = 1:0 is used. All errors calculated in this section are calculated by mean error with interpupillary distance normalization. In one embodiment, the operations perform a search on the Modi dataset and obtain a best result, denoted ESTNet in Table 2. Its error Its internal and contour error on the test set are lower than the baseline model, and its model size is only 75% of the baseline. On different peripheral devices, ESTNet is better in both accuracy and speed. [Tables 2] |Error Base ESTNet (at = 0:5) | (a = 0:5) Internal error | 3.14 3.10 Outline error 8.11 7.94 Model size Params 0.221M 0.179M MemR+W 126.30MB |89.06MB FLOPS 91.87M 91.87M IPhone 11 28.42 26.97 n [Intel CoreiS |50.45 47.56 Chrome inference time (ms) Table 2: Results on the Modi dataset with 65 points In one embodiment, separate operations train the ESTNet on the 300W dataset to evaluate its robustness and generality. As shown in Table 3, its result is compared to the baseline and prior art Look-at-Boundary (LAB, (Wu et al. 2018)). 8-stack LAB parameters and FLOPS are obtained from (Zhu et al. 2020). The 4-stack result is estimated by dividing by two. The ESTNet outperforms the baseline on all common, complex, and total validation datasets while reducing the model parameters by 25%. It also exhibits comparable results with LAB. ESTNet runs at 40.7 ms per frame in Chrome on iPhone 11 (trademarks of Apple Inc., Cupertino, California), i.e., in real time. Since LAB has 29.2 times more parameters and 50.2 times more FLOPS than ESTNet, LAB cannot run in real time, which is an advantage of the compressed ESTNet model. [Tables 3] EESTNet LAB base (a=1:0) |(à=1:0) 4 stacks 4.34 4.15 4.20 8.21 8.10 7.41 5.24 5.01 4.92 Common subset Complex subset Total validation set Params FLOPS 0.71M 0.53M 16.03M* 380.73M _|278.80M 14292M* Table 3: Results on the 300W dataset with 68 points Thus, as the embodiments show, EST techniques, devices, and a method are proposed to develop a FAN model that runs in real time, such as via a website (e.g., a web browser application) on specific devices. Web browser applications are typically more limited than native (non-browser) applications. Web browser applications are commonly offered as a user-friendly web browser distribution method and may be preferred by users compared to obtaining and installing a native application, such as through an application distribution service (e.g., an app store). Peripheral devices capable of running the FAN model include smartphones and tablets running common browsers and operating systems (e.g., devices, browsers, and operating systems from Apple Inc., Cupertino, California). In a real-world model generated using the EST techniques described here, peak accuracy is achieved with a model size 30 times smaller and a 40.7 ms execution time in Chrome on iPhone 11. Figure 7 is a drawing of a computer network 700 showing a development computer device 702, a website computer device 704, an application distribution computer device 706, and respective peripheral computer devices, namely a smartphone 708 and a tablet 710, in accordance with one embodiment. The computer devices are coupled via a communications network 712. The computer network 700 is simplified. For example, the website computer device 704 and the application distribution computer device 706 are shown in Figure 702. Application distribution systems (706) are examples of respective website and application distribution system devices. Communication networks (712) can comprise a plurality of wired and / or wireless networks, which may include private and public networks. In this embodiment, the development computing device 702 is coupled to a data store 714 (which may include a database) storing one or more datasets for training and testing network models. The data store 714 may store software, other components, tools, etc., to facilitate development and implementation. In another embodiment, not shown, the datasets are stored on a storage device of the development computing device 702. The development computing device 702 is configured to define a FAN model 716 in accordance with one or more of the embodiments described herein.For example, the 702 development computing device is configured to generate a set of candidate models from a network structure by training the network structure using i) a training dataset; and ii) expand-and-shrink (EST) training operations. The EST operations define and retain candidate model instances with various structure parameters to define the set of candidate models. The development computing device also performs an evolutionary search of candidate models using speed and accuracy evaluation criteria to select the FAN model from among the candidate models. The development computing device 702 defines the FAN model to be executed on peripheral devices such as a smartphone 708 and a tablet 710. The development computing device 702 (or another, not shown) incorporates the FAN model 716 into an application 720A, such as for a website (for delivery by a website computing device 704), and / or an application 720B for the application distribution computing device (for example, 706) for distribution to respective peripheral devices. In one embodiment, the application distribution computing device 706 provides application store (e-commerce) services to distribute applications for execution on target devices running supported operating systems (OS).An example of a computer application distribution device is Apple's App Store™ for iPhone™ or iPad™ devices running iOS™ or iPADOST™ (trademarks of Apple Inc., Cupertino, California). Another example is Google Play™ (trademark of Google LLC, Mountain View, California) for smartphones and tablet devices from various sources running the operating system. AndroidTM (registered trademark of Google LLC, Mountain View, California). In the embodiment, the smartphone 708 receives an application 720A with a FAN model 716 from the website computing device 704 and a tablet 710 receives an application 720B with a FAN model 716 from the application distribution computing device 706. Figure 8 is a functional diagram of a representative computing device 800. The computing devices in Figure 7 are configured similarly and in accordance with their respective needs and functions. The computing device 800 comprises a processing unit 802 (e.g., a CPU and / or GPU, etc.), and a storage device 804 coupled to it that stores instructions (and data). These instructions, when executed by the processing unit, configure operations of the computing device, for example, to execute a process. Additional components include: communication units 806 for coupling the device, via wired or wireless means, to a communications network; an input device 808; and an output device 810, which may include a display device 812.In some examples, the display device is a touchscreen device providing an input / output device. Components of the computer device 800 are coupled via an internal communication system 814, which may have external ports for coupling to additional devices. In some examples, an output device includes a speaker, a buzzer, a light, an audio output jack, a fingerprint reader, etc. In some examples, the input device includes a keyboard, a button, a microphone, a camera, a mouse, or a pointing device, etc. Other devices (not shown) may include a location tracking device (e.g., GPS). The storage device, in one example, stores an operating system 816, user applications 818 (of which application 720A or 720B may be a part), a browser 820 (a type of user application) for browsing websites and running executables such as application 720A with a FAN pattern 716 received from a website; and data 822, for example, pictures and / or video images from a camera or received in some other way. Referring again to [Fig. 7], in one example, a user of a 708 smartphone uses a browser and visits a website provided by the 704 website computing device. The 708 smartphone receives the 720A application with the FAN model 716. In this example, the application is an effects simulation application, such as a makeup try-on application providing a virtual reality experience. The user uses a camera and obtains a still image. or video (e.g., a self-portrait), the source image of which is processed by the application (e.g., using the FAN 716 model). The user selects various effects to apply, such as via a graphical user interface. The effects are applied to the image(s) in real time using facial regions (e.g., facial landmarks based on training) identified by the FAN 716 model. Makeup effects can be applied using overlay to define an updated image based on the source image. The updated image is displayed on the display device and can be stored on the storage device and shared via social media, text message, email, etc.In one embodiment, the website computer device 704 is activated for e-commerce services and facilitates makeup purchases such as virtually tried-on makeup via the application 720A. In another embodiment, the website computer device 704 provides a recommendation service for suggesting products. In one embodiment, application 720A simulates the effects of skin or other facial treatment products. In another embodiment, application 720A simulates the effects of skin or other facial treatment services. In one embodiment, website computer device 704 provides a recommendation service for suggesting products. In another embodiment, website computer device 704 is activated for e-commerce services and facilitates purchases of such products and / or services. In one embodiment, application 720A performs a skin analysis and provides a score for at least one skin sign (e.g., acne). Website computer device 704 can provide a product recommendation. Application 720A can simulate results or product use showing reduced skin sign effects. Referring to [Fig. 7], in one example, a tablet user 710 uses a browser and visits a website provided by the application distribution device 706. The tablet 710 receives the application 720B with the FAN model 716. In the example, the application is an effects simulation application, for example, to simulate a fantasy effect (e.g., a graphic effect) associated with the face, providing a virtual reality experience. In one example, the effect is a filter applied to a self-portrait image. In another example, the effect simulates the face as a cartoon character using graphic effects. The user uses a camera and obtains a still or video image (e.g., a self-portrait), which source image is processed by the application (e.g., using the FAN model 716). The user can choose the character to apply, for example, via a graphical user interface.The effect or effects. Graphics are applied to the image or images in real time using facial regions identified via the FAN 716 model. Effects can be applied using an overlay to define an updated image based on the source image. The updated image is displayed via the display device and can be stored on a storage device and shared (communicated) via social media, text message, email, etc. In one embodiment, the 720B application offers a makeup try-on app, a treatment product simulation, or a treatment service simulation (each being a virtual or augmented reality experience). In one embodiment, the 720B application is configured to direct the device to an e-commerce service for recommendations and / or to facilitate a purchase. In one example, an application is a video calling or video conferencing application. Effects are applied in real time to images from a participant's camera using results from the FAN 716 model. The images with the applied effects are then communicated via the video calling or video conferencing service to other participants in the call / video conference. The effects include makeup effects, in one embodiment. Examples of applications developed that include a FAN model might include: a makeup simulation application to simulate trying on makeup products on the face; a skin analysis application to analyze and score a region or regions of the face in terms of at least one skin sign; an effects simulation application to simulate an effect associated with a region of the face; a facial tracking application to track and indicate a location on a face, etc. Figure 9 is a flowchart of 900 operations to define a face alignment network (FAN) model. To define the FAN model, the 902 operations generate a set of candidate submodels from a network structure by training the network structure using i) a training dataset; and ii) scaling and shrinking (EST) training operations, which EST operations define and retain instances of candidate submodels with various structure parameters with which to define the set of candidate submodels. To select the FAN model from among the candidate sub-models, the operations in 904 perform an evolutionary search of the candidate sub-models using the evaluation criteria of speed and accuracy. In one embodiment, the FAN model is defined for execution by a peripheral device to process facial images. For example, a device The peripheral device is a smartphone or tablet. In one embodiment, the EST operations initiate training from a previously defined base model in accordance with the network structure. In another embodiment, the EST operations use parameters pre-trained from the base model as partially trained parameters in each of the candidate submodels for further training using EST operations. In another embodiment, the candidate submodels are further trained for any one of the following: between 2 and 60 epochs; between 2 and 25 epochs; and 2 epochs. In one embodiment, the EST operations activate random subnetworks in each training iteration to train partial subnetwork weights integrally and to train weight sharing efficiently between submodels. In one embodiment, the EST operations define a search space for generating candidate submodels in accordance with a plurality of search dimensions including: a depth size; a kernel size; a channel ratio; and an extension ratio. In one embodiment, the EST operations are triggered with a small depth size, a small kernel size, a large channel ratio, and a large extension ratio, and then the operations, in phases and in the following order, gradually extend the depth size and kernel size to respective maxima and, in end phases, gradually shrink the channel ratio and extension ratio to respective minima.In one embodiment, the EST operations include kernel training operations in an early phase that train a first-size kernel and use the first-size kernel to subsequently train a second-size kernel where the first-size kernel is a center of the second-size kernel. In one embodiment, the EST operations include depth training operations in an intermediate phase that train fewer layers, then gradually add larger layer options to the training. In one embodiment, the EST operations include channel ratio and extension ratio training operations that shrink a channel ratio and an extension ratio respectively to final stages. In one embodiment, evolutionary research evaluates the basic model to determine the criteria for evaluating speed and accuracy. In one embodiment, evolutionary search evolves from the base model to define a population of candidate sub-models for sampling and subsequent evaluation. Evolutionary search can perform a plurality of cycles including: sampling from the population to select a quantity of candidate submodels; selecting the fastest submodel from the quantity; evolving the fastest submodel to determine an associated submodel; eliminating the oldest submodel from the population; and if the associated submodel satisfies a precision threshold test: adding the associated submodel to the population for availability for further sampling and adding the associated submodel to a final set of fastest candidate submodels; and following the performance of the plurality of cycles, selecting the fastest submodel from the final set of fastest candidate submodels as the FAN model.Evolutionary search can perform a plurality of cycles including: sampling from the population to select a quantity of candidate submodels; selecting the most accurate submodel from the quantity; evolving the most accurate submodel to determine an associated submodel; eliminating the oldest submodel from the population; and if the associated submodel satisfies a precision threshold test: adding the associated submodel to the population for availability for further sampling and adding the associated submodel to a final set of most accurate candidate submodels; and following the completion of the plurality of cycles, selecting the most accurate submodel from the final set of most accurate candidate submodels as the FAN model. In one embodiment, the network structure is a two-stage structure providing as output a Region of Interest (ROI) alignment layer to refine extracted features for prediction. In one embodiment, a first stage comprises four blocks and a second stage comprises one block, each block having a maximum of four layers, each including an inverted residual layer. Thus, in one embodiment, a computer device includes a processing unit coupled to a storage device storing instructions which, when executed by the processing unit, configure the computer device to carry out a process according to any one of the process-related embodiments. Thus, in one embodiment, a computer program product includes a non-transient storage device that stores instructions and data defining a FAN model for execution by a processing unit of a computer device, where the FAN model is defined in accordance with a method of any of the method-related embodiments. A similar embodiment relates to a computer program product for defining (for example, through a drive) such a FAN model. Thus, in one embodiment, a computer system comprises a unit of A processing unit coupled with a storage device that stores instructions which, when executed by the processing unit, configure the computer to provide a defined FAN model in accordance with a process of any of the process-related embodiments. A similar embodiment relates to a computer for defining (for example, through training) such a FAN model. A practical implementation may include any or all of the features described herein. These features, characteristics, and various combinations thereof, may be expressed in the form of processes, apparatus, systems, means for performing functions, program-products, and, in other forms, combine the features described herein. A number of embodiments have been described. Nevertheless, it is understood that various modifications may be made without departing from the spirit and framework of the processes and techniques described herein. Furthermore, additional steps may be included, or steps may be eliminated, in the described process, and other components may be added to, or removed from, the described systems. Accordingly, other embodiments are included within the scope of the following claims. Throughout the description and claims of this memorandum, the words "include" and "contain," and their variations, mean "comprising but not limited to" and not intended (nor having the effect) to exclude other components, whole numbers, or steps. Throughout this memorandum, the singular encompasses the plural unless the context indicates otherwise. In particular, where the indefinite article is used, the memorandum should be understood as considering both plurality and singularity, unless the context indicates otherwise. Specific features, integers, characteristics, or groups described in association with a particular aspect, embodiment, or example of the invention shall be understood as applicable to any other aspect, embodiment, or example, except where incompatibility exists. All the features disclosed herein (including the claims, abstract, and accompanying drawings), and / or all the steps of any method or process thus disclosed, may be combined in any combination, except for combinations where at least some of these features and / or steps are mutually exclusive. The invention is not limited to the details of any of the aforementioned examples or embodiments.The invention extends to any new feature, or any new combination of features, disclosed in this document (including any of the claims, abstract, and accompanying drawings) or to any new step, or any new combination of steps, of any disclosed method or process.
Claims
Claims
1. A computer processing method comprising: the definition of a Face Alignment Network (FAN) model, in which definition includes: the generation of a set of candidate sub-models from a network structure through training of the structure of network using 1) a training dataset; and 11) extension and shrinkage training operations (EST), which operations EST define and retain instances of candidate submodels of various structure parameters with which define the set of candidate submodels; and carrying out an evolutionary search for candidate sub-models to using speed and accuracy evaluation criteria to se- select the FAN model from among the candidate sub-models, in which the FAN model is defined for execution by a peripheral device for processing facial images; and wherein EST operations trigger training from a model of base previously defined in accordance with the network structure.
2. The method of claim 1, wherein the operations EST use pre-trained parameters from the base model as that partially trained parameters in each of the sub-models candidates for additional training using of EST operations.
3. The method of claim 2, wherein the candidate sub-models are more trained for any of the following: between 2 epochs and 60 epochs; between 2 and 25 epochs; and 2 epochs.
4. A method according to any one of claims 2 or 3, wherein EST operations activate random subnets in each training iteration to train partial weights of sub- networks in an integral way and to bring about the efficient sharing of weight- efficiently between sub-models.
5. A method according to any one of claims 2 to 4, wherein the EST operations define a search space for the generation of candidate sub-models in accordance with a plurality of dimensions research including: a depth size; a core size; a channel report; and an extension report.
6. The method of claim 5, wherein the EST operations de- engage with small depth size, small core size, a large channel ratio, and a large extension ratio, then the operations, in phases and in the following order, gradually extend the depth size and kernel size at respective maximums and, at end phases, gradually narrow the channel ratio and the extension ratio to respective minimums.
7. A method according to claim 5 or 6, wherein the operations EST include single-phase kernel training operations early which result in a first-size kernel and use the kernel first size to subsequently drive a second size core wherein the first size core is a center of the second size core.
8. A method according to any one of claims 1 to 7, wherein the evolutionary research evolves from the basic model to define a population of candidate sub-models for sampling and subsequent assessment.
9. The method of claim 8, wherein the evolutionary search: carries out a plurality of cycles including: sampling from the population to select a quantity of candidate sub-models; selecting the fastest sub-model from the quantity; the evolution of the fastest sub-model to determine a sub- associated model; the elimination of an oldest sub-model from the population; and if the associated submodel satisfies a precision threshold test: the addition of the sub-model associated with the population for availability for a subsequent sampling and adding the associated sub-model to a final fastest candidate submodel set; and following completion of the plurality of cycles, selects the sub- fastest model among the set of candidate sub-models faster finals as a FAN model.
