Backpropagation
Exercise 3. 6: Assume that the system described in this section has been built using a BPN simulator on a single-processor computer What are the processing
requirements to allow entire video images to be sent at standard frame rates (30 Hz interlaced, 60 Hz
3.4.2 Paint-Quality Inspection
Visual inspection of painted surfaces, such as automobile body panels, is cur- rently a very time-consuming and labor-intensive process. To reduce the amount of time required to perform this inspection, one of the major U.S. automobile manufacturers reflects a laser beam off the painted panel and on to a projection screen. Since the light source is a coherent beam, the amount of scatter ob- served in the reflected image of the laser provides an indication of the quality of the paint finish on the car. A poor paint job is one that contains ripples, looks like "orange peel," or lacks shine. A laser beam reflected off a panel with a poor finish will therefore be relatively diffuse. Conversely, a good-quality paint finish will be relatively smooth and will exhibit a bright luster. A laser light reflected off a high-quality paint finish will appear to an observer as very close to uniform throughout its image. Figure 3.9 illustrates the kind of differences typically observed as a result of performing this test.
We have now seen how it might be possible to automate the quality in- spection of a painted surface. However, our system design has presumed that
all of the patterns in 64-space is obviously not feasible. Practically, the best encoding we can hope for using an ANS is an output mapping that resembles the desired output within some margin of error.
3.4 BPN Applications 111
(a)
Figure 3.9 The scatter typically observed when a laser beam is reflected
off painted sheet-metal (a) A poor-quality paint (b) A better-quality paint finish.
there is an "observer" present to assess the paint quality by performing a visual inspection of the reflected laser image. In the past, this part of the inspection process would have been performed primarily by humans, because conventional computer-programming techniques that could be used to automate the "obser- vation" and scoring process suffered from a lack of flexibility and were not particularly To illustrate why an algorithmic analysis of the reflected laser image might be considered inflexible, consider that such a program would have to examine every pixel in the input image, correlate features of each pixel (such as brightness) with those observed in a multitude of neighboring pixels, and assess the coherency of the image as a whole. Small, localized perturbations in the image might represent relatively minor problems, such as a fingerprint on the paint panel. The complexity of such a program makes it difficult to modify.
By using a BPN to perform the quality-scoring application, we have con- structed a system that captures the expertise of the human inspectors, and is relatively easy to maintain and update. To improve the performance of the system, we have coupled algorithmic techniques to simplify the problem, il- lustrating once again that difficult problems are much easier to solve when we can work with a complete set of tools. We shall now describe the system we developed to address this application.
An algorithmic solution to this problem does exist, and has been successfully applied to the problem described. However, the amount of time (and hence money) needed to maintain and update that system, should the need arise, probably would be prohibitive.
Automatic Paint QA System Concept. To automate the paint inspection pro- cess, a video system was easily substituted for the human visual system. How- ever, we were then faced with the problem of trying to create a BPN to examine and score the paint quality given the video input. To accomplish the examina- tion, we constructed the system illustrated in Figure The input video image was run through a video frame-grabber to record a snapshot of the reflected laser image. This snapshot contained an image 400-by-75 pixels in size, each pixel stored as one of 256 values representing its intensity. To keep the size of the network needed to solve the problem manageable, we elected to take 10 sample images from the snapshot, each sample consisting of a 30-by-30-pixel square centered on a region of the image with the brightest intensity. This approach allowed us to reduce the input size of the BPN to 900 units (down from the 30,000 units that would have been required to process the entire image). The desired output was to be a numerical score in the range of 1 through 20 (a 1 represented the best possible paint finish; a 20 represented the worst). To produce that type of score, we constructed the BPN with one output
unit producing a linear output that was interpreted as the scaled paint score. Internally, 50 sigmoidal units were used on a single hidden layer. In addition, the input and hidden layers each contained threshold units used to bias the units on the hidden and output layers, respectively.
Once the network was constructed (and trained), 10 sample images were taken from the snapshot using two different sampling techniques. In the first test, the samples were selected randomly from the image (in the sense that their position on the beam image was random); in the second test, 10 sequential samples were taken, so as to ensure that the entire beam was In both cases, the input sample was propagated through the trained BPN, and the score produced as output by the network was averaged across the 10 trials. The average score, as well as the range of scores produced, were then provided to the user for comparison and interpretation.
Training the Paint QA Network. At the time of the development of this appli- cation, this network was significantly larger than any other network we had yet trained. Consider the size of the network used: 901 inputs, hiddens, 1 output, producing a network with 45,101 connections, each modeled as a floating-point number. Similarly, the unit output values were modeled as floating-point num- bers, since each element in the input vector represented a pixel intensity value (scaled between 0 and 1), and the network output unit was linear.
The number of training patterns with which we had to work was a function of the number of control paint panels to which we had access (18), as well as of the number of sample images we needed from each panel to acquire a relatively complete training set (approximately 6600 images per panel). During training,
of the tests were consistent with scores assessed for the same paint panels by the human experts, within a relatively minor error range, regardless of the sample-selection technique used.
3.4 BPN Applications 113 Frame grabber 400 x 75 Video image Input- selection algorithm User interface Pixel image Back- propagation network
Figure 3.10 The BPN system is constructed to perform paint-quality assessment. In this example, the BPN was merely a software
simulation of the network described in the text. Inputs were
provided to the network through an array structure located in
system memory by a pointer argument supplied as input to
the simulation routine.
the samples were presented to the network randomly to ensure that no single paint panel dominated the training.
From these numbers, we can see that there was a great deal of computer time consumed during the training process. For example, one training epoch (a single training pass through all training patterns) required the host computer to perform approximately 13.5 million connection updates, which translates into roughly 360,000 floating-point operations (FLOPS) per pattern (2 FLOPS per connection during forward propagation, 6 FLOPS during error propagation), or 108 million FLOPS per epoch. You can now understand why we have emphasized efficiency in our simulator design.