Method and apparatus for processing training data set
By quantifying uncertainty in object detection data sets and updating the training data with uncertainty scores, the method improves model performance by filtering out noisy and redundant data, addressing the challenges of aleatoric uncertainty in object detection.
Patent Information
- Application Number
- PCT/CN2024/115398
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2026-03-05
AI Technical Summary
Deep learning models for object detection face challenges due to aleatoric uncertainty arising from noisy and occluded objects in training data sets, leading to poor model performance.
A method to quantify uncertainty in object detection data sets by determining uncertainty scores for object instances using Mahalanobis distances and Gaussian distributions, and update the training data set with these scores to improve model training.
Enhances the performance of object detection models by filtering out noisy and redundant data, leading to improved accuracy and robustness in object detection tasks.
Smart Images

Figure CN2024115398_05032026_PF_FP_ABST
Abstract
Description
METHOD AND APPARATUS FOR PROCESSING TRAINING DATA SETFIELD
[0001] Aspects of the present disclosure relate generally to artificial intelligence (AI) , and more particularly, to method and apparatus for processing a training data set.BACKGROUND
[0002] Deep learning has achieved remarkable success in a wide range of scenarios and applications for predictive tasks, such as image classification, semantic segmentation, and object detection. Data sets collected from the open world unavoidably suffer from various randomness or noise, resulting in the widespread of the data’s inherent uncertainty, which is also referred to as aleatoric uncertainty or data uncertainty.
[0003] Compared to images with centric and similar-scale objects in classification benchmarks, images in object detection data sets are typically scene-centric and contain multiple objects in varying scales. Especially, some objects are accompanied by occlusion, obscureness and even noisy annotations due to limited resource and time for annotating, so these issues would be natural sources of aleatoric uncertainty for object detection.
[0004] If aleatoric uncertainty may be quantified for object detection task, it would be helpful for the construction of more resilient models that can accommodate and flexibly respond to conditions characterized by inherent uncertainty.SUMMARY
[0005] In order to address the above-mentioned problem, the disclosure proposes a method for processing a training data set to quantify uncertainty for object instances in the training data set, so as to provide enhanced training data set including the uncertainty quantifications. Furthermore, the disclosure proposes a method for training an object detection model based on the enhanced training data set, so as to provide trained model having improved performance.
[0006] According to an embodiment, there provides a computer implemented method for processing a training data set, comprising: processing a plurality of images of the training data set by a vison foundation model to obtain a plurality of first feature sequences of the plurality of images, wherein the training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of one or more object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance; obtaining a plurality of second feature vectors of a plurality of object instances of the training data set based on the first label and / or the second label corresponding to each of the plurality of object instances and the plurality of first feature sequences; determining uncertainty scores of the plurality of object instances of the training data set based on the plurality of second feature vectors; and updating the training data set with the uncertainty scores of the plurality of object instances.
[0007] According to an embodiment, there provides a computer implemented method for training a neural network (NN) model for performing object detection, comprising: processing images of a training data set by the NN model to detect object instances and corresponding classifications, wherein the training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of one or more object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance, a third label corresponding to a classification of the object instance and a fourth label corresponding to a uncertainty score of the object instance; determining a loss based at least in part on uncertainty scores included in the training data set; and updating learnable parameters of the NN model based on the loss.
[0008] According to an embodiment, there provides an apparatus for processing a training data set, comprising: an image encoding module for processing a plurality of images of the training data set to obtain a plurality of first feature sequences of the plurality of images, wherein the training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of one or more object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance; an object feature generating module for generating a plurality of second feature vectors of a plurality of object instances of the training data set based on the first label and / or the second label corresponding to each of the plurality of object instances and the plurality of first feature sequences; an uncertainty score determining module for determining uncertainty scores of the plurality of object instances of the training data set based on the plurality of second feature vectors; and an updating module for updating the training data set with the uncertainty scores of the plurality of object instances.
[0009] According to an embodiment, there provides an apparatus for training a neural network (NN) model for performing object detection, comprising: a predicting module for processing images of a training data set by using the NN model to predict object instances and corresponding classifications, wherein the training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of one or more object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance, a third label corresponding to a classification of the object instance and a fourth label corresponding to a uncertainty score of the object instance; a loss determining module for determining a loss based at least in part on uncertainty scores included in the training data set; and an updating module for updating learnable parameters of the NN model based on the loss.
[0010] According to an embodiment, there provides a computer system, which comprises one or more processors and one or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the method as mentioned above as well as to perform the operations of the method according to aspects of the disclosure.
[0011] According to an embodiment, there provides one or more computer readable storage media storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method as mentioned above as well as to perform the operations of the method according to aspects of the disclosure.
[0012] According to an embodiment, there provides a computer program product comprising computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method as mentioned above as well as to perform the operations of the method according to aspects of the disclosure.BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The disclosed aspects will hereinafter be described in connection with the appended drawings that are provided to illustrate and not to limit the disclosed aspects.
[0014] Fig. 1 is a schematic block diagram illustrating an apparatus for quantifying uncertainty for object instances in a training data set according to aspects of the disclosure.
[0015] Fig. 2A illustrates the distribution of uncertainty scores of object instances for an exemplary training data set according to aspects of the disclosure.
[0016] Figs. 2B to 2G each illustrates the distribution of uncertainty scores of object instances belong to a specific classification for an exemplary training data set according to aspects of the disclosure.
[0017] Fig. 3 illustrates exemplary object instances with uncertainty scores in training images of an exemplary training data set according to aspects of the disclosure.
[0018] Fig. 4 is a schematic block diagram illustrating an apparatus for quantifying uncertainty for object instances in a training data set according to aspects of the disclosure.
[0019] Figs. 5 to 7 each is a schematic block diagram illustrating an apparatus for filtering a training data set based on uncertainty scores of object instances according to aspects of the disclosure.
[0020] Fig. 8 is a schematic block diagram illustrating an apparatus for training a NN model for performing object detection according to aspects of the disclosure.
[0021] Fig. 9 illustrates an exemplary process for processing a training data set according to aspects of the disclosure.
[0022] Fig. 10 illustrates an exemplary process for training a neural network (NN) model for performing object detection.
[0023] Fig. 11 illustrates an exemplary apparatus for processing a training data set according to aspects of the disclosure.
[0024] Fig. 12 illustrates an exemplary apparatus for training a neural network (NN) model for performing object detection according to aspects of the disclosure.
[0025] Fig. 13 illustrates an exemplary computing system according to aspects of the disclosure.DETAILED DESCRIPTION
[0026] The present disclosure will now be discussed with reference to several example implementations. It is to be understood that these implementations are discussed only for enabling those skilled in the art to better understand and thus implement the embodiments of the present disclosure, rather than suggesting any limitations on the scope of the present disclosure.
[0027] Various embodiments will be described in detail with reference to the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings to refer to the same or like parts. References made to particular examples and embodiments are for illustrative purposes, and are not intended to limit the scope of the disclosure.
[0028] Fig. 1 is a schematic block diagram illustrating an apparatus for quantifying uncertainty for object instances in a training data set according to aspects of the disclosure.
[0029] As data collection and annotation processes inevitably suffer from varying degrees of corruption, aleatoric uncertainty (i.e., data uncertainty) is ubiquitous in real-world data sets. Accurately quantifying data uncertainty can help better understand training data so as to utilize it more efficiently and reliably, especially for modern large-scale training data sets. The apparatus 1 takes a training data set as input, the training data set includes image-label pairs: where N denotes the number of image-label pairs, xi denotes an i-th image or an image xi, and yi denotes a set of one or more ground-truths for each image xi. In an embodiment, where M denotes the number of object instances, bj, cj and sj respectively represent the bounding box, classification and mask of the j-th object instance or object instance zj of the i-th image. M may be an integer equal to one or larger than one. For example, represents coordinates of two opposite corners of the bounding box, or represents coordinate of the center point of the bounding box and the width and height of the bounding box. For example, sj represents binary mask of the object instance zj, where the mask sj may have the same dimension as the image xi, and pixels with value “1”correspond to the object instance and pixels with value “0” correspond to the area outside the object instance. For example, cj∈ {1, …, K} represents the classification of the object instance zj, where K is the number of classifications in the training data set. It is appreciated that the training data set may not include all the elements bj, cj and sj for an object instance zj. For example, the masks sj may not be included in the training data set for a part of object instances zj, while the masks sj may be included in the training data set for the other part of object instances zj.
[0030] As illustrated in Fig. 1, apparatus 1 includes an image encoding module 110, an object feature generating module 120 and an uncertainty score determining module 130. The image encoding module 110 may also be referred to as an image feature backbone network, it takes an image I as input and output the image’s feature embedding IE which includes a plurality of image tokens IT, where the image I is an image xi in the training data set. The image feature embedding IE composed of image tokens IT represents the features of the image I in the latent space. A token is represented as a vector, such as a C-dimension vector, where C can be 64, 128, 256 and so on, therefore the term image token may also be referred to as image vector. The image feature embedding IE may also be referred to as an image feature sequence, which includes a plurality of image feature vectors. In other words, the collection of image tokens or image vectors of the image I may be referred to as the image feature sequence or the image feature embedding of the image I. For example, the image I may be of a size 896 × 896, and may be partitioned into 3136 patches with a patch size 16 ×16. It is appreciated that the image and the patch may be of other sizes. The image encoding module 110 may process the 3136 patches and output a sequence of 3136 image tokens, each image token may be represented as a C-dimensional vector, and C =128 is taken as an example for sake of easy description.
[0031] In an embodiment, the image encoding module 110 may be implemented by using pretrained vision foundation models. Object instances of each classification carry a set of discriminative features. When these features of an object instance are salient and obvious, the object instance can be easily detected and assigned to its semantic classification, and thus the aleatoric uncertainty of the object instance may be low. However, when some of these features of an object instance are occluded or missing, the aleatoric uncertainty increases, making it more challenging to localize and classify the object instance. Vision foundation models have learned rich and well-structured features from large-scale training data, enabling them to obtain features of images from diverse perspectives. In an embodiment, the image encoding module 110 may be implemented using the vision encoder of a Segment Anything Model (SAM) . In another embodiment, the image encoding module 110 may be implemented using the vision encoder of a FeatureUP model. SAM was trained on the expansive SA-1B data set that contains more than 1 billion masks spread over 11 million carefully curated images and has established superior performance in addressing open-world vision tasks. SAM’s vision encoder outputs high-resolution feature maps, which is beneficial for processing object detection data sets where objects can vary significantly in size. It is appreciated that the image encoding module 110 can be implemented by using any suitable NN model for extracting image features in latent space.
[0032] The object feature generating module 120 obtains a feature vector for each object instance zj based on the feature embedding IE of the image xi and at least one of the bounding box bj and the mask sj of the object instance zj, which are illustrated as labels or ground-truth G in Fig. 1. Continuing the above example, where the image xi may be of a size 896 × 896, and may be partitioned into 3136 patches with a patch size 16 × 16, the image encoding module 110 encodes the image into feature embedding IE including 3136 image feature vectors.
[0033] In an embodiment, the object feature generating module 120 determines the patches that are covered by the bounding box bj. For example, a patch is determined as being covered by the bounding box bj if at least one pixel of the patch is covered by the bounding box bj. The object feature generating module 120 determines feature vectors corresponding to the patches covered by the bounding box bj from the image embedding which includes the 3136 image feature vectors, and determines the feature vector OV for the object instance zjbased on the determined feature vectors corresponding to the bounding box bj. For example, the object feature generating module 120 determines the feature vector OV for the object instance zj by averaging the determined feature vectors corresponding to the bounding box bj.
[0034] In another embodiment, the object feature generating module 120 determines the patches that are covered by the mask sj. For example, a patch is determined as being covered by the mask sj if at least one pixel of the patch is covered by the mask sj. The object feature generating module 120 determines feature vectors corresponding to the patches covered by mask sj from the image embedding, and determines the feature vector OV for the object instance zj based on the determined feature vectors corresponding to the mask sj. For example, the object feature generating module 120 determines the feature vector OV for the object instance zj by averaging the determined feature vectors corresponding to the mask sj.
[0035] In another embodiment, the object feature generating module 120 determines the patches that are covered by both the bounding box bj and the mask sj. In another embodiment, the object feature generating module 120 determines the patches that are covered by at least one of the bounding box bj and the mask sj. The object feature generating module 120 determines feature vectors corresponding to the determined patches from the image embedding, and determines the feature vector OV for the object instance zj based on the determined feature vectors. For example, the object feature generating module 120 determines the feature vector OV for the object instance zj by averaging the determined feature vectors.
[0036] In another embodiment, the object feature generating module 120 determines the patches that are covered by the mask sj or by the bounding box bj in a prioritized way. For an object instance zj, if there is mask sj in the labels, the object feature generating module 120 determines the patches that are covered by the mask sj, and if there is no mask sj in the labels, the object feature generating module 120 determines the patches that are covered by the bounding box bj. As the mask sj may be more precise to indicate the object instance than the bounding box bj, the feature vectors corresponding to the object instance may be more precisely obtained. In another example, if there is no mask sj in the labels, a segmentation model such as SAM may be used to generate the mask sj of the object instance zj based on the bounding box bj and the image xi, and then the object feature generating module 120 determines the patches that are covered by the generated mask sj. The object feature generating module 120 determines feature vectors corresponding to the determined patches, and determines the feature vector OV for the object instance zj based on the determined feature vectors.
[0037] After processing all the image-label pairs of the training data set by the image encoding module 110 and the object feature generating module 120, the feature vectors of all the object instances represented by the labels of the training data set are obtained. Let V (·) denote the feature map layer of the image encoding module 110, for example, the feature map layer of the vision encoder in SAM, each image’s feature embedding obtained by the image encoding module 110 is denoted as V (xi) , and each object instance’s feature vector obtained by the object feature generating module 120 may be denoted as V (zj) .
[0038] The uncertainty score determining module 130 determines uncertainty scores US for the object instances of the training data set based on the feature vectors OV of the object instances. In an embodiment, to quantify data uncertainty of object instances, the training data distribution may be modeled by fitting a multivariate Gaussian distribution in the feature space V (zj) of the object instances. From the perspective of data distribution, it is anticipated that easy samples of object instances with low uncertainty will be closely crowded together, while hard and / or noisy ones with high uncertainty will be far away from the population and more dispersed. From the perspective of density estimation within feature distribution, a Mahalanobis distance-based uncertainty score may be derived to represent aleatoric uncertainty. The conditional Gaussian distribution with the class k can be defined as
[0039] Where μk is the mean vector for classification k, and Σ is an averaged covariance matrix shared by all classifications for all training object instances, which may also be referred to training samples. In an example, the mean vector μk and covariance matrix Σ may be estimated by
[0040] Where Nk is the number of training samples (i.e., object instances) with the classification label cj=k.
[0041] Based on the classification-conditional Gaussian distributions parameterized by μk and Σ, the Mahalanobis distance between the training object instance z and the corresponding class-conditional Gaussian distribution may be measured to represent the aleatoric uncertainty of each object instance in the training set. The Mahalanobis distance may be determined by
[0042] The Mahalanobis distance of the object instance zj measures the distance between the object instance zj and the centroid of the classification cj. A small indicates that the object instance zj has typical features of the sub-population belonging to this classification cj and thus has low data uncertainty. Oppositely, the object instance with the high tends to contain ambiguous information (i.e., insufficient identifying characteristic) or noisy annotation (i.e., ambiguous bounding box or even wrong classification label) and thus has high data uncertainty.
[0043] In an embodiment, in order to more conveniently exploit data uncertainty, the Mahalanobis distances may be normalized to a range of [0, 1] . For example, the normalization may be performed through a combination of log transformation and min-max normalization techniques:
[0044] According to equation (4) , the Mahalanobis distances of object instances belonging to each classification are individually normalized to a range of [0, 1] . The normalized distance d (zj∣cj) of the object instance zj may be taken as the uncertainty score of the object instance zj. In an embodiment, the uncertainty score determining module 130 determines uncertainty scores d (zj∣cj) for the object instances of the training data set based on the feature vectors OV and the classification labels of the object instances, as described in equations (2) to (4) . It is appreciated that although the Mahalanobis distances of the object instances is used to determine the uncertainty scores of the object instances in the illustrated embodiment, the disclosure is not limited to the specific example of Mahalanobis distances and other suitable distances of the object instances reflecting the data distribution of the object instances can be employed to determine the uncertainty scores of the object instances according to aspects of the disclosure.
[0045] Fig. 2A illustrates the distribution of uncertainty scores of object instances for an exemplary training data set of MS-COCO according to aspects of the disclosure. Figs. 2B to 2G each illustrates the distribution of uncertainty scores of object instances belong to a specific classification for an exemplary training data set of MS-COCO according to aspects of the disclosure.
[0046] The horizontal axis of each of Figs. 2A to 2G denotes the data uncertainty scores of object instances in the training data set, the vertical axis denotes frequency or number of the uncertainty score. Fig. 2A is a histogram of uncertainty scores d (zj∣cj) for the overall object instances of the training data set. Figs. 2B to 2G each is a histogram of uncertainty scores d (zj∣cj) for the object instances belonging to a specific exemplary classification. Specifically, Figs. 2B to 2G respectively correspond to classifications “bus” , “zebra” , “backpack” , “dog” , “bird” and “cell phone” of the training data set. It can be seen from the histograms of Figs. 2A to 2G that a small percentage (approximately 5%-10%) of samples exhibit high uncertainty scores, implying the presence of noisy objects within the data set. Additionally, a significant proportion of objects in the training data set are characterized as difficult / hard, as evidenced by the high density of uncertainty scores within the range of 0.5 -0.6.
[0047] Fig. 3 illustrates exemplary object instances with uncertainty scores in training images of an exemplary training data set of MS-COCO according to aspects of the disclosure.
[0048] The four rows of Fig. 3 respectively illustrate object instances belonging to classifications “bus” , “zebra” , “dog” and “bird” . The bounding boxes shown in the images are the annotated ground truth. Taking the first row as an example, the “easy” object instances denoted as “E” have small uncertainty scores denoted as “S” , the “hard” object instances denoted as “H” have intermediate uncertainty scores, and the “noisy” object instances denoted as “N” have high uncertainty scores, where the “hard” object instances suffer from occlusion or obscureness within an image, and the “noisy” object instances have misleading bounding boxes.
[0049] As illustrated in Fig. 3, a high level of agreement between human visual perception and the calculated uncertainty scores obtained by apparatus 1 can be observed. The empirical investigation as illustrated in Figs. 2A to 3 suggests that: the low data uncertainty score represents an easy sample that can be readily recognized by humans or models due to abundant and unbroken features; the object instances with medium uncertainty scores are often located in distant positions or partially obscured within an image, posing challenges for accurate classification and detection; the objects instances with high uncertainty often indicate low-quality samples, which may stem from unrecognizable instances or misleading annotated bounding boxes and categories. These objects instances are prone to being regarded as data noise due to their ambiguity or inconsistency.
[0050] Returning to Fig. 1, after obtaining the uncertainty score d (zj∣cj) of each object instance zj, the training data set may be updated based on the uncertainty scores. For example, the uncertainty score d (zj∣cj) of an object instance zj may be saved as an additional label of the object instance zj in the training data set. The set of labels of the object instance zj may be updated as yj= (bj, cj, sj, uj) , where uj is the uncertainty score d (zj∣cj) of the object instance zj. Accordingly, for the above exampled image-label pair (xi, yi) , the set of ground-truths become
[0051] Fig. 4 is a schematic block diagram illustrating an apparatus for quantifying uncertainty for object instances in a training data set according to aspects of the disclosure. Same or similar modules are denoted by same or similar reference numerals in Figs. 1 and 4.
[0052] The apparatus 4 takes a training data set as input, the training data set includes image-label pairs: where N denotes the number of image-label pairs, xi denotes an i-th image or an image xi, and yi denotes a set of ground-truths for each image xi. In an embodiment, where M denotes the number of object instances, bj and sj respectively represent the bounding box and mask of the j-th object instance or object instance zj of the i-th image. Compared to the embodiment described with reference to Fig. 1, the ground truth of the training data set does not include the classification labels cj.
[0053] The image encoding module 110 and the object feature generating module 120 of apparatus 4 are same as the image encoding module 110 and the object feature generating module 120 of apparatus 1 and thus details of the two modules are not repetitively described.
[0054] The uncertainty score determining module 430 of apparatus 4 includes a clustering sub-module 4310 and an uncertainty score determining sub-module 4320. The clustering sub-module 4310 clusters the feature vectors V (zj) of the object instances zj of the training data set into a plurality of classifications and accordingly assigns a corresponding classification to each object instances. Then the uncertainty score determining sub-module 4320 determines uncertainty scores d (zj∣cj) for the object instances of the training data set based on the feature vectors V (zj) and the classification labels assigned to the object instances. The operation of the uncertainty score determining sub-module 4320 is same or similar to the operation of the uncertainty score determining module 130, and thus is not repetitively described in detail.
[0055] In an embodiment, the clustering sub-module 4310 may be implemented by using a Gaussian Mixture Model (GMM) . GMM is a known model that can group the samples, i.e., the feature vectors V (zj) of the object instances zj of the training data set, into a plurality of clusters corresponding to respective Gaussian distributions. GMM can output the mean vector μk and covariance matrix Σk of each Gaussian distribution corresponding to cluster or classification k. Therefore uncertainty score determining sub-module 4320 can use the mean vector μk and covariance matrix Σk as described in equation (2) . It is appreciated that the clustering sub-module 4310 may be implemented by using any suitable clustering method.
[0056] Fig. 5 a schematic block diagram illustrating an apparatus for filtering a training data set based on uncertainty scores of object instances according to aspects of the disclosure. Same or similar modules are denoted by same or similar reference numerals in Figs. 1, 4 and 5.
[0057] The image encoding module 110, the object feature generating module 120 and the uncertainty score determining module 130 of apparatus 5 are same as the modules 110, 120 and 130 of apparatus 1 and thus details of the modules are not repetitively described. In a variant embodiment, the uncertainty score determining module 130 of apparatus 5 may be replaced with the uncertainty score determining module 430 of apparatus 4.
[0058] The apparatus 5 may further include a noisy object instance filtering module 550. The noisy object instance filtering module 550 filters out noisy object instances from the training data set based on the uncertainty scores of object instances. As shown in Figs. 2A to 2G and 3, some object instances have incomplete distinguished features or incorrect annotations, which can damage model training and lead to poor predictive performance. In this embodiment, noisy object instance filtering module 550 may be configured to discard possible noisy samples that are harmful to the model learning during the training process. Specifically, a quantile function may be employed to discard object instances with high uncertainty scores. Let Fi denote the cumulative distribution function (CDF) of uncertainty scores over all classifications of the training data set, and then the inverse function of CDF represents its quantile function:
[0059] Where inf refers to infimum, that is, denotes the minimum uncertainty score d that satisfies p≤Fj (d (zj∣cj) ) .
[0060] In an embodiment, the object instances that are smaller than the specific quantile (e. g, p = 95%) of the training data set may be retained and used for model training while the other object instances may be discarded or filtered out, where
[0061] The superscript “N*M” in equation (6) indicates that there are N image-label pair in the training data set and each image-label pair includes M object instances. It is appreciated that the number of object instances in each image-label pair may be not fixed, and the superscript “N*M” in equation (6) may be used to generally indicate the total number of object instances of the training data set.
[0062] In another embodiment, the filtering of the object instances may be performed according to per classification. Specifically, the inverse function of CDF of each classification cj may be determined, and then object instances of each classification cj that are smaller than the specific quantile (e. g, p = 95%) of the training data subset corresponding to the classification cj may be retained and used for model training while the other object instances may be discarded or filtered out, where the retained object instances may be denoted as
[0063] Where Nk is the number of object instances with the classification label cj=k, K is the number of classifications of the training data set.
[0064] In this embodiment, potential classification-imbalanced issues in the training data set may be addressed by discarding noisy objects according to per classification.
[0065] Fig. 6 a schematic block diagram illustrating an apparatus for filtering a training data set based on uncertainty scores of object instances according to aspects of the disclosure. Same or similar modules are denoted by same or similar reference numerals in Figs. 1, 4 to 6.
[0066] The image encoding module 110, the object feature generating module 120 and the uncertainty score determining module 130 of apparatus 6 are same as the modules 110, 120 and 130 of apparatus 5 and thus detailed operations of the modules are not repetitively described.
[0067] The apparatus 6 may further include a redundant object instance filtering module 650. The redundant object instance filtering module 650 filters out redundant object instances from the training data set based on the uncertainty scores of object instances. Object detection training data sets, such as MS-COCO, typically contain numerous similar object instances. Therefore, an additional useful application of the uncertainty score is eliminating potentially redundant objects from the training set. Object instances with closely clustered uncertainty scores within each classification often exhibit similar or common patterns. Consequently, the model may only need to learn from a subset of these object instances to achieve satisfactory performance. Therefore, a certain proportion of object instances, which are referred to as valuable samples, may be selected from each sub-population with close uncertainty scores to enhance training efficiency while preserving model performance.
[0068] In an embodiment, object instances associated with each classification cj of the training data set may be grouped or divided into a plurality of uncertainty score interval bins, then a percentage of object instances may be discarded from each of uncertainty score interval bins. For example, the percentage p (e. g, p = 10%) of object instances may be dropped, randomly, evenly, or the like, from each of uncertainty score interval bins. Let Q denote the number of the plurality of uncertainty score interval bins, Iq denote the q-th interval bin, and denote the set of indices of samples with classification cj whose uncertainty scores fall into the q-th interval bin, then the retained object instances may be denoted as:
[0069] where Nb is the number of remaining objects in each interval bin Iq for each classification cj, that is, Nb / Nk= (1-p) .
[0070] In an embodiment, the Q interval bins may be equal intervals, that is, and In another embodiment, the Q interval bins may be intervals respectively having equal number of object instances, that is, and
[0071] Fig. 7 a schematic block diagram illustrating an apparatus for filtering a training data set based on uncertainty scores of object instances according to aspects of the disclosure. Same or similar modules are denoted by same or similar reference numerals in Figs. 1, 4 to 7.
[0072] The image encoding module 110, the object feature generating module 120 and the uncertainty score determining module 130 of apparatus 7 are same as the modules 110, 120 and 130 of apparatus 5 or 6. The apparatus 7 may further include an object instance filtering module 750. The object instance filtering module 750 includes the noisy object instance filtering module 550 as described in Fig. 5 and the redundant object instance filtering module 650 as described in Fig. 6. In an embodiment, the noisy object instance filtering module 550 filters out noisy object instances from the training data set based on the uncertainty scores of object instances so as to obtain a first filtered training data set, and the redundant object instance filtering module 650 filters out redundant object instances from the first filtered training data set based on the uncertainty scores of object instances so as to obtain a second filtered training data set. In an embodiment, the redundant object instance filtering module 650 filters out redundant object instances from the training data set based on the uncertainty scores of object instances so as to obtain a first filtered training data set, and the noisy object instance filtering module 550 filters out noisy object instances from the first filtered training data set based on the uncertainty scores of object instances so as to obtain a second filtered training data set.
[0073] Fig. 8 a schematic block diagram illustrating an apparatus for training a NN model for performing object detection according to aspects of the disclosure.
[0074] The apparatus 8 includes an object detection module 810, which processes an image I to predict the objects OB in the image. For example, the detected objects may be represented by bounding boxes in the image. It is appreciated that the object detection module 810 may be implemented by using any suitable NN model for an object detection task. For example, the object detection module 810 may be implemented by using a state-of-the-art DETR (Detection Transformer) with Improved deNoising anchOr boxes (DINO) model. As another example, the object detection module 810 may be implemented by using an anchor-free YOLOX model.
[0075] The loss determination module 820 obtains a loss L based on the predictions OB and the ground-truth G corresponding to the images in the image-pairs of the training data set. In an embodiment, the ground-truth G includes the uncertainty scores of the object instances. For example, for an image-label pair (xi, yi) , the set of ground-truths may be as described above. The training data set for training the object detection module 810 may be a first updated training data set obtained by incorporating uncertainty scores of the object instances into the original training data set, may be a second updated training data set obtained by performing noisy object filtering as illustrated in Fig. 5, may be a third updated training data set obtained by performing redundant object filtering as illustrated in Fig. 6, may be a fourth updated training data set obtained by performing noisy object filtering and redundant object filtering as illustrated in Fig. 7.
[0076] The uncertainty scores of the object instances of the training data set serve as a valuable tool for characterizing each object instance’s difficulty and noise level, as demonstrated in Fig. 3. Therefore, it is worth exploring how to leverage this knowledge to enhance model performance. The object detection NN models usually optimize multiple losses, e.g., L=Lcls+Lbox+Lobj, where the Lcls refers to classification loss, Lbox refers to box loss, and Lobj refers to object loss, the three loss formations are all known losses and their details are not described, it is appreciated that the overall loss L may include one or more of the three losses and may also include other loss. The standard training loss formulation is data uncertainty agnostic. The previous work, such as focal loss, primarily focuses on fitting hard samples and mitigating overfitting to easy samples. It is defined as LFL=- (1-Pt) γlog (Pt) , where Pt is the model’s predictive probability of the ground-truth class and γ is a predefined coefficient designed to alleviate the model overfitting to the already confident (i.e., Pt close to 1) majority class. Yet, the focal loss is sensitive to coefficient γ and may lead to inappropriate or even harmful regularization for some samples based on the predicted probability.
[0077] To address this issue, in an embodiment, data uncertainty scores d (zj∣cj) are incorporated into classification loss Lcls. For example, an uncertainty-aware entropy is proposed to regularize the binary cross-entropy loss. Besides, prior work has demonstrated that cross-entropy loss equipped with a maximum-entropy regularizer can be interpreted as the lower bound of focal loss, resulting in the ability of the proposed uncertainty-aware entropy regularizer to ensure the optimal performance of the model. In an embodiment, the sample adaptive classification loss may be:
[0078] Where fθ (zj) and respectively refer to the predictive binary probability distribution and corresponding entropy. β is a predefined coefficient to control the strength of entropy regularization, which generally ranges from (0.1, 0.3) . It is appreciated that the number of object instances in each image-label pair may be not fixed, and the superscript “N*M” in equation (9) may be used to generally indicate the total number of object instances of the training data set.
[0079] It is appreciated that the classification loss illustrated in equation (9) is a component of the overall loss, and other components of the overall loss may include any suitable componential losses such as one or more of the Lbox, Lobj as well as others.
[0080] It is appreciated that since the per-object uncertainty score can be estimated once before training according to embodiments of the disclosure, the proposed training objective scarcely introduces additional computing overhead.
[0081] After obtaining the loss L by module 820, an optimizer is used to optimize the learnable parameters of the model 810. It is appreciated that any suitable optimizer may be employed to optimize the learnable parameters of the model 810. In an implementation, the known AdamW optimizer may be used to update the learnable parameters of the model 810 based on the loss L.
[0082] To verify the effectiveness of the proposed aleatoric uncertainty measure in conveying valuable information about the training data set, experiments are performed according to aspects of the disclosure. In the experiments, two typical object detection models are employed as detectors: the transformer-based DINO (trained up to Epoch 12, with a 4-scale setup) and the CNN-based anchor-free YOLOX (specifically, YOLOX-Sand YOLOX-M versions) . DINO surpasses previous DETR-like models in both performance and efficiency, achieving state-of-the-art results through the utilization of contrastive denoising training, a “look forward twice” scheme for bounding box prediction, and a mixed query selection method for anchor initialization. YOLOX transforms the traditional YOLO detector, such as YOLOv3, into an anchor-free method, thereby achieving state-of-the-art performance. For the hyper-parameters in the proposed training loss, β is set to 0.2 and 0.3 for YOLOX and DINO, respectively. In the experiments, the training data set may be COCO 2017, where the 118k train set (train2017) and the 5k validation set (val2017) of COCO 2017 are utilized for training and evaluating the object detection model 810 on the bounding box detection task. COCO 2017 comprises 80 classes and encompasses a diverse range of scenes, including indoor and outdoor environments, urban and rural settings, as well as various lighting and weather conditions. The training set contains, on average, 7 instances per image, with a maximum of 63 instances observed in a single image. These instances span a wide range of sizes, from small to large.
[0083] The standard COCO metrics are used to evaluate the prediction quality, where the standard COCO metrics include averaged precision (AP) and recall (AR) over IoU thresholds, AP50, AP75, and APL, APM, APS for large, medium and small objects, respectively.
[0084] Table 1: Performance comparison of uncertainty-aware regularizer (UA-entropy) and constant entropy regularizer (Entropy) on COCO 2017 validation set
[0085] Table 1 demonstrates the performance comparison between binary cross-entropy with a constant weighting (Entropy) and uncertainty-aware entropy (UA-entropy) for YOLOX-S, YOLOX-M, and DINO. The proposed uncertainty-aware entropic regularizer is obviously the top-performing one and leads to a consistent improvement across all detection models. Notably, the performance gain is more prominent for the small-scale models, i.e., YOLOX-Sand YOLOX-M, indicating that the proposed data uncertainty measure can convey valuable information about the data set to model learning. More importantly, the superior performance gain of the proposed sample adaptive regularizer on small-scale models holds significant implications for real-world model deployment. Conversely, regularizing each sample with equal entropy shows only slight improvement or even deteriorates model performance, especially for the small-scale detector YOLOX-S (-0.88%AP) . Moreover, the proposed method also achieves a performance gain on the state-of-the-art DINO with focal loss, implying that the proposed training objective effectively combines data uncertainty to more reasonably balance the learning of difficult and easy samples.
[0086] Table 2: Performance of filtering out samples with high uncertainty scores on COCO 2017 validation set. “100” , “95%” and “90” in the second column represents retaining samples less than 100%, 95%and 90%quantiles
[0087] Table 2 shows the results of discarding samples corresponding to the highest 5%and 10%uncertainty scores (i.e., filtering out possible noisy samples) for different models. It can be observed that the predictive performance of each model is improved when samples with high uncertainty scores are abandoned both for 95%data and 90%data settings, which indicates that the reliability of detecting noisy samples in the training data and these samples do not contribute valuable supervision to model training. Therefore, the data uncertainty scores can serve as effective indicators for identifying noisy samples and mitigating the model learning from misleading supervisory information, thereby enhancing predictive performance.
[0088] The effectiveness of the redundant samples filtering are examined by comparing uncertainty-aware and random discarding (i.e., uniformly dropping a certain percentage of samples) strategies, with the experimental results summarized in Table 3. As shown, the proposed uncertainty-aware filtering strategy consistently outperforms uniform sampling for all metrics under different data percentages, suggesting that leveraging data uncertainty scores to cluster samples (i.e., grouping overall training data into multiple subsets with similar patterns) is reliable. Furthermore, uniforming data selection can dramatically degrade predictive performance on relatively small-capacity models like YOLOX-S. Oppositely, the uncertainty-aware data sampling according to embodiments of the disclosure still maintains superior performance, with only a marginal reduction of 0.8%in AP while discarding 30%of the data. Interestingly, uncertainty-aware data sampling with 95%data surpasses predictive performance with 100%data, which further verifies the existence of noisy samples in training data. In the future, the proposed uncertainty-aware data filtering has the potential to emerge as a new paradigm for data pruning.
[0089] Table 3: Performance of filtering out redundant samples using uncertainty-aware filter and uniform sampling on COCO 2017 validation set.
[0090] Fig. 9 illustrates an exemplary process for processing a training data set according to aspects of the disclosure.
[0091] At step 910, a plurality of images of the training data set are processed by a vison foundation model to obtain a plurality of first feature sequences (e.g. the feature embeddings IE in Figs. 1, and 4-7) of the plurality of images, wherein the training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of one or more object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance.
[0092] At step 920, a plurality of second feature vectors (e.g. the feature vectors OV in Figs. 1, and 4-7) of a plurality of object instances of the training data set are obtained based on the first label and / or the second label corresponding to each of the plurality of object instances and the plurality of first feature sequences.
[0093] At step 930, uncertainty scores of the plurality of object instances of the training data set are determined based on the plurality of second feature vectors.
[0094] At step 940, the training data set is updated with the uncertainty scores of the plurality of object instances.
[0095] According to an embodiment, at step 920, for each of the plurality of object instances, one or more first feature vectors are determined from one of the plurality of first feature sequences corresponding to an image including the object instance based on the first label and / or the second label corresponding to the object instance; and a second feature vector for the object instance is obtained based on the one or more first feature vectors.
[0096] According to an embodiment, at step 930, uncertainty scores of the plurality of object instances are determined based on data distribution of the plurality of second feature vectors. According to an embodiment, the data distribution of the plurality of second feature vectors is determined based on the plurality of second feature vectors. According to an embodiment, each of the set of one or more ground-truths comprises a third label corresponding to a classification of the object instance, wherein the data distribution of the plurality of second feature vectors is determined based on the plurality of second feature vectors and the third label corresponding to each of the second feature vectors.
[0097] According to an embodiment, at step 930, distances of the plurality of object instances are determined based on the plurality of second feature vectors; the uncertainty scores of the plurality of object instances are determined based on the distances of the plurality of object instances. According to an embodiment, the distances of the plurality of object instances are Mahalanobis distances of the plurality of object instances.
[0098] According to an embodiment, the training data set comprises a plurality of classifications, each of the plurality of object instances of the training data set is associated with one of the plurality of classifications. At step 930, the distances of the plurality of object instances are determined by: for each of the plurality of classifications, calculating a mean feature vector based on a subset of the plurality of second feature vectors associated with the classification, so as to obtain a plurality of mean feature vectors corresponding to the plurality of classifications; calculating an averaged covariance matrix based on the plurality of second feature vectors and the plurality of mean feature vectors; and determining the distances of the plurality of object instances based on the plurality of second feature vectors, the plurality of mean feature vectors and the averaged covariance matrix.
[0099] According to an embodiment, at step 930, each of the distances of the plurality of object instances is normalized to a normalized value, which is in a range of zero to one, wherein the normalized values of the plurality of object instances are taken as the uncertainty scores of the plurality of object instances. According to an embodiment, each of the distances of the plurality of object instances is normalized to a normalized value by: for each of the plurality of classifications and a subset of the plurality of distances associated with the classification, normalizing each of the subset of distances to the normalized value based on log transformations of the subset of distances, a minimum and a maximum of the log transformations of the subset of distances.
[0100] According to an embodiment, the method 9 further comprises filtering out a part of the plurality of object instances from the updated training data set based on the uncertainty scores of the plurality of object instances. According to an embodiment, the filtering out a part of the plurality of object instances comprises: for each of a plurality of classifications of the updated training data set, filtering out a percentage of object instances from a subset of the plurality of object instances associated with the classification to obtain a second updated training data set, wherein the percentage of object instances have higher uncertainty scores than other object instances of the subset. According to an embodiment, the filtering out a part of the plurality of object instances comprises: for each of the plurality of classifications of the updated training data set or the second updated training data set, grouping a subset of object instances associated with the classification into a plurality of uncertainty score intervals, and filtering out a percentage of object instances from each of uncertainty score intervals.
[0101] According to an embodiment, the vison foundation model is Segment Anything Model (SAM) .
[0102] Fig. 10 illustrates an exemplary process for training a neural network (NN) model for performing object detection according to aspects of the disclosure.
[0103] At step 1010, images of a training data set are processed by the NN model to detect object instances and corresponding classifications, wherein the training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of one or more object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance, a third label corresponding to a classification of the object instance and a fourth label corresponding to a uncertainty score of the object instance.
[0104] At step 1020, a loss is determined based at least in part on uncertainty scores included in the training data set.
[0105] At step 1030, learnable parameters of the NN model are updated based on the loss.
[0106] According to an embodiment, at step 1020, a classification loss is determined based at least on the uncertainty scores included in the training data set, and the loss is determined based at least on the classification loss. According to an embodiment, the classification loss is determined based at least on entropy of predictive probability distribution of predicted classifications of object instances and corresponding uncertainty scores of the object instances.
[0107] According to an embodiment, the method 10 further comprises obtaining the training data set by processing a first training data set using the method according to embodiments of the disclosure, wherein the first training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of one or more object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance, and a third label corresponding to a classification of the object instance.
[0108] Fig. 11 illustrates an exemplary apparatus for processing a training data set according to aspects of the disclosure.
[0109] The apparatus 11 comprises: an image encoding module 1110 for processing a plurality of images of the training data set to obtain a plurality of first feature sequences of the plurality of images, wherein the training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance; an object feature generating module 1120 for generating a plurality of second feature vectors of a plurality of object instances of the training data set based on the first label and / or the second label corresponding to each of the plurality of object instances and the plurality of first feature sequences; an uncertainty score determining module 1130 for determining uncertainty scores of the plurality of object instances of the training data set based on the plurality of second feature vectors; and an updating module 1140 for updating the training data set with the uncertainty scores of the plurality of object instances.
[0110] According to an embodiment, the object feature generating module 1120 generates a plurality of second feature vectors of a plurality of object instances of the training data set by: for each of the plurality of object instances, determining one or more first feature vectors from one of the plurality of first feature sequences corresponding to an image including the object instance based on the first label and / or the second label corresponding to the object instance; and obtaining a second feature vector for the object instance based on the one or more first feature vectors.
[0111] According to an embodiment, the uncertainty score determining module 1130 determines uncertainty scores of the plurality of object instances based on data distribution of the plurality of second feature vectors. According to an embodiment, the data distribution of the plurality of second feature vectors is determined based on the plurality of second feature vectors. According to an embodiment, each of the set of one or more ground-truths comprises a third label corresponding to a classification of the object instance, wherein the data distribution of the plurality of second feature vectors is determined based on the plurality of second feature vectors and the third label corresponding to each of the second feature vectors.
[0112] According to an embodiment, the uncertainty score determining module 1130 determines the distances of the plurality of object instances based on the plurality of second feature vectors, determines the uncertainty scores of the plurality of object instances based on the distances of the plurality of object instances. According to an embodiment, the distances of the plurality of object instances are Mahalanobis distances of the plurality of object instances.
[0113] According to an embodiment, the training data set comprises a plurality of classifications, each of the plurality of object instances of the training data set is associated with one of the plurality of classifications. The uncertainty score determining module 1130 determines the distances of the plurality of object instances by: for each of the plurality of classifications, calculating a mean feature vector based on a subset of the plurality of second feature vectors associated with the classification, so as to obtain a plurality of mean feature vectors corresponding to the plurality of classifications; calculating an averaged covariance matrix based on the plurality of second feature vectors and the plurality of mean feature vectors; and determining the distances of the plurality of object instances based on the plurality of second feature vectors, the plurality of mean feature vectors and the averaged covariance matrix.
[0114] According to an embodiment, the uncertainty score determining module 1130 normalizes each of the distances of the plurality of object instances to a normalized value, which is in a range of zero to one, wherein the normalized values of the plurality of object instances are taken as the uncertainty scores of the plurality of object instances. According to an embodiment, the uncertainty score determining module 1130 normalizes each of the distances of the plurality of object instances to a normalized value by: for each of the plurality of classifications and a subset of the plurality of distances associated with the classification, normalizing each of the subset of distances to the normalized value based on log transformations of the subset of distances, a minimum and a maximum of the log transformations of the subset of distances.
[0115] According to an embodiment, the apparatus 11 further comprises a filtering module for filtering out a part of the plurality of object instances from the updated training data set based on the uncertainty scores of the plurality of object instances. According to an embodiment, the filtering module filters out a part of the plurality of object instances by: for each of a plurality of classifications of the updated training data set, filtering out a percentage of object instances from a subset of the plurality of object instances associated with the classification to obtain a second updated training data set, wherein the percentage of object instances have higher uncertainty scores than other object instances of the subset. According to an embodiment, the filtering module filters out a part of the plurality of object instances by: for each of the plurality of classifications of the updated training data set or the second updated training data set, grouping a subset of object instances associated with the classification into a plurality of uncertainty score intervals, and filtering out a percentage of object instances from each of uncertainty score intervals.
[0116] Fig. 12 illustrates an exemplary apparatus for training a neural network (NN) model for performing object detection according to aspects of the disclosure.
[0117] The apparatus 12 comprises: a predicting module 1210 for processing images of a training data set by using the NN model to predict object instances and corresponding classifications, wherein the training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of one or more object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance, a third label corresponding to a classification of the object instance and a fourth label corresponding to a uncertainty score of the object instance; a loss determining module 1220 for determining a loss based at least in part on uncertainty scores included in the training data set; and an updating module 1230 for updating learnable parameters of the NN model based on the loss.
[0118] According to an embodiment, the loss determining module 1220 determines a classification loss based at least on the uncertainty scores included in the training data set, and determines the loss based at least on the classification loss. According to an embodiment, the classification loss is determined based at least on entropy of predictive probability distribution of predicted classifications of object instances and corresponding uncertainty scores of the object instances.
[0119] Fig. 13 illustrates an exemplary computing system according to aspects of the disclosure. The computing system 13 may comprise at least one processor 1310. The computing system 13 may further comprise at least one storage device 1320. The storage device 1320 may store computer-executable instructions that, when executed, cause the processor 1310 to perform any operations according to the embodiments of the present disclosure as described in connection with Figs. 1-12.
[0120] The embodiments of the present disclosure may be embodied in a computer-readable medium such as non-transitory computer-readable medium. The non-transitory computer-readable medium may comprise instructions that, when executed, cause one or more processors to perform any operations according to the embodiments of the present disclosure as described in connection with Figs. 1-12.
[0121] The embodiments of the present disclosure may be embodied in a computer program product comprising computer-executable instructions that, when executed, cause one or more processors to perform any operations according to the embodiments of the present disclosure as described in connection with Figs. 1-12.
[0122] It should be appreciated that all the operations in the methods described above are merely exemplary, and the present disclosure is not limited to any operations in the methods or sequence orders of these operations, and should cover all other equivalents under the same or similar concepts.
[0123] It should also be appreciated that all the modules in the apparatuses described above may be implemented in various approaches. These modules may be implemented as hardware, software, or a combination thereof. Moreover, any of these modules may be further functionally divided into sub-modules or combined together.
[0124] The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects. Thus, the claims are not intended to be limited to the aspects shown herein. All structural and functional equivalents to the elements of the various aspects described throughout the present disclosure that are known or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the claims.
Claims
1.A computer implemented method for processing a training data set, comprising:processing a plurality of images of the training data set by a vison foundation model to obtain a plurality of first feature sequences of the plurality of images, wherein the training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of one or more object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance;obtaining a plurality of second feature vectors of a plurality of object instances of the training data set based on the first label and / or the second label corresponding to each of the plurality of object instances and the plurality of first feature sequences;determining uncertainty scores of the plurality of object instances of the training data set based on the plurality of second feature vectors; andupdating the training data set with the uncertainty scores of the plurality of object instances.2.The method of claim 1, wherein the obtaining a plurality of second feature vectors of a plurality of object instances comprises:for each of the plurality of object instances,determining one or more first feature vectors from one of the plurality of first feature sequences corresponding to an image including the object instance based on the first label and / or the second label corresponding to the object instance; andobtaining a second feature vector for the object instance based on the one or more first feature vectors.3.The method of claim 1, wherein the determining uncertainty scores of the plurality of object instances comprises: determining uncertainty scores of the plurality of object instances based on data distribution of the plurality of second feature vectors.4.The method of claim 3, wherein each of the set of one or more ground-truths comprises a third label corresponding to a classification of the object instance, wherein the data distribution of the plurality of second feature vectors is determined based on the plurality of second feature vectors and the third label corresponding to each of the second feature vectors.5.The method of claim 1, wherein the determining uncertainty scores of the plurality of object instances comprises:determining distances of the plurality of object instances based on the plurality of second feature vectors;determining the uncertainty scores of the plurality of object instances based on the distances of the plurality of object instances.6.The method of claim 5, wherein the training data set comprises a plurality of classifications, each of the plurality of object instances of the training data set is associated with one of the plurality of classifications, wherein the determining distances of the plurality of object instances comprises:for each of the plurality of classifications, calculating a mean feature vector based on a subset of the plurality of second feature vectors associated with the classification, so as to obtain a plurality of mean feature vectors corresponding to the plurality of classifications;calculating an averaged covariance matrix based on the plurality of second feature vectors and the plurality of mean feature vectors;determining the distances of the plurality of object instances based on the plurality of second feature vectors, the plurality of mean feature vectors and the averaged covariance matrix.7.The method of claim 5, wherein the determining uncertainty scores of the plurality of object instances comprises:normalizing each of the distances of the plurality of object instances to a normalized value, wherein the normalized values of the plurality of object instances being taken as the uncertainty scores of the plurality of object instances.8.The method of claim 7, wherein the normalizing each of the distances of the plurality of object instances comprises:for each of the plurality of classifications and a subset of the plurality of distances associated with the classification, normalizing each of the subset of distances to the normalized value based on log transformations of the subset of distances, a minimum and a maximum of the log transformations of the subset of distances.9.The method of one of claims 1 to 8, further comprising:filtering out a part of the plurality of object instances from the updated training data set based on the uncertainty scores of the plurality of object instances.10.The method of claim 9, the filtering out a part of the plurality of object instances comprises:for each of a plurality of classifications of the updated training data set, filtering out a percentage of object instances from a subset of the plurality of object instances associated with the classification to obtain a second updated training data set, wherein the percentage of object instances have higher uncertainty scores than other object instances of the subset.11.The method of claim 9 or 10, the filtering out a part of the plurality of object instances comprises:for each of the plurality of classifications of the updated training data set or the second updated training data set, grouping a subset of object instances associated with the classification into a plurality of uncertainty score intervals, and filtering out a percentage of object instances from each of uncertainty score intervals.12.The method of one of claims 1 to 11, wherein the vison foundation model is Segment Anything Model (SAM) .13.A computer implemented method for training a neural network (NN) model for performing object detection, comprising:processing images of a training data set by the NN model to detect object instances and corresponding classifications, wherein the training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of one or more object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance, a third label corresponding to a classification of the object instance and a fourth label corresponding to a uncertainty score of the object instance;determining a loss based at least in part on uncertainty scores included in the training data set; andupdating learnable parameters of the NN model based on the loss.14.The method of claim 13, wherein the determining a loss comprises:determining a classification loss based at least on the uncertainty scores included in the training data set;determining the loss based at least on the classification loss.15.The method of claim 14, wherein the determining a classification loss comprises:determining the classification loss based at least on entropy of predictive probability distribution of predicted classifications of object instances and corresponding uncertainty scores of the object instances.16.The method of claim 13, further comprising:obtaining the training data set by processing a first training data set using the method of one of claims 1 to 12, wherein the first training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of one or more object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance, and a third label corresponding to a classification of the object instance.17.An apparatus for processing a training data set, comprising:an image encoding module for processing a plurality of images of the training data set to obtain a plurality of first feature sequences of the plurality of images, wherein the training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of one or more object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance;an object feature generating module for generating a plurality of second feature vectors of a plurality of object instances of the training data set based on the first label and / or the second label corresponding to each of the plurality of object instances and the plurality of first feature sequences;an uncertainty score determining module for determining uncertainty scores of the plurality of object instances of the training data set based on the plurality of second feature vectors; andan updating module for updating the training data set with the uncertainty scores of the plurality of object instances.18.An apparatus for training a neural network (NN) model for performing object detection, comprising:a predicting module for processing images of a training data set by using the NN model to predict object instances and corresponding classifications, wherein the training data set comprises a plurality of image-label pairs, each of the plurality of image-label pairs comprises an image and a set of one or more ground-truths corresponding to a set of one or more object instances of the image, each of the set of one or more ground-truths comprises a first label corresponding to a bounding box of an object instance and / or a second label corresponding to a mask of the object instance, a third label corresponding to a classification of the object instance and a fourth label corresponding to a uncertainty score of the object instance;a loss determining module for determining a loss based at least in part on uncertainty scores included in the training data set; andan updating module for updating learnable parameters of the NN model based on the loss.19.A computer system, comprising:one or more processors; andone or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the method of one of claims 1-16.20.One or more computer readable storage media storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of one of claims 1-16.
Citation Information
Patent Citations
Surface defect identification method based on semi-supervised learning
CN118333992A
Fine-tuning of transductive few-shot learning methods using margin-based uncertainty weighting and probability regularization
WO2024091317A2