Methods for verifying the execution of a prediction task by a neural network
By comparing optical flow results from two independent calculation paths, the method addresses the challenge of identifying uncertain predictions in neural networks, thereby enhancing the reliability of autonomous system controls.
Patent Information
- Application Number
- DE102022209403
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2025-04-30
- Estimated Expiration
- 2042-09-09
AI Technical Summary
Neural networks used for prediction tasks, such as pedestrian detection in autonomous vehicles, struggle to identify input data for which their predictions are uncertain, leading to potential control issues in autonomous systems.
A method that involves supplying image data to a feature extraction network and then to a prediction network, while also determining optical flow between image data sets using two independent calculation paths. The results of these optical flow determinations are compared to assess the reliability of the prediction task results.
This method effectively monitors the execution of prediction tasks by detecting uncertainties in neural network predictions, thereby improving the control of autonomous systems by ensuring that only reliable predictions are used for decision-making.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
State of the art
[0001] The present disclosure relates to methods for verifying the performance of a prediction task by a neural network.
[0002] Prediction tasks performed by neural networks can be used for many control applications. For example, for an autonomous vehicle, a neural network (i.e., a deep learning component) performs a prediction task such as pedestrian detection. The neural network is trained for this prediction task, but it is difficult to predict for which input data (e.g., images) the prediction (e.g., detection) will work well and for which it will work poorly, i.e., uncertainties exist.
[0003] Since it is desirable that uncertainties are detected so that, for example, a control system of an autonomous vehicle can take them into account, effective procedures are desirable that enable the detection of such uncertainties (and thus problems or anomalies in the prediction).
[0004] The method with features of independent claim 1 enables the detection of these uncertainties or the monitoring of the uncertainty, which directly results in the control of the autonomous vehicle being improved. Disclosure of the invention
[0005] According to various embodiments, a method for checking the performance of a prediction task by a neural network is provided, comprising feeding image data to a feature extraction network that is trained to determine a representation of the image data for the performance of the prediction task for the image data fed to it, feeding the representation determined by the feature extraction network to a prediction network that is trained to perform the prediction task, first determining an optical flow between the image data and further image data from the representation,second determination of the optical flow between the image data and the further image data from the image data using a calculation method other than the calculation of the representation and the determination of the optical flow from the representation and comparing the result of the first determination of the optical flow with the result of the second determination of the optical flow and accepting a result of the prediction task as correct if the result of the first determination of the optical flow agrees with the result of the second determination of the optical flow within a specified tolerance.
[0006] The method described above enables effective monitoring of the performance of the prediction task by sharing (i.e., sharing) the representation between the prediction task and the monitoring task (i.e., the first optical flow detection, the result of which is compared with the result of the second detection), since a poor representation of the image data is reflected not only in the result of the prediction task but also in the (first) optical flow detection.
[0007] The result of the optical flow determination can refer to a subset of an image or to the entire image. The result of the optical flow determination can therefore be a local or global result for the optical flow (with respect to an image). Similarly, the result of the prediction task can be a local or global result (with respect to an image).
[0008] Various examples of implementation are given below.
[0009] Embodiment 1 is a method for verifying the performance of a prediction task by a neural network as described above.
[0010] Embodiment 2 is a method according to embodiment 1, wherein the prediction task is a prediction task for controlling a robot device, and the robot device is controlled based on the result of the prediction task if the result of the first determination of the optical flow matches the result of the second determination of the optical flow within the predetermined tolerance (and is otherwise not used and, for example, discarded). The agreement of the results for a partial area of an image can be crucial for the use of a prediction result that relates to the partial area, for example, if a robot device intends to move in an environmental area shown by this partial area. The use of the result of the prediction task can therefore depend on how well the results of the optical flow are for an image area to which the prediction task relates (and, for example,a task to be performed by a robotic device).
[0011] By monitoring the execution of the prediction task, the control of the robot device (especially its safety) is improved.
[0012] Embodiment 3 is a method according to embodiment 2, wherein a safety measure is taken in the control of the robot device if the result of the first determination of the optical flow does not agree with the result of the second determination of the optical flow within the predetermined tolerance.
[0013] Accidents caused by an error in the prediction result can thus be avoided.
[0014] Embodiment 4 is a method according to one of the embodiments 1 to 3, wherein a further training of the neural network is carried out if the result of the first determination of the optical flow does not agree with the result of the second determination of the optical flow within the predetermined tolerance.
[0015] In this way, the neural network can be improved by retraining it on types of input data for which it was poorly trained and then producing better results for these types.
[0016] Embodiment 5 is a method according to one of the embodiments 1 to 4, wherein the first determination of an optical flow between the image data and further image data from the representation is carried out by means of a neural task-head network and the neural task-head network is trained on the basis of labels determined by means of the other calculation path.
[0017] This ensures that the results of the task-head network for training input data for which the neural network (and the task-head network) was trained, produce similar results to the other computation path and, conversely, anomalies can be detected, since for them the result of the task-head network is highly likely to differ from the result of the other computation path.
[0018] Embodiment 6 is a method according to one of embodiments 1 to 5, wherein the image data is a first digital image and the further image data is at least a second digital image and wherein the prediction task is an object classification of at least one object shown in the first digital image or a semantic segmentation of the first digital image.
[0019] The monitoring task (initial determination of optical flow) and the prediction task of object classification or semantic segmentation are strongly related in this case, so that the qualities of the respective results correlate well and thus errors in calculating optical flow based on the representation indicate errors in performing the prediction task based on the representation.
[0020] Embodiment 7 is a method according to one of embodiments 1 to 6, wherein the result of the first determination of the optical flow and the result of the second determination of the optical flow are compared image region by region for a plurality of regions of the first digital image (and corresponding regions of the second digital image), the prediction task provides a prediction result for at least one of the regions, and, for each region for which the prediction task provides a prediction result, the result of the prediction task for a region is accepted as correct if the result of the first determination of the optical flow agrees with the result of the second determination of the optical flow within a predetermined tolerance for the region.
[0021] In other words, the correctness of the (initial) optical flow determination can be verified locally, and local prediction results can be accepted or rejected accordingly. In particular, errors in irrelevant image regions can be ignored (e.g., errors in the optical flow determination of tree leaves located above the roadway; a correct representation in this region is typically irrelevant).
[0022] Embodiment 8 is a monitoring device configured to carry out a method according to one of embodiments 1 to 7.
[0023] Embodiment 9 is a computer program including instructions that, when executed by a processor, cause the processor to perform a method according to any one of embodiments 1 to 7.
[0024] Embodiment 10 is a computer-readable medium storing instructions that, when executed by a processor, cause the processor to perform a method according to any one of embodiments 1 to 7.
[0025] In the drawings, like reference characters generally refer to the same parts throughout the several views. The drawings are not necessarily to scale, emphasis instead generally being placed upon illustrating the principles of the invention. In the following description, various aspects are described with reference to the following drawings. Fig. 1 shows a (e.g. autonomous) vehicle. Fig. 2 shows an architecture for monitoring the execution of a prediction task. Fig. 3 shows a flowchart illustrating a method for verifying the performance of a prediction task by a neural network according to one embodiment.
[0026] The following detailed description refers to the accompanying drawings, which, by way of illustration, show specific details and aspects of this disclosure in which the invention may be practiced. Other aspects may be utilized, and structural, logical, and electrical changes may be made without departing from the scope of the invention. The various aspects of this disclosure are not necessarily mutually exclusive, as some aspects of this disclosure may be combined with one or more other aspects of this disclosure to form new aspects.
[0027] Various examples are described in more detail below.
[0028] Fig. 1 shows a (e.g. autonomous) vehicle 101.
[0029] In the example of Fig. 1, the vehicle 101, for example a car or truck, is provided with a vehicle control device 102.
[0030] The vehicle control device 102 has data processing components, e.g., a processor (e.g., a CPU (central processing unit)) 103 and a memory 104 for storing control software according to which the vehicle control device 102 operates and data processed by the processor 103.
[0031] For example, the stored control software (computer program) includes instructions that, when executed by the processor, cause the processor 103 to implement one or more neural networks 107.
[0032] The data stored in memory 104 may, for example, include image data captured by one or more cameras 105. The one or more cameras 105 may, for example, capture one or more grayscale or color photographs of the surroundings of the vehicle 101. It should be noted that, hereinafter, images or image data are understood very generally as a collection of data representing one or more objects or patterns. The image data may be provided by sensors that measure visible or invisible light, such as infrared or ultraviolet light, ultrasonic or radar waves, or other electromagnetic or acoustic signals.
[0033] The vehicle control device 102 can determine, based on the image data, whether and which objects, e.g. fixed objects such as traffic signs or road markings or moving objects such as pedestrians, animals and other vehicles, are present in the surroundings of the vehicle 101.
[0034] The vehicle 101 can then be controlled by the vehicle control device 102 according to the results of the object determination. For example, the vehicle control device 102 can control an actuator 106 (e.g., a brake) to control the speed of the vehicle, e.g., to decelerate the vehicle.
[0035] The object identification is carried out, for example, by image classification or semantic segmentation, which is performed by the neural network 107. In the following, it is also generally referred to as a prediction task, which is performed by a neural network (which is accordingly referred to as a neural prediction network).
[0036] A neural network may be applied to input data from a domain for which it has not been trained or has not been trained sufficiently. In such a case, its prediction is unreliable. An autoencoder or a similar approach can be used to detect input data (e.g., images) for which a neural network is uncertain. However, these approaches use a separate representation of the input space and therefore cannot consider the uncertainty of the specific neural network. Furthermore, the problem of reconstructing, e.g., an input image, as performed in such approaches, is very different (and typically more difficult) than the prediction task to be performed by the neural network (target task), and therefore the transferability of the knowledge gained is questionable.
[0037] According to various embodiments, a learned representation is therefore used not only for the actual prediction task, but also for a further task, specifically the determination of an optical flow. In addition, the further task is solved in a second way, i.e., the optical flow is calculated using an independent (possibly non-deep learning-based) algorithm. The results of both calculations of the optical flow (once based on the representation and once based on the non-deep learning-based algorithm) are compared in order to detect an uncertainty in the result of the actual prediction task, i.e., the results of the prediction task are monitored in this way. In this case, a dense uncertainty can be determined when calculating the optical flow as a monitoring task, i.e.,The uncertainty does not refer to an entire input value (in the form of a value for the entire image) but also to parts of the image, since deviations between the optical flow calculation results can be determined pixel by pixel. These local uncertainties can then be taken into account, e.g., when controlling a robotic device. For example, when detecting local (image) uncertainties, a control policy can proceed according to the preference that uncertain areas should be avoided, and uncertainties in irrelevant areas can be ignored.
[0038] Fig. Figure 2 shows an architecture 200 for monitoring the execution of a prediction task. The architecture is implemented, for example, by the vehicle control device 102, and the prediction task is a task in the context of a driving task, such as object detection.
[0039] The architecture includes a multi-task neural network that performs (at least) the prediction task (target task) and, in parallel, calculates a prediction of the optical flow from a first input image 201 to a second input image 202.
[0040] The prediction task can be based on single images and the optical flow calculation is based on two (or more) consecutive images.
[0041] A neural feature extraction network 203 determines a respective representation 204, 205 (e.g., a feature map or a vector in a latent space) for each image 201, 202. A first task head (neural subnetwork for prediction) 206 for the prediction task determines a result 210 for the prediction task (e.g., segments the image) from the representation 204, 205 of an image (or, depending on the prediction task, also the representations of two or more images).
[0042] A second task head (neural subnetwork for the determination of an optical flow) uses, to monitor the execution of the prediction task, at least one representation used by the first task head 206 and the representation of at least one further image (e.g., takes both representations 204, 205, whereby the first task head 206 has used the representation 204 of the first image) and determines an optical flow from the representations.
[0043] The images whose representations the second task head 207 uses, e.g., the two images 201, 202, are also processed by another (e.g., not based on a neural network) separately implemented algorithm 208, so that in addition to the (first) result for the optical flow determined by the second task head 207, a second result for the optical flow is available. For the second algorithm 208, for example, a motion estimation algorithm such as that used in video compression or any other "classic" algorithm for determining an optical flow can be used. However, it can also be implemented by a neural network trained separately for this task.In each case, it implements a different, independent mapping (function) of two or more input images to an optical flow than that implemented by the sequential execution of feature extraction network 203 and second task head 207. In particular, for anomalies, i.e., input images for which feature extraction network 203 is poorly trained, algorithm 208 will therefore output a different optical flow than the sequential execution of feature extraction network 203 and second task head 207.
[0044] A comparator 209 compares these two results and can thereby calculate the value 211 of a local uncertainty (spatio-temporal) or a global deviation (or uncertainty) metric. The second result thus serves as a reference when monitoring the prediction task to detect (local) inequalities with the first result.
[0045] The second result can also be used (before, i.e., before being used to monitor the prediction task) as a label for training the first task head. Based on the comparison, difficult images can also be detected, which are then given greater weight during the training of the feature extraction network 203.
[0046] Comparator 209 can be configured to compensate for differences between the optical flow calculation methods. For this purpose, it can be appropriately trained during development, for example.
[0047] In summary, according to various embodiments, a method is provided as described in Fig. 3 shown.
[0048] Fig. 3 shows a flowchart 300 illustrating a method for verifying the performance of a prediction task by a neural network according to one embodiment.
[0049] In 301, image data are fed to a feature extraction network that is trained to determine a representation of the image data fed to it for performing the prediction task.
[0050] In 302, the representation determined by the feature extraction network (for the image data) is fed to a prediction network that is trained to perform the prediction task (for the image data).
[0051] The neural network whose performance of the prediction task is checked comprises the feature extraction network and the prediction network.
[0052] In 303, an optical flow between the image data and further image data from the representation is determined.
[0053] At 304, the optical flow between the image data and the further image data is determined once again from the image data using a different calculation path than by calculating the representation and determining the optical flow from the representation (for example, using another neural network or a "classical," i.e., non-deep learning-based algorithm). The optical flow is thus determined from the image data using two calculation paths, the second of which does not use the representation, i.e., operates independently of the representation (i.e., its result is not determined by the representation, or the calculation bypasses the representation) or can calculate the optical flow independently of such a representation. The two calculation paths thus implement different mapping rules between image data and optical flows.
[0054] In 305, the result of the first optical flow determination (from 303) and the result of the second optical flow determination (from 304) are compared, and a result of the prediction task is accepted as correct if the result of the first optical flow determination matches the result of the second optical flow determination within a specified tolerance. In other words, the result of the prediction task (from 302) is further processed depending on whether the two results match (taking a tolerance into account).
[0055] It should be noted that the above processing steps 301 to 305 do not necessarily need to be performed in the order shown. Furthermore, training can also be performed in parallel (e.g., training the feature extraction network of 301 in parallel with training the prediction network of 302).
[0056] The procedure of Fig.3 can be performed by one or more computers having one or more data processing units. The term “data processing unit” can be understood as any type of entity that enables the processing of data or signals. The data or signals can, for example, be treated according to at least one (i.e., one or more than one) specific function performed by the data processing unit. A data processing unit can comprise or be formed from an analog circuit, a digital circuit, a logic circuit, a microprocessor, a microcontroller, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a programmable gate array (FPGA) integrated circuit, or any combination thereof.Any other way of implementing the respective functions described in more detail herein may also be understood as a data processing unit or logic circuit arrangement. One or more of the method steps described in detail herein may be performed (e.g., implemented) by a data processing unit through one or more specific functions performed by the data processing unit.
[0057] According to various embodiments, the method is therefore particularly computer-implemented.
[0058] The prediction task can be used to generate a control signal for a robotic device. The term "robotic device" can be understood as referring to any technical system (with a mechanical part whose movement is controlled), such as a computer-controlled machine, a vehicle, a household appliance, a power tool, a manufacturing machine, a personal assistant, or an access control system.
[0059] The prediction task is monitored by the monitoring task so that anomalies can be detected. For example, the comparison provides an uncertainty measure, and if this uncertainty measure exceeds a threshold, an anomaly is reported. In response, the respective technical system is transferred to a safe mode (e.g., a vehicle's speed is reduced, a robot arm is stopped, etc.).
[0060] Various embodiments may use sensor signals from various sensors such as video, radar, LiDAR, ultrasound, motion, thermal imaging, etc. as input data. In particular, "image data" can be understood as any type of data in image form (i.e., values assigned to pixels), not necessarily only color image data. Accordingly, an optical flow may be an optical flow between sensor data assigned to pixels other than color image data. The sensor task may include classifying the sensor data or performing semantic segmentation on the sensor data, for example, to detect the presence of objects (in the environment in which the sensor data was obtained). In particular, embodiments are applicable to controlling and monitoring the execution of manipulation tasks, e.g., in assembly lines.
[0061] Embodiments can also be used to train (including validating and testing) a machine learning system by selecting suitable training data. For example, data with high uncertainty (local or global) regarding the performance of the prediction task is selected, transmitted to a computer (thereby reducing data traffic because only selected data is transmitted), and subsequently used for training, validation, or testing. Embodiments can thus be used for training (including learning a control policy), generating training data, and testing, verifying, or validating to check whether a trained ML system can be operated safely. An ML system trained in this way can then be used for the prediction task (where it can then continue to be monitored using the monitoring task).
Claims
[1] A method for checking the performance of a prediction task by a neural network, comprising: • feeding image data to a feature extraction network (203) which is trained to determine a respective representation of the image data for carrying out the prediction task for the image data fed to it; • feeding the representations (204, 205) determined by the feature extraction network (203) to a prediction network that is trained to perform the prediction task; • First determining an optical flow between at least two consecutive images (201, 202) of the image data from the representations (204, 205); • Secondly determining the optical flow between at least two consecutive images (201, 202) of the image data from the image data using a calculation method other than the calculation of the representation (204, 205) and the determination of the optical flow from the representation (204, 205); and • Comparing the result of the first optical flow determination with the result of the second optical flow determination and accepting a result of the prediction task as correct if the result of the first optical flow determination agrees with the result of the second optical flow determination within a specified tolerance. [2] The method according to claim 1, wherein the prediction task is a prediction task for controlling a robot device (101) and the robot device (101) is controlled on the basis of the result of the prediction task if the result of the first determination of the optical flow agrees with the result of the second determination of the optical flow within the predetermined tolerance. [3] Method according to claim 2, wherein a safety measure is taken in the control of the robot device if the result of the first determination of the optical flow does not agree with the result of the second determination of the optical flow within the predetermined tolerance. [4] Method according to one of claims 1 to 3, wherein a further training of the neural network is carried out if the result of the first determination of the optical flow does not agree with the result of the second determination of the optical flow within the predetermined tolerance. [5] Method according to one of claims 1 to 4, wherein the first determination of an optical flow between the at least two consecutive images of the image data from the representations is carried out by means of a neural task-head network and the neural task-head network is trained on the basis of labels determined by means of the other calculation path. [6] Method according to one of claims 1 to 5, wherein the at least two consecutive images are digital images and wherein the prediction task is an object classification of at least one object shown in the first digital image or a semantic segmentation of the first digital image. [7] Method according to claim 6, wherein the result of the first determination of the optical flow and the result of the second determination of the optical flow are compared image region by image region for a plurality of regions of the first digital image, the prediction task provides a production result for at least one of the regions and, for each region for which the prediction task provides a production result, the result of the prediction task is accepted as correct for a region if the result of the first determination of the optical flow agrees with the result of the second determination of the optical flow within a predetermined tolerance for the region. [8] Monitoring device which is arranged to carry out a method according to one of claims 1 to 7. [9] A computer program comprising instructions which, when executed by a processor, cause the processor (103) to perform a method according to any one of claims 1 to 7. [10] A computer-readable medium storing instructions which, when executed by a processor (103), cause the processor (103) to perform a method according to any one of claims 1 to 7.