Efficient deep learning reasoning for neural networks of line camera data

By reusing the calculation results and buffer design of progressive images in deep learning inference, optimizing the processing of convolutional neural networks solves the efficiency problem of high-resolution image processing in industrial automation, and achieves efficient deep learning in industrial automation. Inference,reducing hardware requirements.

CN118871925APending Publication Date: 2024-10-29SIEMENS AG
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202380026060.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-03-07
Filing Date
2023-02-13
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Existing technologies are difficult to efficiently process high-resolution progressive images in industrial automation, especially in hyperspectral imaging applications, resulting in large and costly inference hardware requirements and inability to effectively utilize accelerator chipsets for evaluation in the mobile market.

Method used

By reusing the calculation results of each new pixel row in deep learning inference, the computational workload is reduced, and through the design of convolutional neural networks and first-in-first-out buffers, the processing of line-by-line images is optimized and the number of buffers is reduced. Improve computing efficiency.

Benefits of technology

It achieves efficient processing of complex images without the need for a huge computer graphics card, saves hardware resources, reduces costs, and improves deep learning reasoning capabilities in industrial automation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118871925A_ABST
    Figure CN118871925A_ABST
Patent Text Reader

Abstract

A computer-implemented method for accelerating deep learning reasoning of a neural network with layers, in which a progressive image consisting of pixels is generated by scanning an object (3) by a line camera (1), in which: for each new pixel row added to the image, the current layer of pixels is calculated using the results of previous calculations on the pixels of the current layer; and the calculation is not repeated so as to calculate the value of the pixel in the next layer. A corresponding arrangement comprising a neural network is also disclosed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an automated method and computing device for accelerating deep learning inference of a neural network having layers, wherein a line-wise image composed of pixels is generated by scanning an object (e.g., a manufactured part in a factory) with a line-camera. Background Art

[0002] Deep learning inference is the process of using a trained DNN model to make predictions on previously unseen data.

[0003] Optical inspection with artificial intelligence is an emerging topic in industrial automation. Algorithms and hardware for efficient inference exist in the context of a rectangular field of interest (area scan) / region of interest. Efficient inference hardware with low thermal design power plays a vital role in industrial automation, whether it is an IPC or specialized inference hardware such as Siemens' SIMATIC TM NPU. For example, accelerator chips for industrial personal computers are Google's Coral or Intel's Myriad or Movidius.

[0004] However, most accelerators with low thermal design power have been developed for mobile applications, such as in mobile phones, where lower resolution images are sufficient, for example, to detect faces. Typically, such image resolutions range from 32×32 pixels up to a typical maximum of 1024×768 pixels.

[0005] However, in industrial applications, higher resolutions are necessary to accomplish the intended task. This is particularly true in the context of continuous production, for example in steel production, textile inspection, inspection of paper and printed products, or when objects are transported on a conveyor belt and should be analyzed continuously without stopping the conveyor belt. In the latter case, the main image sensors are so-called line cameras.

[0006] On a wide but extremely narrow sensor, line cameras do not acquire a single rectangular image, but generate a constant stream of vectors (dimensions: line scan x spatial resolution of color bands: grayscale: 1 or RGB: 3). Typical resolutions are from 2048×1 pixel up to 12288×3 pixels. However, the line frequency can easily be as high as 50kHz. Thus, a line camera with 2048×1 pixels and a line frequency of 1kHz generates an image of 2048×1000 pixels per second. Such high resolutions are necessary for product and quality inspection tasks.

[0007] According to the prior art, it is not possible to evaluate such high resolutions with (accelerator) chipsets for the mobile market.

[0008] In modern applications utilizing hyperspectral imaging (HSI) cameras, the problem becomes even more severe, since these cameras generate not only three colors (RGB), but also have a much higher wavelength resolution in terms of the colors of light, i.e., spectral features or bands. Spectrally, this can be used in the visible range, but also in the more interesting near-infrared or mid-infrared ranges, where the data can be related to the chemical composition or physical properties of the sample. Due to the higher spectral resolution and increased information content, a better detection / contrast of structures is achieved. In the mid-infrared and far-infrared ranges, even highly specific chemical sensing is possible due to distinct spectral features, however, at a much higher price.

[0009] The existing technique aggregates individually measured pixels into a single rectangular image. Therefore, the streams to be evaluated by the AI ​​are put into rectangular blocks. This either requires large strides (skipping parts of the reasoning task), risking loose information, or using extremely large GPUs for reasoning. Summary of the invention

[0010] The purpose of the present invention is to provide a solution for improving deep learning inference for optical inspection in the field of industrial automation.

[0011] To achieve this object, the invention provides solutions according to the independent claims. Advantageous embodiments are provided in the dependent claims.

[0012] The present invention discloses an automated method for accelerating deep learning inference of a neural network with layers, wherein a row-by-row image composed of pixels is generated by scanning an object with a line camera, wherein: for each new pixel row generated, for calculations in the current layer that do not involve the new pixel row, the results of previous calculations are reused instead of repeating the calculations to calculate the values ​​of pixels in the next layer.

