Facebook to Open QNNPACK's Source Code

The technology, designed for AI on mobile devices, is used in Facebook applications for image processing
30 October 2018   951

Facebook has released the open source code for the QNNPACK AI library (Quantized Neural Network PACKage). It is designed for AI on mobile devices. The technology is used in Facebook applications for image processing. Since the computing power of mobile devices is lower than that of data processing servers, the developers used the latest advances in neural networks to keep the system performance at the proper level.

The library architecture is based on the convolutional neural network. Such a network is considered the most suitable for the recognition of visual images. To improve productivity, engineers applied the modified im2col memory matrix transformation and memory transformation technologies.

The im2col technology is a breakdown of the processed image into columns-vectors by the number of incoming channels. The creators of QNNPACK finalized this system by including a bypass buffer.

The bypass buffer contains pointers to rows of incoming pixels that should be involved in the calculation of outgoing. Using matrices, developers were able to reduce the buffer size relative to standard im2col implementations.

Facebook engineers refined the even-distributed convolution algorithm (depthwise convolution) by adding batch processing of 3 × 3 groups. For packet computing, general purpose registers (GPR) are used. The 3 × 3 convolution processing requires 18 registers (9 incoming and 9 for the filter), while the 32-bit ARM core architecture supports only 14. But since the filter remains unchanged during processing, the developers were able to reduce the resources needed for its storage to single register.

In the QNNPACK library, other advanced approaches to optimizing neural networks are implemented, for example, low-precision calculations.

The tool is published as part of the PyTorch 1.0 framework, released in early October 2018.

Nvidia to Open SPADE Source Code

SPADE machine learning system creates realistic landscapes based on rough human sketches
15 April 2019   674

NVIDIA has released the source code for the SPADE machine learning system (GauGAN), which allows for the synthesis of realistic landscapes based on rough sketches, as well as training models associated with the project. The system was demonstrated in March at the GTC 2019 conference, but the code was published only yesterday. The developments are open under the non-free license CC BY-NC-SA 4.0 (Creative Commons Attribution-NonCommercial-ShareAlike 4.0), allowing use only for non-commercial purposes. The code is written in Python using the PyTorch framework.

Sketches are drawn up in the form of a segmented map that determines the placement of exemplary objects on the scene. The nature of the generated objects is set using color labels. For example, a blue fill turns into sky, blue into water, dark green into trees, light green into grass, light brown into stones, dark brown into mountains, gray into snow, a brown line into a road, and a blue line into the river. Additionally, based on the choice of reference images, the overall style of the composition and the time of day are determined. The proposed tool for creating virtual worlds can be useful to a wide range of specialists, from architects and urban planners to game developers and landscape designers.

Objects are synthesized by a generative-adversarial neural network (GAN), which, based on a schematic segmented map, creates realistic images by borrowing parts from a model previously trained on several million photographs. In contrast to the previously developed systems of image synthesis, the proposed method is based on the use of adaptive spatial transformation followed by transformation based on machine learning. Processing a segmented map instead of semantic markup allows you to achieve an exact match of the result and control the style.

To achieve realism, two competing neural networks are used: the generator and the discriminator (Discriminator). The generator generates images based on mixing elements of real photos, and the discriminator identifies possible deviations from real images. As a result, a feedback is formed, on the basis of which the generator begins to assemble more and more qualitative samples, until the discriminator ceases to distinguish them from the real ones.