Computer-implemented method for generating a training image for training a neural network
The method adjusts image resolution by subdividing and applying category-specific weightings to ensure important objects are preserved, addressing the issue of mismatched resolutions and enhancing neural network training.
Patent Information
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2026-03-26
AI Technical Summary
Existing methods for training neural networks face issues when training images have resolutions that do not match the required resolution, leading to narrow objects becoming unrecognizable due to pixel averaging, which can compromise the training process.
A method that adjusts the resolution of annotated images by subdividing them into pixel groups, applying category-specific weightings to determine new pixels, ensuring that important objects are preserved during resolution reduction.
Generates a suitable training image that maintains the visibility of narrow objects, enhancing the training process by emphasizing relevant categories, thus improving the neural network's object recognition capabilities.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[0001] The invention relates to a computer-implemented method for generating a training image for training a neural network. The invention also relates to a control device and a computer program for carrying out such a computer-implemented method.
[0002] A neural network capable of detecting at least one object in the vicinity of a vehicle, for example, is typically first trained to recognize that at least one object. During this training process, a training dataset, comprising numerous training images, is fed into the neural network. This dataset can include raw data from a camera, radar, LiDAR device, and / or other environmental sensing equipment. Furthermore, the training dataset can include annotated images, meaning images whose individual pixels are each assigned to a category from a predefined set of several categories.For example, using image pairs consisting of a captured image and an annotated image of the captured image, it can be determined during the training process whether output data of the neural network assigns a correct category to an object recognized in the captured image, i.e., the category that is assigned to the object in the annotated image.
[0003] The publication “Semantic segmentation with labeling uncertainty and class imbalance applied to vegetation mapping” by Patrick Olä Bressan et al. (International Journal of Applied Earth Observation and Geoinformation, 2022) describes an approach to determine weights for individual pixels during an annotation process. This approach considers the importance of a category as well as the uncertainty during the annotation process to achieve pixel-accurate weights during a training process, thereby increasing or decreasing the importance of individual pixels.
[0004] The publication “Soft labelling for budget-constrained semantic segmentation: Bringing coherence to label down-sampling” by Roberto Alcover-Couso et al. (arXiv preprint arXiv:2302.13961v2, 2023) addresses downsampling of training data in semantic segmentation due to limited resources, the need to adapt image size to model input, or to improve data magnification. Here, label downsampling is performed using soft labeling, which preserves label information after downsampling better than previous downsampling frameworks.
[0005] The publication “Towards Efficient and Accurate CT Segmentation via Edge-Preserving Probabilistic Downsampling” by Shahzad Ali et al. (arXiv preprint arXiv:2404.03991v1, April 5, 2024) concerns downsampling of medical data, where class uncertainties within a local window are exploited to generate soft labels, with a window size determining a downsampling factor.
[0006] The object of the invention is to provide a solution by means of which a suitable annotated training image is generated for carrying out a training process.
[0007] The problem is solved by the subject matter of the independent patent claims.
[0008] A first aspect of the invention relates to a computer-implemented method for generating a training image for training a neural network. While the method is being carried out, the neural network is, for example, at least partially, and in particular completely, untrained or is being trained. The generated training image can comprise a training dataset used to train the neural network. The computer-implemented method does not necessarily relate to training the neural network itself, but at least to generating the training image for training the neural network. The computer-implemented method is carried out, for example, by means of a control device. The control device is, for example, a computing unit, a computer, a server, and / or a cloud. The control device can be located in or outside of a motor vehicle.
[0009] The invention is based on the understanding that training data, particularly training images, are required during the training of a neural network and must have a predetermined resolution. The resolution is characterized, for example, by the number of pixels in the training image. If the training image has a different resolution than the predetermined resolution, this can lead to disadvantages and / or problems during training. Therefore, the resolution of the training image is typically adapted to the resolution requirement of the neural network, typically by reducing the resolution.However, reducing the resolution of an annotated image used as the training image can lead to a situation where a narrow object with a small diameter in at least one direction is no longer recognizable in the reduced-resolution image. This is because, for example, averaging the pixels in a sub-area of the annotated image might result in the object not being visible in the reduced-resolution version. Therefore, to generate a suitable training image for the training process, the annotated image should undergo a reasonable resolution adjustment.
[0010] The computer-implemented method involves providing an annotated image. Each pixel of the annotated image is assigned to a category from a predefined group of several categories. The category can be understood as a class. Alternatively, the annotated image can be described as a labeled image, in which each pixel has a category label or class label. The annotated image can be generated, for example, using a suitable neural network and / or created manually. In one example, the annotated image could describe the environment of a motor vehicle, specifically a traffic environment during a given situation. The group of several categories could, for example, distinguish between at least a road surface, another road user, a pedestrian, an infrastructure feature, and / or a background.Providing the annotated image includes, for example, receiving the annotated image from the control device that performs the computer-implemented procedure and preparing it for further processing; that is, the annotated image is available to the control device.
[0011] The computer-implemented method involves providing resolution reduction information. This information describes a predefined reduction of the resolution of the provided annotated image. The predefined reduction can alternatively be referred to as resolution reduction. For example, the predefined reduction might involve combining a specified number of pixels into a single pixel. The resolution reduction information describes how much the resolution of the annotated image should be reduced, that is, how many pixels should be combined into a single new pixel. The resolution reduction information is provided, for example, by the neural network being trained and can be specific to that network.In one example, it might be intended that ten or more or fewer pixels of the annotated image are combined into a single new pixel, so that an image composed of several single new pixels has a resolution that is reduced by a factor of ten, or more or less, than the resolution of the provided annotated image. Providing the resolution reduction information includes, for example, that the resolution reduction information is received by the control device that executes the computer-implemented procedure and prepared for further processing; that is, the resolution reduction information is available to the control device.
[0012] The computer-implemented method involves subdividing the provided annotated image into at least one pixel group. The number of pixels in each pixel group corresponds to the specified number according to the provided resolution reduction information. Thus, at least one group is formed, comprising several individual pixels. In a preferred example, the provided annotated image is subdivided into several pixel groups. The pixels within a pixel group are adjacent, meaning they are spatially adjacent without gaps. The pixel group can be understood, for example, as a cluster or collection of pixels within the annotated image. Therefore, the pixel group can be understood as a contiguous group of pixels.
[0013] The computer-implemented procedure involves identifying the single new pixel for each pixel group. A category for this single new pixel is determined by applying a pixel identification criterion. This criterion considers a fixed weighting and / or a weighting dependent on the provided annotated image for at least one category within the given group. In the case of weighting dependent on the provided annotated image, this weighting can, in an example, only depend on the provided annotated image for which the computer-implemented procedure is currently being performed. Therefore, the category of the single new pixel is not calculated by, for example, an unweighted average across all pixel values of the pixels in the pixel group; rather, the weighting is predefined and taken into account during the calculation.
[0014] Weighting can be understood as a rule that, for example, assigns a higher weight to one or more categories from the given group than to at least one other category from the same group. Alternatively, weighting can be understood as a weighting factor. The weighting is either fixed and thus, for example, the same every time the computer-implemented procedure is run. Alternatively, the weighting can be dynamically defined, being specific to the provided annotated image. In this case, for example, the weighting can first be calculated and then taken into account when applying the pixel determination criterion. In other words, the single new pixel for each individual pixel group is determined taking the weighting into account.The pixel determination criterion includes, for example, at least one algorithm and / or rule, the application or execution of which, based on the weighting, calculates the single new pixel for each pixel group. The pixel determination criterion can alternatively be understood as a pixel determination algorithm.
[0015] The computer-implemented method involves generating the training image from the new pixels identified for each pixel group. If the annotated image is divided into multiple pixel groups, the generated training image is composed of the new pixels identified for each of these groups. After performing the described computer-implemented method, the training image is ready to be used for training the neural network. However, the weighting used in the training image ensures that relatively few objects, particularly narrow objects, are represented by a small number of pixels. These objects would be reduced in size, or even lost, if the pixel categories within each pixel group were averaged.This generates a training image suitable for training a neural network, as objects of predefined categories are specifically preserved in the annotated image despite the resolution reduction. The resulting training image can alternatively be referred to as an annotated training image or another annotated image. Thus, the computer-implemented method generates a suitable annotated training image for conducting a training process.
[0016] An alternative (a) involves determining pixel count information for each pixel group and for each category within the given group when applying the pixel determination criterion. This is done, for example, for the provided annotated image from which the training image is generated. The pixel count information describes how many pixels of the pixel group are assigned to that category. For example, if the group distinguishes five different categories, it determines how many pixels in the annotated image are assigned to each of the five categories. This example can be applied to any number of categories included in the group.
[0017] A fixed weighting factor is assigned to each category. This factor can be stored in a list containing the predefined weighting factors for the various categories within the given group. To determine the single new pixel, a product is calculated for each category using the weighting factor assigned to that category and the pixel count information determined for that category. The category for which the calculated product represents an extreme value, such as a maximum value, is then assigned the new pixel.If, for example, the weighting is defined such that the smallest possible product of pixel count information and weighting factor is assigned to the category that should be weighted most heavily, a minimum value for the product can indicate which category the identified single new pixel can be assigned to. This ensures that, for the pixel group, a value is determined taking into account the categories actually present in this pixel group and the pixels assigned to each category, based on which the category of the single new pixel is meaningfully determined.
[0018] If, for example, infrastructure features such as streetlights are of interest, the category "Infrastructure Feature," and in particular the category "Streetlight," can be assigned a higher weighting factor compared to the other categories in the group. In one example, this high weighting factor is 5, and the weighting factor for the category "Background" is 1. Now, if in a pixel group comprising a total of 10 pixels there are 2 pixels assigned to the category "Infrastructure Feature" or "Streetlight," and 8 pixels assigned to the background, the resulting value for the category "Infrastructure Feature" or "Streetlight" is 10, and for the category "Background" it is 8.In this example, based on these two values, the single new pixel is assigned the category "Infrastructure Facility" or "Street Lamp," even though more pixels are assigned to the "Background" category. This is because the product of the weighting factor and the pixel count information reaches an extreme value, specifically a maximum, for this category. If the categories with the highest pixel count were averaged or given a predefined dominance, the single new pixel would be assigned to the "Background" category, meaning the street lamp might not be described at all, or only partially, by the training image.It is therefore possible to specify which category is of particular interest by assigning it a corresponding weighting factor, thereby increasing the probability that this category is represented in the training image, even if it is only assigned a few pixels in the annotated image compared to other categories. Thus, pre-selected categories can be given preference when identifying the single new pixels.
[0019] Alternative (b) proposes that when applying the pixel determination criterion, pixel count information is determined for each pixel group and for each category within the given group. This information describes how many pixels of the pixel group are assigned to that category. The pixel count information determined here can correspond to the pixel count information described above. Additionally, total pixel count information is determined for each category within the given group. This total pixel count information describes how many pixels of the annotated image are assigned to that category. Thus, the entire annotated image is considered, and not just the pixels of the currently viewed pixel group. Based on the total pixel count information, an overall weighting factor for the category is determined.When identifying the single new pixel, a product is calculated for each category from the overall weighting factor determined for that category and the pixel count information determined for that category. The category for which the product takes on an extreme value, specifically the one with the highest product, is assigned the new pixel. Thus, it is not assumed that each category is assigned a fixed, predetermined weighting factor; instead, the system considers the overall proportion of each category in the annotated image. For example, a narrow object might be identified because it has a low total pixel count, and this low total pixel count could be assigned a high overall weighting factor. This results in the narrow object category being assigned a high weighting compared to other categories in the given group.Ultimately, a weighting is achieved that is dynamically adapted to the annotated image, whereby individual categories can be emphasized depending on the situation, which might otherwise be lost.
[0020] Instead of determining the total pixel count information only for the annotated image, for example, several annotated images that are provided and for which the training image is generated can be considered simultaneously by determining the total pixel count information for the several annotated images together.
[0021] One embodiment of alternative (b) provides that the category with the smallest total pixel information compared to the other categories in the given group receives the largest total weighting factor compared to the total weighting factors for the other categories in the given group. If a small weighting factor were to be equated with a large weighting, the smallest total weighting factor would be determined. This makes it clear that determining the total weighting factor primarily allows for the emphasis of categories involving only a few pixels.
[0022] In a preferred example, the smaller the total pixel count information, the higher the overall weighting factor is chosen. This allows the system to automatically identify which categories are least frequently represented in the annotated image and ensures that these categories are likely to be present in the training image due to the high weighting assigned. Ultimately, this results in a weighting that emphasizes rare categories that might otherwise be lost.
[0023] Another embodiment of alternative (b) involves determining progressively smaller overall weighting factors for the category for which increasingly larger total pixel information is determined relative to the smallest total pixel information, compared to the largest overall weighting factor. The overall weighting factor is thus assigned sequentially depending on the total pixel information. The category most frequently present in the annotated image then receives the smallest overall weighting factor. This allows, for example, the relevance of the category "background," which is typically assigned a large number of pixels in the annotated image, to be kept low, since the background often has little relevance for object recognition.
[0024] Furthermore, one embodiment of alternative (b) provides that the determined largest overall weighting factor and / or all determined overall weighting factors are stored in a storage device and taken into account when generating a training image for another provided annotated image when applying the pixel determination criterion. It is therefore possible to determine the overall weighting factors for individual categories once using an annotated image and then, for example, save and use them for further annotated images, so that the overall weighting factors do not have to be determined repeatedly. This significantly simplifies the process, as it is not necessary to determine the total pixel count information and the overall weighting factor for each annotated image.The storage device is, for example, encompassed by the control device, or the control device can access the storage device.
[0025] According to another embodiment, each pixel in the annotated image is assigned a predefined pixel value for its category. This pixel value differs from the pixel values assigned to the other categories within the predefined group. In this case, each pixel value is assigned to exactly one category within the group, so that each category, or rather the pixels assigned to each category, can be uniquely distinguished from one another based on the pixel values assigned to that category. This also clarifies why averaging over pixel values within a given pixel group is not performed, as this could, for example, result in values that are not assigned to any category within the predefined group. Ultimately, any number of pixel values are possible, but they are always the same and therefore constant for a given category.This illustrates how the individual categories can be drawn in the annotated image without misinterpretations.
[0026] One embodiment involves using the generated training image in the training process of the neural network. Training with the generated training image can be part of the computer-implemented procedure. The neural network is, for example, a convolutional neural network (CNN) or another type of neural network. The training process can include providing and using additional training images as well as raw data (i.e., unannotated images). After training, the trained neural network can be used, for example, for object recognition.
[0027] For use cases or application situations that may arise during the procedure and are not explicitly described here, it may be provided that, according to the procedure, an error message and / or a request for user feedback is issued and / or a default setting and / or a predetermined initial state is set.
[0028] The invention also includes the control device for the motor vehicle. The control device can comprise a data processing device or a processor circuit configured to carry out an embodiment of the method according to the invention. For this purpose, the processor circuit can comprise at least one microprocessor and / or at least one microcontroller and / or at least one FPGA (Field Programmable Gate Array) and / or at least one DSP (Digital Signal Processor). In particular, a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), or an NPU (Neural Processing Unit) can be used as the microprocessor. Furthermore, the processor circuit can comprise program code configured to carry out the embodiment of the method according to the invention when executed by the processor circuit.The program code can be stored in a data memory of the processor device. The processor device can be based, for example, on at least one circuit board and / or on at least one SoC (System on Chip).
[0029] The invention also includes further developments of the control device according to the invention, which have features already described in connection with the exemplary embodiments of the computer-implemented method according to the invention. For this reason, the corresponding further developments are not described again here.
[0030] The motor vehicle is preferably designed as a motor vehicle, in particular as a passenger car or truck, or as a passenger bus or motorcycle.
[0031] One aspect of the invention relates to a computer program product comprising instructions that, when executed by a computer, such as the control device, cause it to perform the method described above. The computer program product is a computer program.
[0032] As a further solution, the invention also includes a computer-readable storage medium comprising program code which, when executed by a computer or a computer network, causes it to execute an embodiment of the method according to the invention. The storage medium can be provided at least partially as a non-volatile data storage medium (e.g., as flash memory and / or as an SSD - solid state drive) and / or at least partially as a volatile data storage medium (e.g., as RAM - random access memory). The storage medium can be located within the computer or computer network. However, the storage medium can also be operated, for example, as an app store server and / or cloud server on the internet. The computer or computer network can provide a processor circuit with, for example, at least one microprocessor.The program code can be provided as binary code, assembly code, source code in a programming language (e.g., C), or a program script (e.g., Python). Alternatively, the computer-readable storage medium can be implemented as a signal containing computer-readable data, such as a time-varying voltage signal or a radio signal.
[0033] The invention also includes combinations of the features of the described embodiments. The invention therefore also includes implementations that each have a combination of the features of several of the described embodiments, provided that the embodiments have not been described as mutually exclusive.
[0034] The figures show: Fig. 1. A schematic representation of an annotated image; and Fig. 2. A schematic representation of a signal flow graph of a method for generating a training image for training a neural network.
[0035] The exemplary embodiments described below are preferred embodiments of the invention. In these exemplary embodiments, the described components each represent individual features of the invention, which can be considered independently and each further develops the invention independently. Therefore, the disclosure is intended to include combinations of features of the embodiments other than those shown. Furthermore, the described embodiments can also be supplemented by further features of the invention already described.
[0036] In the figures, identical reference symbols denote functionally equivalent elements.
[0037] Fig. Figure 1 shows an annotated image 1 depicting the surroundings of a motor vehicle. Within this environment are various objects identified in the underlying image, such as a street lamp 2, another vehicle 3, a road surface 4, and a background 5. Each object is assigned to a category from a predefined set of categories, as illustrated in the annotated image 1. The different categories distinguish the aforementioned objects from one another: the street lamp 2, the vehicle 3, the road surface 4, and the background 5. Additional or different categories are possible.
[0038] The resolution of annotated image 1 is to be reduced. Reducing the resolution involves combining several individual pixels from annotated image 1 into a single new pixel 7 for each pixel group 6. A training image 8 can then be generated from these single new pixels 7.
[0039] Fig.Figure 2 shows a computer-implemented method for generating the training image 8 for training a neural network 14. In a process step S1, the annotated image 1 is provided. For this purpose, it can be received, for example, by a control device that executes the computer-implemented method. In a process step S2, resolution reduction information 9 is provided. The resolution reduction information 9 describes a predefined reduction of the resolution of the provided annotated image 1. The predefined reduction stipulates that a predefined number of pixels of the provided annotated image 1 are each combined into a single new pixel 7.
[0040] In process step S3, the provided annotated image 1 is subdivided into at least one pixel group 6. Here, the annotated image 1 is subdivided into several pixel groups 6. The number of pixels in pixel group 6 corresponds to the specified number according to the provided resolution reduction information 9. The individual pixels in pixel group 6 are always adjacent pixels. In process step S4, the single new pixel 7 is determined for each of the at least one pixel group 6. If multiple pixel groups 6 exist, several individual new pixels 7 are determined.
[0041] A category of the single new pixel 7 is determined, for example, by applying a pixel determination criterion 10. Pixel determination criterion 10 takes into account, for example, a fixed, predefined weighting. Alternatively or additionally, in one example, pixel determination criterion 10 takes into account a weighting dependent on the provided annotated image 1, which, for example, depends only on the provided annotated image 1. This weighting is provided for at least one category from the predefined group. In a process step S5, the training image 8 can be generated from the single new pixel 7 determined for the respective at least one pixel group 6, for example, by assembling it from the individual new pixels 7 that were determined for several pixel groups.
[0042] In a process step S6, it may be provided that the generated training image 8 is used in a training process of the neural network 14.
[0043] When applying pixel determination criterion 10, a pixel count information 11 can be determined for each pixel group 6 and for each category from the specified group. This information describes how many pixels of pixel group 6 are assigned to this category. Additionally, a fixed weighting factor 12 can be assumed for each category, which is stored, for example, in a list of weighting factors 12. When determining the single new pixel 7, a product of the weighting factor 12 specified for that category and the pixel count information 11 determined for that category can be calculated for each category. The category for which this product assumes an extreme value, in particular a highest value, is assigned to the respective single new pixel 7.
[0044] Alternatively or additionally, total pixel information can be determined for each category, describing how many pixels of the annotated image 1 are assigned to that category. Depending on this total pixel information, a total weighting factor 13 can be determined for the category. When determining the single new pixel 7, a product is calculated for each category from the total weighting factor 13 determined for that category and the pixel count information 11 determined for that category. The extreme value determined in this process, for example, the highest value, is then assigned to the single new pixel 7.
[0045] In one example, for the category with the smallest total pixel count compared to the other categories in the given group, the largest total weighting factor (13) can be determined, compared to the total weighting factors (13) for the other categories in the given group. For categories with increasing total pixel counts relative to the smallest total pixel count, progressively smaller total weighting factors (13) can be determined, compared to the largest total weighting factor (13). In another example, the largest determined total weighting factor (13) and / or all determined total weighting factors (13) can be stored in a storage device.If a training image 8 is generated for another provided annotated image 1, the stored total weighting factors 13 can be taken into account when applying the pixel determination criterion 10.
[0046] It may be provided that in the annotated image 1, each pixel is assigned a pixel value specified for its category, which differs from the pixel values assigned to the other categories of the specified group.
[0047] Overall, the examples demonstrate a method for reducing the resolution of annotated labels during semantic segmentation. The invention involves considering all pixels in the area of the annotated image 1 that is to be condensed into a single pixel. How this is best achieved depends on the application. In the context of autonomous vehicles, objects should not disappear. At the same time, certain pixels must be removed by downsampling the annotated image 1. In the example described above, when considering street lamp 2, the question arises as to which class (category) should be retained: the background or street lamp 2. Generally, it is the larger object that can afford to lose some pixels in favor of retaining the pixels of the smaller object. This idea is implemented by weighting the categories of each pixel according to its importance.Importance can be defined manually or by the inverse frequency in annotated image 1. The weighted pixels are counted category by category in pixel group 6, which is to be condensed into a single pixel (the single new pixel 7). The category with the most counts is the final category.
[0048] The invention relates to a computer-implemented method for generating a training image 8 for training a neural network 14, comprising: providing an annotated image 1, wherein each pixel 7 of the annotated image 1 is assigned to a category from a predetermined group of several categories; providing resolution reduction information 9, which describes a predetermined reduction of the resolution of the provided annotated image 1; subdividing the provided annotated image 1 into at least one pixel group 6 according to the provided resolution reduction information 9; for each at least one pixel group 6, determining the single new pixel 7, wherein a category of the single new pixel 7 is determined, taking into account a fixed and / or a weighting dependent on the provided annotated image 1 of at least one category from the predetermined group;and generating the training image 8 from the new pixel 7 determined for the respective at least one pixel group 6;
Claims
[1] Computer-implemented method for generating a training image (8) for training a neural network (14), comprising: - Providing an annotated image (1) wherein each pixel (7) of the annotated image (1) is assigned to a category from a predefined group of several categories; - Providing resolution reduction information (9) that describes a predefined reduction of the resolution of the provided annotated image (1), wherein the predefined reduction provides that a predefined number of pixels of the provided annotated image (1) are each combined into a single new pixel (7); - Dividing the provided annotated image (1) into at least one pixel group (6), wherein a number of pixels of the pixel group (6) corresponds to the specified number according to the provided resolution reduction information (9); - for each at least one pixel group (6), determining the single new pixel (7), wherein a category of the single new pixel (7) is determined by applying a pixel determination criterion (10) that takes into account a fixed and / or a weighting dependent on the provided annotated image (1) of at least one category from the given group of several categories; and - Generating the training image (8) from the new pixel (7) determined for the respective at least one pixel group (6); wherein, when applying the pixel determination criterion (10), pixel count information (11) is determined for each pixel group (6) and for each category from the given group of several categories, which describes how many pixels of the pixel group (6) are assigned to this category, and - in an alternative (a) a fixed weighting factor (12) is assumed for each category, wherein when determining the single new pixel (7) for each category a product is determined from the weighting factor (12) specified for that category and the pixel count information (11) determined for that category and the category for which the product assumes an extreme value is assigned to the new pixel (7), or - in an alternative (b) for each category from the given group of several categories, a total pixel count information (11) is determined, which describes how many pixels of the annotated image (1) are assigned to this category, and depending on the total pixel information, a total weighting factor (13) for the category is determined, wherein when determining the single new pixel (7) for each category, a product of the total weighting factor (13) determined for this category and the pixel count information (11) determined for this category is calculated, and the category for which the product takes on an extreme value is assigned to the new pixel (7). [2] Computer-implemented method according to alternative (b) of claim 1, wherein for the category for which the smallest total pixel information is determined compared with the other categories of the specified group, the largest total weighting factor (13) is determined compared with the total weighting factors (13) for the other categories of the specified group. [3] Computer-implemented method according to claim 2, wherein for the categories for which increasing total pixel information is determined in relation to the smallest total pixel information, progressively smaller total weighting factors (13) are determined compared with the largest total weighting factor (13). [4] Computer-implemented method according to alternative (b) of claim 1 or one of claims 2 or 3, wherein the determined largest total weighting factor (13) and / or all determined total weighting factors (13) are stored in a storage device and are taken into account when generating a training image (8) for a further provided annotated image (1) when applying the pixel determination criterion (10). [5] Computer-implemented method according to one of the preceding claims, wherein in the annotated image (1) each pixel is assigned a pixel value specified for its category, which differs from the pixel values assigned to the other categories of the specified group. [6] Computer-implemented method according to one of the preceding claims, wherein the generated training image (8) is used in a training process of a neural network (14). [7] Control device designed (1) to perform the procedure described above. [8] Computer program product comprising instructions which, when the program is executed by a computer, cause it to execute a method according to any one of claims 1 to 6.