[0013] The advantage of the present invention is that the computational workload is reduced, and therefore the customer can utilize more complex graphics in less bulky hardware. The customer's savings come from the fact that no bulky computer graphics card is required for inference. These benefits can either be monetized directly or used to improve the attractiveness of the programmable logic controller.

[0014] In a further embodiment, if the input size of the neural network is constant, then for each new row of pixels, the oldest row of pixels and calculations involving the oldest row of pixels are removed.

[0015] In a further embodiment of the method, the neural network is a convolutional neural network and the pixels of the layer are calculated by convolution using a convolution kernel.

[0016] In a further embodiment of the method, for each layer:

[0017] - a first-in-first-out buffer of size at least the vertical resolution of the layer minus one is initialized,

[0018] - For initialization, put the next row of the image into the buffer until it reaches the horizontal resolution of the convolution kernel minus the number one,

[0019] in

[0020] For each row in a layer:

[0021] - add lines to the buffer,

[0022] - compute the convolution with respect to the contents of the buffer, storing previously computed values ​​for the next row, and

[0023] - Feed the computed convolution over the content to the next layer.

[0024] In a further embodiment of the method, the object is a component which is processed in a production process in a factory.

[0025] In a further embodiment of the method, the line camera is installed in a production line.

[0026] In a further embodiment of the method, the stride of the neural network is set to an integer greater than one, so that in one iteration step only one output is calculated from multiple rows of the input. As a result, the number of buffers is significantly reduced.

[0027] In a further embodiment of the method, the method is performed for each color channel of the line camera.

[0028] The invention further discloses an arrangement for accelerating deep learning inference, the arrangement comprising a neural network having layers and a line camera for scanning an object, wherein the line camera is designed to generate a line-by-line image composed of pixels. The arrangement is characterized by a computing device that is designed and programmed to be applied to each new row of pixels added to the image. This will result in previous calculations for the pixels of the current layer, rather than repeated calculations, to calculate the values ​​of the pixels in the next layer.

[0029] In a further embodiment of the arrangement, the neural network is a convolutional neural network and the computing device is designed to compute pixels of the layer by convolution using a convolution kernel.

[0030] In a further embodiment of the arrangement, the computing device is designed to carry out the steps of the method according to the invention.

[0031] In a further embodiment of the arrangement the object is a component which is processed in a production process in a factory.

[0032] In a further embodiment of the arrangement the line camera is installed in a production line.

[0033] In a further embodiment of the arrangement, the stride of the neural network is set to an integer greater than one, so that in one iteration step only one output is calculated from multiple rows of the input.

[0034] Further benefits and advantages of the present invention will become apparent after careful reading of the detailed description with due reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 shows a graphical representation of the calculation of a single output pixel.

[0036] Figure 2 A diagram showing the calculations for two different channels,

[0037] Figure 3 shows a two-tier architecture,

[0038] Figure 4 shows the reduction in buffer capacity, and

[0039] Figure 5 A block diagram of the arrangement is shown. DETAILED DESCRIPTION

[0040] The invention is explained exemplarily by using an embodiment of a convolutional deep neural network and how it computes its results - the core of modern AI. A convolutional deep neural network is built up of various so-called convolutional layers.

[0041] Each convolutional layer contains a series of filters called convolution kernels. Convolution kernels are simple and efficient mathematical formulas. The kernel is an integer matrix for a subset of the input pixel values, the same size as the kernel. Each pixel is multiplied by the corresponding value in the kernel, and the results are summed into a single value to simply represent the grid cell (like a pixel) in the output channel / feature map.

[0042] As an example, a 3×3 convolution kernel takes a 3×3 pixel patch from the input and computes a value for the output layer. The image in Figure 1 illustrates the computation of a single output pixel (see right, top patch) from a 3×3 patch in the input (see right, bottom patch). In the left image, the mathematical calculation is depicted, where the value from the input x i The 9 pixels are multiplied by the weight vector w i The weight vector w i It is determined through the training / learning process of the deep neural network.

[0043] This calculation is repeated for each slice of the input data (the next image, the left side of Figure 1), and for different channels, such as Figure 2When performing calculations on two channels (e.g., two colors) as shown in , the various weight vectors (next image, right side of Figure 1) are usually repeated multiple times. In image-based inputs, there are usually three channels: red, green, and blue, while in hyperspectral imaging (HSI) applications, about 256 channels make up the input data.

[0044] This generates a significant amount of computation on the input data, and subsequently in all subsequent convolutional layers of the deep neural network. In applications where the online camera is inpainting / scanning images, the computation is repeated many times.

[0045] The core of the invention is to extend the line-by-line nature of line cameras to inference computations in deep neural networks. Instead of patching the input image in repeated image sections, the previous computations are either contained / implemented in software or in the inference model, where the latter approach is assumed to be much more efficient.

[0046] For the purpose of illustration, consider Figure 3 For inference, the network needs to perform 4×4 calculations in the first layer, and in the next layer, it needs to calculate 2×2 calculations. Therefore, for each layer, the expected algorithm works as follows:

[0047] 1) Initialize a FIFO buffer (= buffer unit) with the size of the vertical resolution of the layer.

[0048] 2) For initialization, put the next line into the buffer until the level of the convolution kernel (= direction of feed motion) resolution - 1 is reached.

[0049] 3) For each row

[0050] a. Add lines to the buffer

[0051] b. compute the convolution with respect to the contents of the buffer, storing previously computed values ​​for the next row,

[0052] c. Feed the content (computed convolution) to the next layer.

[0053] When implemented in computational memory, this algorithm can be implemented extremely efficiently on a computer.

[0054] So far, approaches have shifted work from computation to memory due to the ring buffer. However, this becomes critical when the number of channels increases (e.g. in HIS applications). Therefore, in addition to inference, the present invention aims to save buffers in inference by training so-called super networks using neural architecture search. Figure 4 The supernetwork shown in includes an option for large strides in the vertical direction of the input. The stride does not consume a single row in one iteration, but rather comes from multiple rows of the input ( Figure 4 ), and only one output is computed. As a result, the number of buffers is significantly reduced, such as Figure 4 Indicated by the middle frustum.

[0055] Figure 5 A block diagram of an arrangement is shown. An object 3 is processed in a production line 4 and inspected by a line camera 1. The images of the line camera 1 are processed in a computing device 2 which comprises a deep neural network performing inference.

[0056] Although the present invention has been explained about its preferred embodiment as described above, it will be appreciated that many other possible modifications and variations may be made without departing from the scope of the present invention. Therefore, it is contemplated that (one or more) appended claims will cover such modifications and variations that fall within the true scope of the present invention.

Claims

1. A computer-implemented method for accelerating deep learning inference of a neural network having layers, wherein a line-by-line image consisting of pixels is generated by scanning an object (3) with a line camera (1), characterized in that: For each new pixel row generated, For calculations in the current layer that do not involve new rows of pixels, the results of previous calculations are reused rather than repeated to calculate the values ​​of pixels in the next layer.

2. The method of claim 1 , wherein if the input size of the neural network is constant, then for each new row of pixels, the oldest row of pixels and calculations involving the oldest row of pixels are removed.

3. The method according to claim 1 or 2, wherein The neural network is a convolutional neural network, and the pixels of a layer are calculated by convolution using a convolution kernel.

4. The method of claim 3, wherein for each layer: - initialize a first-in-first-out buffer unit with a size of at least the vertical resolution of the layer minus one, - For initialization, put the next row of the image into the buffer cells until the horizontal resolution of the convolution kernel minus one is reached, Where for each row in a layer: - add the line to the buffer cell, - compute the convolution with respect to the contents of the buffer cells, where previously computed values ​​are stored for the next row, and - Feed the computed convolution over the content to the next layer.

5. The method according to one of the preceding claims, wherein The object (3) is a component that is processed during a production process in a factory.

6. The method according to one of the preceding claims, wherein The line camera (1) is installed in a production line (4).

7. The method according to one of the preceding claims, wherein The stride of the neural network is set to an integer greater than one, so that in one iteration step, only one output is computed from multiple rows of input.

8. The method according to one of the preceding claims, wherein The method is performed for each color channel of the line camera (1).

9. An arrangement for accelerating deep learning inference, the arrangement comprising a neural network having layers and a line camera (1) for scanning an object (3), wherein the line camera (1) is designed to generate a line-by-line image consisting of pixels; characterized in that: A computing device (2) includes a neural network designed and programmed to reuse the results of previous calculations for calculations in the current layer that do not involve the new pixel row for each new pixel row generated, rather than repeating the calculations, to calculate the values ​​of the pixels in the next layer.

10. An arrangement according to claim 9, wherein if the input size of the neural network is constant, then for each new row of pixels, the oldest row of pixels and calculations involving the oldest row of pixels are removed.

11. The arrangement of claim 8, wherein The neural network is a convolutional neural network, and the computing device (2) is designed to compute pixels of a layer by performing convolution using a convolution kernel.

12. An arrangement according to claim 8 or 9, wherein The computing device (2) is designed to carry out the steps of claim 4.

13. Arrangement according to one of claims 8 to 10, wherein The object (3) is a component that is processed during a production process in a factory.

14. Arrangement according to one of claims 8 to 11, wherein The line camera (1) is installed in a production line (4).

15. The arrangement according to one of claims 8 to 12, wherein The stride of the neural network is set to an integer greater than one, so that in one iteration step, only one output is computed from multiple rows of input.

Citation Information

Patent Citations

  • Object surface defect detection method and apparatus based on linear array CCD

    CN102854194A

  • CT image generating device and method, and CT image generating system

    CN103310471A

  • Flexible film defect detection device based on machine vision and detection method thereof

    CN108414531A

  • Method of synchronizing a line scan camera

    CN109874335A

  • Rail wagon rolling bearing oil slinging fault detection method

    CN111079748A