CN113095446A - Abnormal behavior sample generation method and system - Google Patents
Abnormal behavior sample generation method and system Download PDFInfo
- Publication number
- CN113095446A CN113095446A CN202110640175.9A CN202110640175A CN113095446A CN 113095446 A CN113095446 A CN 113095446A CN 202110640175 A CN202110640175 A CN 202110640175A CN 113095446 A CN113095446 A CN 113095446A
- Authority
- CN
- China
- Prior art keywords
- sample
- class
- center
- samples
- distribution
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/243—Classification techniques relating to the number of classes
- G06F18/2433—Single-class perspective, e.g. one-against-all classification; Novelty detection; Outlier detection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Computational Linguistics (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Complex Calculations (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明涉及深度学习领域,特别是一种异常行为样本生成方法及系统。The invention relates to the field of deep learning, in particular to a method and system for generating abnormal behavior samples.
背景技术Background technique
校园安全问题目前得到社会各界越来越多的重视,踩踏、霸凌以及打架斗殴等危害校园安全的行为频繁发生。目前,我国的校园安全事件呈多发态势,防控难度随之增大,校园安全正面临前所未有的严峻挑战。但是,由于校园安全事件的隐蔽性、突发性以及频发性,使得高效率的校园安全保障、提前预防的校园安全机制在落实上存在较大困难。近年来,计算机视觉技术的发展为校园异常行为安全监测与预警提供了可能。异常行为识别集高效性与精准性,将校园安全事件隐患遏制在萌芽状态,并积极提前预警和干预。因此,基于计算机视觉技术的异常行为识别与智能预警已然成为校园安全监控、反恐维稳和群体性事件预警等领域的重要研究问题。以往的异常行为样本生成方法主要基于深度学习,这需要大规模数据集的支持。At present, the issue of campus safety has received more and more attention from all walks of life, and behaviors endangering campus safety such as trampling, bullying, and fighting frequently occur. At present, campus security incidents in our country are frequent, and the difficulty of prevention and control is increasing. Campus security is facing unprecedented severe challenges. However, due to the concealment, suddenness and frequent occurrence of campus security incidents, it is difficult to implement high-efficiency campus security and early-prevention campus security mechanisms. In recent years, the development of computer vision technology has provided the possibility for the safety monitoring and early warning of abnormal behavior on campus. Abnormal behavior identification is highly efficient and accurate, keeping the hidden dangers of campus security incidents in the bud, and actively warning and intervening in advance. Therefore, abnormal behavior recognition and intelligent early warning based on computer vision technology has become an important research problem in the fields of campus security monitoring, anti-terrorism and stability maintenance, and early warning of mass incidents. Previous methods for generating abnormal behavior samples are mainly based on deep learning, which requires the support of large-scale datasets.
深度学习在图像处理领域的巨大成功在很大程度上依赖于大规模的有标签数据集的出现,但是,当样本数量有限时,深度学习模型很容易出现过拟合。因此,少样本学习是一个十分具有发展前景和挑战的计算机视觉方向。它模仿人类认知新事物的思维模式,即通过少数的几个例子就能够对一个从未见过的对象进行准确识别,这似乎是一种教会机器如何像人类一样认知新事物的有效方法,进一步拉近了人工智能与人类智慧之间的距离[1]。The great success of deep learning in the field of image processing relies heavily on the emergence of large-scale labeled datasets, but when the number of samples is limited, deep learning models are prone to overfitting. Therefore, few-shot learning is a very promising and challenging computer vision direction. It imitates the human thinking mode of recognizing new things, that is, it can accurately identify an object that has never been seen through a few examples, which seems to be an effective way to teach machines how to recognize new things like humans. , further narrowing the distance between artificial intelligence and human intelligence [1] .
然而,如何从有限种类和数量的样本中学习到一些知识并推演到新的类别中是很具有挑战和实际意义的。针对该问题的研究大多还是停留在分类任务[2]上,并且现有的方法仍不能令人满意,远远达不到工业应用水准。一方面,样本的不足必然带来模型泛化能力差的问题;另一方面,利用少量样本来准确地估计类分布是极其困难的。However, how to learn some knowledge from a limited variety and number of samples and deduce it into a new category is very challenging and practical. Most of the research on this problem is still on the classification task [2] , and the existing methods are still unsatisfactory, far from reaching the level of industrial application. On the one hand, the lack of samples will inevitably lead to the problem of poor model generalization ability; on the other hand, it is extremely difficult to accurately estimate the class distribution with a small number of samples.
少样本学习的目的是提高样本的利用率,探索如何利用少量带标记的样本就使模型达到与以往的深度学习模型相媲美甚至更优的性能。针对带标记的样本稀少的问题,有两种思路,一种是当存在大量未标记样本时,利用已标记的那部分样本对未标记的样本打上伪标签;另一种方法是当样本有限时,利用带标记的样本生成大量虚拟样本。前者的问题不在于数据量的多少,而是样本标注问题,如果结合相关专家或算法也可以得到有效缓解。但是后者就是典型的样本量少的问题,相对棘手。但是,如果我们假设类分布服从高斯或类高斯分布[3],那么我们只需要知道类分布的中心和变化范围即可估计整个类的分布,然而从有限的样本估计类分布是极其困难的,并且其关键在于能否准确地估计类中心。The purpose of few-shot learning is to improve the utilization of samples, and explore how to use a small number of labeled samples to make the model achieve performance comparable to or even better than previous deep learning models. For the problem of the scarcity of labeled samples, there are two ideas. One is to use the labeled part of the samples to label the unlabeled samples when there are a large number of unlabeled samples; the other is to use the labeled samples when the samples are limited. , using labeled samples to generate a large number of virtual samples. The problem of the former is not the amount of data, but the problem of sample labeling, which can be effectively alleviated if combined with relevant experts or algorithms. But the latter is a typical problem with small sample size and is relatively intractable. However, if we assume that the class distribution obeys a Gaussian or a Gaussian-like distribution [3] , then we only need to know the center and variation range of the class distribution to estimate the distribution of the entire class, however, it is extremely difficult to estimate the class distribution from a limited sample, And the key is whether the class center can be estimated accurately.
借助基类的统计数据对新类进行分布矫正[4]是一种非常新颖且有效的少样本分类方法。但是,在对相似类进行分布矫正的过程中,可能会出现两个经矫正的分布中心过于接近的问题,造成对相似类的分类效果不佳的现象,进而影响最终的少样本分类性能。Distribution correction of new classes with the help of base class statistics [4] is a very novel and effective few-shot classification method. However, in the process of correcting the distribution of similar classes, there may be a problem that the two corrected distribution centers are too close, resulting in poor classification of similar classes, which in turn affects the final few-sample classification performance.
以one-shot为例,对于每个少样本任务中的任一shot来说,我们称之为支持图片(support image),假设其特征向量为s={s 1,s 2,…s m},m表示特征维度,所属类别为c,现有的分布矫正方法首先在众多基类中搜索与s最邻近的k个基类中心x i ={x i1 ,x i2 ,…x im }, (i=1, 2, …k),然后将它们与该支持图片的特征向量s进行求平均操作,最后,将此均值作为对s所属的新类分布中心的估计。Taking one-shot as an example, for any shot in each few-shot task, we call it a support image, assuming its feature vector is s ={ s 1 , s 2 ,… s m } , m represents the feature dimension and belongs to the category c. The existing distribution correction method first searches for the k nearest base class centers x i ={ x i1 , x i2 ,… x im }, ( i = 1, 2, … k ), then average them with the feature vector s of the support image, and finally, use this mean as an estimate of the center of the new class distribution to which s belongs.
上述方法虽然效果显著,但是在某些特殊情况下,如支持样本s与其真实分布偏离较大时,所矫正的分布中心可能也会存在不同程度的偏离,我们称这种现象为中心矫正偏移(Center Calibration Deviation)。依据偏离的分布中心所生成的虚拟样本可能缺乏可靠性,并且如果两个经矫正的分布中心过于接近,基于它们生成的样本可能存在重叠现象,我们称这种现象为采样混淆(Sampling Confusion)。产生上述两种现象的主要原因是对新类的分布中心估计偏差较大。Although the effect of the above method is significant, in some special cases, such as when the support sample s deviates greatly from its true distribution, the corrected distribution center may also deviate to varying degrees. We call this phenomenon the center correction offset. (Center Calibration Deviation). Dummy samples generated from off-center distribution centers may lack reliability, and if two corrected distribution centers are too close, the samples generated based on them may overlap, a phenomenon we call Sampling Confusion. The main reason for the above two phenomena is the large deviation in the estimation of the distribution center of the new class.
(1)综上,传统的方法需要大量的带标注的数据,不仅需要耗费大量的人力物力,而且由于某些异常行为数据的稀缺性,数据集很可能出现长尾分布问题。(1) In summary, the traditional method requires a large amount of labeled data, which not only requires a lot of manpower and material resources, but also due to the scarcity of some abnormal behavior data, the data set is likely to have long-tailed distribution problems.
(2)现有的方法难以从有限的样本中准确地估计新类的分布中心。(2) It is difficult for existing methods to accurately estimate the distribution center of new classes from limited samples.
现有的方法对相似异常行为类的分布估计很可能出现交叉或重叠的现象,不能很好地对相似类进行有效的区分。Existing methods may cross or overlap the distribution estimates of similar abnormal behavior classes, and cannot effectively distinguish similar classes.
发明内容SUMMARY OF THE INVENTION
本发明所要解决的技术问题是,针对现有技术不足,提供一种异常行为样本生成方法及系统,提高对新类分布估计的准确性。The technical problem to be solved by the present invention is to provide a method and system for generating abnormal behavior samples in view of the deficiencies of the prior art, so as to improve the accuracy of estimating the distribution of new classes.
为解决上述技术问题,本发明所采用的技术方案是:一种异常行为样本生成方法,包括以下步骤:In order to solve the above-mentioned technical problems, the technical solution adopted in the present invention is: a method for generating abnormal behavior samples, comprising the following steps:
S1、从样本充足的基类中搜索与其他样本的特征的距离之和最小的样本,即基类的质心,并将该质心作为基类中心;S1. Search the sample with the smallest sum of distances from the features of other samples from the base class with sufficient samples, that is, the centroid of the base class, and use the centroid as the base class center;
S2、计算当前新类样本与所有基类中心的欧式距离,选择与该新类样本距离最近的k个基类作为最近邻基类;S2. Calculate the Euclidean distance between the current new class sample and the centers of all base classes, and select the k base classes closest to the new class sample as the nearest neighbor base class;
S3、计算所述k个基类的中心的平均值,作为近似类中心,计算近似类中心与新类样本的中点,作为最终的新类分布中心;S3. Calculate the average value of the centers of the k base classes as the approximate class center, and calculate the midpoint between the approximate class center and the new class sample as the final new class distribution center;
S4、利用最终的新类分布构造一个基于高斯分布的样本生成器,用以随机生成虚拟样本。S4, using the final new class distribution to construct a Gaussian distribution-based sample generator to randomly generate virtual samples.
深度学习在图像处理领域的巨大成功得益于大规模数据集的出现,然而,当样本量有限时,模型就会很容易过拟合,这严重影响了异常行为分类模型的性能。由于异常行为的特殊性和稀缺性,我们很难捕捉到大量的样本,针对此类痛点,我们提出了一种异常行为样本生成方法。所有的对样本的操作均在提取的特征层次上,因为提取的特征过滤了大部分干扰信息,提高了生成样本的可靠性。然后,对于每一个来自新类的样本,搜索与之最近的k个基类中心,并将这些基类中心的平均值作为近似类中心,这是因为近似类在特征和语义上都与这个新类比较相似,它们的特征变化和分布可能极其相似。接着,计算这个近似类中心与新类样本的中点,作为对新类中心的估计,这是为了校准新类的分布,使得估计的新类中心更加接近真实位置,从而构造一个基于高斯分布的样本生成器,以生成大量的异常行为虚拟样本。本发明的异常行为样本生成方法与现有的数据生成方法不同,本发明是基于数据分布估计,从理论上更接近真实的数据分布状态,因而生成的样本可靠性更高。此外,本发明的方法可以建立在任何普通的特征提取器和样本生成器之上,不需要任何额外的参数,仅对样本的特征进行操作,算法简单,实现容易。The great success of deep learning in the field of image processing has benefited from the emergence of large-scale datasets. However, when the sample size is limited, the model can easily overfit, which seriously affects the performance of the abnormal behavior classification model. Due to the particularity and scarcity of abnormal behaviors, it is difficult for us to capture a large number of samples. For such pain points, we propose an abnormal behavior sample generation method. All operations on samples are at the level of extracted features, because the extracted features filter out most of the interference information and improve the reliability of generated samples. Then, for each sample from the new class, the k nearest base class centers are searched, and the average of these base class centers is taken as the approximate class center, because the approximate class is both characteristically and semantically related to this new class. Classes are relatively similar, and their feature changes and distributions may be extremely similar. Next, the midpoint between the approximate class center and the new class sample is calculated as an estimate of the new class center. This is to calibrate the distribution of the new class, so that the estimated new class center is closer to the real position, thereby constructing a Gaussian distribution-based Sample generator to generate a large number of virtual samples of abnormal behavior. The abnormal behavior sample generation method of the present invention is different from the existing data generation method. The present invention is based on data distribution estimation, which is theoretically closer to the real data distribution state, so the generated samples are more reliable. In addition, the method of the present invention can be built on any common feature extractor and sample generator, does not require any additional parameters, only operates on the features of the sample, the algorithm is simple, and the implementation is easy.
本发明利用ResNet50对样本进行特征提取,与普通网络不同,ResNet50引入了跳跃连接,提高了信息流通,也避免了由于网络过深所引起的梯度消失问题。The present invention uses ResNet50 to perform feature extraction on samples. Different from ordinary networks, ResNet50 introduces skip connections, improves information flow, and avoids the problem of gradient disappearance caused by the network being too deep.
将所生成的虚拟样本输入逻辑回归分类器进行训练,得到最终的异常行为分类器。The generated virtual samples are input into the logistic regression classifier for training, and the final abnormal behavior classifier is obtained.
本发明选用逻辑回归分类器,因为其结构简单,实现容易且效果较好,更有利于验证本发明发明所生成的样本的可靠性。The present invention selects the logistic regression classifier because of its simple structure, easy implementation and good effect, and is more conducive to verifying the reliability of the samples generated by the present invention.
步骤S1中,所述基类中心计算过程包括:利用下式计算当前次迭代的梯度;利用下式更新当前次迭代的锚点值:,直至 找出到其他样本点的距离之和最小的锚点,即得到基类中心;其中,x 0为上一轮迭代后的锚 点,为更新后的锚点,x i为同类的其他样本,n为样本数,α为学习率。该过程迭代地搜索与 其他样本点的距离之和最小的样本点,将整个类分布看作一个匀质几何体,这样找到的基 类中心具有一定的数学理论支撑。 In step S1, the calculation process of the base class center includes: using the following formula to calculate the gradient of the current iteration: ; Update the anchor value of the current iteration using the following formula: , until the anchor point with the smallest sum of distances to other sample points is found, that is, the base class center is obtained; where x 0 is the anchor point after the previous iteration, is the updated anchor point, x i is other samples of the same class, n is the number of samples, and α is the learning rate. This process iteratively searches for the sample point with the smallest sum of distances from other sample points, and regards the entire class distribution as a homogeneous geometry, so that the base class center found has certain mathematical theoretical support.
步骤S4中,将所述最终的新类分布中心作为高斯分布函数的输入,从而构造基于高斯分布的样本生成器,得到随机生成的虚拟样本。In step S4, the final new class distribution center is used as the input of the Gaussian distribution function, thereby constructing a sample generator based on the Gaussian distribution, and obtaining a randomly generated virtual sample.
本发明将估计的新类中心作为高斯分布函数的均值,将0.2~0.5之间的随机值作为该函数的方差,因为大量实验结果表明,方差取0.2~0.5之间的随机数效果最好。The present invention takes the estimated new class center as the mean value of the Gaussian distribution function, and takes the random value between 0.2 and 0.5 as the variance of the function, because a large number of experimental results show that the random number between 0.2 and 0.5 has the best effect.
步骤S4之后,还包括:利用所述随机生成的虚拟样本训练逻辑回归分类器,得到异常行为分类器。After step S4, the method further includes: using the randomly generated virtual samples to train a logistic regression classifier to obtain an abnormal behavior classifier.
本发明还提供了一种异常行为样本生成系统,包括计算机设备;所述计算机设备被配置或编程为用于执行上述方法的步骤。The present invention also provides an abnormal behavior sample generation system, comprising a computer device configured or programmed to perform the steps of the above method.
与现有技术相比,本发明所具有的有益效果为:本发明不但更加准确地估计出了新类的分布中心,而且有效解决了少样本学习中对相似类的分类效果不佳的问题。另外,本发明提出的类质心估计算法,通过搜索基类的质心,可以更加准确地估计基类的分布。与现有的分布矫正方法相比,本发明的方法的合理性和有效性可以通过误差理论得到证明,并且一个相对准确的基类分布估计有利于进一步提高后续对新类分布估计的可靠性。Compared with the prior art, the present invention has the beneficial effects that the present invention not only estimates the distribution center of the new class more accurately, but also effectively solves the problem of poor classification of similar classes in few-sample learning. In addition, the class centroid estimation algorithm proposed by the present invention can more accurately estimate the distribution of the base class by searching the centroid of the base class. Compared with the existing distribution correction methods, the rationality and effectiveness of the method of the present invention can be proved by the error theory, and a relatively accurate base class distribution estimation is beneficial to further improve the reliability of the subsequent estimation of the new class distribution.
附图说明Description of drawings
图1为本发明实施例基于少样本的异常行为识别网络框架。FIG. 1 is a network framework for identifying abnormal behavior based on few samples according to an embodiment of the present invention.
图2为本发明实施例两阶中心估计算法原理可视化图。FIG. 2 is a visualization diagram of the principle of a two-order center estimation algorithm according to an embodiment of the present invention.
图3(a)和图3(b)分别为本发明实施例真实的新类分布和本发明估计的新类分布的t-SNE可视化图。Fig. 3(a) and Fig. 3(b) are t-SNE visualization diagrams of the real new class distribution according to the embodiment of the present invention and the new class distribution estimated by the present invention, respectively.
具体实施方式Detailed ways
本发明实施例包括两阶中心估计(TCE)和类质心估计(CCE)。首先将ResNet50作为特征提取器,对数据集中的图片提取特征向量;然后,将所述的特征向量输入CCE模块来估计基类的中心,通过足够的样本来估计基类中心,以便为新类(即样本稀缺的类)的估计提供支持;接着,将CCE模块的输出作为TCE模块的输入来估计新类的中心,TCE用于解决校准偏差的问题,以便以使估计的类中心更接近实际位置。基于估计的类分布,我们构造了基于高斯分布的样本生成器,以生成足够的虚拟样本用于训练逻辑回归分类器,最终得到一个异常行为分类器。上述方法的原理如图1所示。Embodiments of the present invention include two-order center estimation (TCE) and class centroid estimation (CCE). First, ResNet50 is used as a feature extractor to extract feature vectors from the pictures in the dataset; then, the feature vectors are input into the CCE module to estimate the center of the base class, and enough samples are used to estimate the center of the base class, so that the new class ( Then, the output of the CCE module is used as the input of the TCE module to estimate the center of the new class, and TCE is used to solve the problem of calibration bias in order to make the estimated class center closer to the actual location . Based on the estimated class distribution, we construct a Gaussian distribution-based sample generator to generate enough dummy samples for training a logistic regression classifier, resulting in an abnormal behavior classifier. The principle of the above method is shown in Figure 1.
借助基类的统计数据对新类进行分布矫正[4]是一种非常新颖且有效的少样本分类方法。但是,在对相似类进行分布矫正的过程中,可能会出现两个经矫正的分布中心过于接近的问题,造成对相似类的分类效果不佳的现象,进而影响最终的少样本分类性能。Distribution correction of new classes with the help of base class statistics [4] is a very novel and effective few-shot classification method. However, in the process of correcting the distribution of similar classes, there may be a problem that the two corrected distribution centers are too close, resulting in poor classification of similar classes, which in turn affects the final few-sample classification performance.
以one-shot为例,对于每个少样本任务中的任一shot来说,我们称之为支持图片(supportimage),假设其特征向量为s={s 1,s 2,…s m},m表示特征维度,所属类别为c,现有的分布矫正方法首先在众多基类中搜索与s最邻近的k个基类中心x i ={x i1 ,x i2 ,…x im }, (i=1,2, …k),然后将它们与该支持图片的特征向量s进行求平均操作,最后,将此均值作为对s所属的新类分布中心的估计。Taking one-shot as an example, for any shot in each few-shot task, we call it a support image, assuming its feature vector is s ={ s 1 , s 2 ,… s m }, m represents the feature dimension and belongs to the category c. The existing distribution correction method first searches for the k nearest base class centers x i ={ x i1 , x i2 ,… x im }, ( i =1,2,… k ), then average them with the feature vector s of this support image, and finally, use this mean as an estimate of the center of the new class distribution to which s belongs.
上述方法虽然效果显著,但是在某些特殊情况下,如支持样本s与其真实分布偏离较大时,所矫正的分布中心可能也会存在不同程度的偏离,我们称这种现象为中心矫正偏移(Center Calibration Deviation)。依据偏离的分布中心所生成的虚拟样本可能缺乏可靠性,并且如果两个经矫正的分布中心过于接近,基于它们生成的样本可能存在重叠现象,我们称这种现象为采样混淆(Sampling Confusion)。产生上述两种现象的主要原因是对新类的分布中心估计偏差较大。针对该问题,本发明提出了两阶中心法来更准确地估计新类的分布中心。具体来说,在第一阶段,估计与支持样本s最近邻的k个基类分布中心的中心;在第二阶段,估计第一阶段的中心与支持样本s之间的中心,即中心的中心,该方法的原理可视化如图2所示。Although the effect of the above method is significant, in some special cases, such as when the support sample s deviates greatly from its true distribution, the corrected distribution center may also deviate to varying degrees. We call this phenomenon the center correction offset. (Center Calibration Deviation). Dummy samples generated from off-center distribution centers may lack reliability, and if two corrected distribution centers are too close, the samples generated based on them may overlap, a phenomenon we call Sampling Confusion. The main reason for the above two phenomena is the large deviation in the estimation of the distribution center of the new class. In response to this problem, the present invention proposes a two-order center method to more accurately estimate the distribution center of the new class. Specifically, in the first stage, the center of the k base class distribution centers closest to the support sample s is estimated; in the second stage, the center between the center of the first stage and the support sample s is estimated, that is, the center of the center , the principle visualization of the method is shown in Figure 2.
要准确矫正仅有少量样本的新类分布,必须保证对基类的分布估计足够可靠,因为估计新类的分布中心需要借助最近邻基类的分布数据。但是,基类样本的数量和分布情况是不规则的,这为估计其分布中心带来了巨大挑战。为了准确地估计基类的分布中心,我们提出了一种类质心估计算法,该算法可以迭代地搜索出一个类中到其他样本点的距离之和最小的那个样本点,即类质心。To accurately correct the distribution of a new class with only a few samples, it is necessary to ensure that the distribution estimation of the base class is reliable enough, because estimating the distribution center of the new class requires the distribution data of the nearest neighbor base class. However, the number and distribution of base class samples are irregular, which brings great challenges to estimating their distribution centers. In order to accurately estimate the distribution center of the base class, we propose a class centroid estimation algorithm, which can iteratively search for the sample point in a class with the smallest sum of distances to other sample points, that is, the class centroid.
(1) (1)
(2) (2)
其中,x 0为上一轮迭代后的锚点(anchor point),为新的锚点(anchor point),x i为同类的其他样本,n为样本数,α为学习率,这里取α=0.03。 Among them, x 0 is the anchor point after the previous iteration, is the new anchor point, x i is other samples of the same type, n is the number of samples, α is the learning rate, here α=0.03.
值得注意的是,每一轮迭代的锚点(anchor point)x 0都来自于上一轮梯度下降的结果。在每轮迭代过程中,都按照公式(1)计算梯度,然后根据式(2)更新锚点(anchorpoint)的值,最终找出到其他样本点的距离之和最小的那个锚点,作为类质心的估计。It is worth noting that the anchor point x 0 of each iteration comes from the result of the previous gradient descent. In each round of iteration, the gradient is calculated according to formula (1), and then the value of the anchor point is updated according to formula (2), and finally the anchor point with the smallest sum of distances to other sample points is found as the class Estimation of the centroid.
图3(a)图为真实的新类分分,图3(b)为本发明估计的新类分布。显然,真实的新类分布在没有任何干预的情况下,某些类的分布出现交叉或重叠现象,而利用本发明的方法估计的新类分布具有更大的类间间距和类内紧凑性,更易于分类。Figure 3(a) is the real new class classification, and Figure 3(b) is the new class distribution estimated by the present invention. Obviously, the real new class distribution crosses or overlaps without any intervention, while the new class distribution estimated by the method of the present invention has greater inter-class spacing and intra-class compactness, Easier to categorize.
本发明首先利用类质心估计算法对基类的分布进行估计,然后借助基类的分布数据对新类的分布进行估计,最后基于估计的结果生成大量的虚拟样本用以训练一个异常行为分类器。具体流程如下:The invention firstly uses the class centroid estimation algorithm to estimate the distribution of the base class, then uses the distribution data of the base class to estimate the distribution of the new class, and finally generates a large number of virtual samples based on the estimated result to train an abnormal behavior classifier. The specific process is as follows:
第一步:从数据集中随机采样5个类别的图片样本构成一个少样本任务,将ResNet50作为特征提取器,对所用数据集中的图片进行特征提取操作,分别得到对应图片的特征向量;利用类质心估计算法(CCE)从基类充足的样本中搜索与其他样本特征的距离之和最小的样本,即基类的质心,并将它作为基类的中心估计;Step 1: Randomly sample 5 categories of image samples from the dataset to form a few-sample task, use ResNet50 as a feature extractor, perform feature extraction operations on the images in the dataset used, and obtain the feature vectors of the corresponding images respectively; use the class centroid The estimation algorithm (CCE) searches for the sample with the smallest sum of distances to other sample features from the sufficient samples of the base class, that is, the centroid of the base class, and uses it as the center estimate of the base class;
第二步:对于少样本任务中的每一个新类图片样本,计算该新类样本与上一步得到的所有基类中心的欧式距离,作为其与各个基类的距离度量,并选择与之距离最近的k个基类作为最近邻基类;Step 2: For each new class image sample in the few-sample task, calculate the Euclidean distance between the new class sample and all the base class centers obtained in the previous step, as the distance measure between it and each base class, and select the distance from it. The nearest k base classes are used as the nearest neighbor base classes;
第三步:借助最近邻的k个基类的分布中心,我们利用两阶中心估计算法(TCE)分两个阶段来估计新类的分布中心:第一阶段,计算所有最近邻基类中心的平均值,作为该新类样本的近似类中心。第二阶段,计算近似类中心与新类样本的中点,作为最终的新类分布中心估计;Step 3: With the help of the distribution centers of the k nearest neighbor base classes, we use the two-order center estimation algorithm (TCE) to estimate the distribution centers of the new class in two stages: In the first stage, calculate the center of all nearest neighbor base classes. The mean value, as the approximate class center for samples of this new class. In the second stage, the midpoint between the approximate class center and the new class sample is calculated as the final estimate of the new class distribution center;
第四步:利用估计的新类分布中心,构造基于高斯分布函数的样本生成器,随机生成大量的虚拟样本,然后将这些生成的虚拟样本作为逻辑回归分类器的输入,以训练一个异常行为分类器。Step 4: Using the estimated new class distribution center, construct a sample generator based on the Gaussian distribution function, randomly generate a large number of virtual samples, and then use these generated virtual samples as the input of the logistic regression classifier to train an abnormal behavior classification device.
参考文献references
[1]Wang Y, Yao Q, Kwok J T, et al. Generalizing from a few examples:A survey on few-shot learning[J]. ACM Computing Surveys (CSUR), 2020, 53(3):1-34.[1] Wang Y, Yao Q, Kwok J T, et al. Generalizing from a few examples: A survey on few-shot learning[J]. ACM Computing Surveys (CSUR), 2020, 53(3):1-34.
[2]Chen W Y, Liu Y C, Kira Z, et al. A Closer Look at Few-shotClassification[C]//International Conference on Learning Representations.2019.[2]Chen W Y, Liu Y C, Kira Z, et al. A Closer Look at Few-shotClassification[C]//International Conference on Learning Representations.2019.
[3]Hu Y, Gripon V, Pateux S. Leveraging the feature distribution intransfer-based few-shot learning[J]. arXiv preprint arXiv:2006.03806, 2020.[3]Hu Y, Gripon V, Pateux S. Leveraging the feature distribution intransfer-based few-shot learning[J]. arXiv preprint arXiv:2006.03806, 2020.
[4]Yang S, Liu L, Xu M. Free Lunch for Few-shot Learning:Distribution Calibration[J]. arXiv preprint arXiv:2101.06395, 2021.[4] Yang S, Liu L, Xu M. Free Lunch for Few-shot Learning: Distribution Calibration[J]. arXiv preprint arXiv:2101.06395, 2021.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110640175.9A CN113095446B (en) | 2021-06-09 | 2021-06-09 | Abnormal behavior sample generation method and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110640175.9A CN113095446B (en) | 2021-06-09 | 2021-06-09 | Abnormal behavior sample generation method and system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113095446A true CN113095446A (en) | 2021-07-09 |
| CN113095446B CN113095446B (en) | 2021-09-03 |
Family
ID=76664534
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110640175.9A Active CN113095446B (en) | 2021-06-09 | 2021-06-09 | Abnormal behavior sample generation method and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113095446B (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2023011313A (en) * | 2021-07-12 | 2023-01-24 | 株式会社Jvcケンウッド | Inference Apparatus, Inference Method, and Inference Program |
| JP2023011312A (en) * | 2021-07-12 | 2023-01-24 | 株式会社Jvcケンウッド | Machine learning apparatus, machine learning method, and machine learning program |
| WO2023053569A1 (en) * | 2021-09-28 | 2023-04-06 | 株式会社Jvcケンウッド | Machine learning device, machine learning method, and machine learning program |
| CN116385807A (en) * | 2023-05-30 | 2023-07-04 | 南京信息工程大学 | A method and device for generating abnormal image samples |
| CN116721310A (en) * | 2023-06-19 | 2023-09-08 | 广州大学 | Method and system for generating virtual distribution external sample to inhibit neural network from excessive confidence |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7746773B2 (en) * | 2021-09-28 | 2025-10-01 | 株式会社Jvcケンウッド | Machine learning device, machine learning method, and machine learning program |
| JP2023048171A (en) * | 2021-09-28 | 2023-04-07 | 株式会社Jvcケンウッド | Machine learning apparatus, machine learning method, and machine learning program |
Citations (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7372471B1 (en) * | 2004-11-02 | 2008-05-13 | Nvidia Corporation | System and method for single-sample virtual coverage anti-aliasing |
| CN101432691A (en) * | 2006-05-02 | 2009-05-13 | 爱特梅尔公司 | Method and system for controlling timing in a processor |
| CN102254033A (en) * | 2011-08-05 | 2011-11-23 | 西安电子科技大学 | Entropy weight-based global K-means clustering method |
| CN102676657A (en) * | 2012-04-18 | 2012-09-19 | 盛司潼 | Sequencing image recognition system and sequencing image recognition method |
| CN103020654A (en) * | 2012-12-12 | 2013-04-03 | 北京航空航天大学 | Synthetic aperture radar (SAR) image bionic recognition method based on sample generation and nuclear local feature fusion |
| CN104598880A (en) * | 2015-03-06 | 2015-05-06 | 中山大学 | Behavior identification method based on fuzzy support vector machine |
| US20160025615A1 (en) * | 2014-07-22 | 2016-01-28 | SynTouch, LLC | Method and applications for measurement of object tactile properties based on how they likely feel to humans |
| CN109993090A (en) * | 2019-03-25 | 2019-07-09 | 浙江大学 | Iris center localization method based on cascade regression forest and image grayscale features |
| US20190272333A1 (en) * | 2018-03-01 | 2019-09-05 | King Fahd University Of Petroleum And Minerals | Heuristic for the data clustering problem |
| CN110298450A (en) * | 2019-05-21 | 2019-10-01 | 北京大学第三医院(北京大学第三临床医学院) | A kind of virtual sample generation method based on production confrontation network |
| CN112135248A (en) * | 2020-10-09 | 2020-12-25 | 西安建筑科技大学 | WIFI fingerprint positioning method based on K-means optimal estimation |
| CN112184734A (en) * | 2020-09-30 | 2021-01-05 | 南京景瑞康分子医药科技有限公司 | Long-time animal posture recognition system based on infrared images and wearable optical fibers |
| CN112462940A (en) * | 2020-11-25 | 2021-03-09 | 苏州科技大学 | Intelligent home multi-mode man-machine natural interaction system and method thereof |
-
2021
- 2021-06-09 CN CN202110640175.9A patent/CN113095446B/en active Active
Patent Citations (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7372471B1 (en) * | 2004-11-02 | 2008-05-13 | Nvidia Corporation | System and method for single-sample virtual coverage anti-aliasing |
| CN101432691A (en) * | 2006-05-02 | 2009-05-13 | 爱特梅尔公司 | Method and system for controlling timing in a processor |
| CN102254033A (en) * | 2011-08-05 | 2011-11-23 | 西安电子科技大学 | Entropy weight-based global K-means clustering method |
| CN102676657A (en) * | 2012-04-18 | 2012-09-19 | 盛司潼 | Sequencing image recognition system and sequencing image recognition method |
| CN103020654A (en) * | 2012-12-12 | 2013-04-03 | 北京航空航天大学 | Synthetic aperture radar (SAR) image bionic recognition method based on sample generation and nuclear local feature fusion |
| US20160025615A1 (en) * | 2014-07-22 | 2016-01-28 | SynTouch, LLC | Method and applications for measurement of object tactile properties based on how they likely feel to humans |
| CN104598880A (en) * | 2015-03-06 | 2015-05-06 | 中山大学 | Behavior identification method based on fuzzy support vector machine |
| US20190272333A1 (en) * | 2018-03-01 | 2019-09-05 | King Fahd University Of Petroleum And Minerals | Heuristic for the data clustering problem |
| CN109993090A (en) * | 2019-03-25 | 2019-07-09 | 浙江大学 | Iris center localization method based on cascade regression forest and image grayscale features |
| CN110298450A (en) * | 2019-05-21 | 2019-10-01 | 北京大学第三医院(北京大学第三临床医学院) | A kind of virtual sample generation method based on production confrontation network |
| CN112184734A (en) * | 2020-09-30 | 2021-01-05 | 南京景瑞康分子医药科技有限公司 | Long-time animal posture recognition system based on infrared images and wearable optical fibers |
| CN112135248A (en) * | 2020-10-09 | 2020-12-25 | 西安建筑科技大学 | WIFI fingerprint positioning method based on K-means optimal estimation |
| CN112462940A (en) * | 2020-11-25 | 2021-03-09 | 苏州科技大学 | Intelligent home multi-mode man-machine natural interaction system and method thereof |
Non-Patent Citations (2)
| Title |
|---|
| DUEN-REN LIU等: "knowledge maps for composite e-services:a mining-based system platform coupling with recommendations", 《SCIENCEDIRECT》 * |
| 李文璟等: "基于对称KL距离的用户行为时序聚类方法", 《电子与信息学报》 * |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2023011313A (en) * | 2021-07-12 | 2023-01-24 | 株式会社Jvcケンウッド | Inference Apparatus, Inference Method, and Inference Program |
| JP2023011312A (en) * | 2021-07-12 | 2023-01-24 | 株式会社Jvcケンウッド | Machine learning apparatus, machine learning method, and machine learning program |
| JP7586004B2 (en) | 2021-07-12 | 2024-11-19 | 株式会社Jvcケンウッド | Machine learning device, machine learning method, and machine learning program |
| JP7586005B2 (en) | 2021-07-12 | 2024-11-19 | 株式会社Jvcケンウッド | Inference device, inference method, and inference program |
| WO2023053569A1 (en) * | 2021-09-28 | 2023-04-06 | 株式会社Jvcケンウッド | Machine learning device, machine learning method, and machine learning program |
| CN116385807A (en) * | 2023-05-30 | 2023-07-04 | 南京信息工程大学 | A method and device for generating abnormal image samples |
| CN116385807B (en) * | 2023-05-30 | 2023-09-12 | 南京信息工程大学 | An abnormal image sample generation method and device |
| CN116721310A (en) * | 2023-06-19 | 2023-09-08 | 广州大学 | Method and system for generating virtual distribution external sample to inhibit neural network from excessive confidence |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113095446B (en) | 2021-09-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113095446B (en) | Abnormal behavior sample generation method and system | |
| CN109858390B (en) | Human skeleton behavior recognition method based on end-to-end spatiotemporal graph learning neural network | |
| Wang et al. | STORM: Structure-based overlap matching for partial point cloud registration | |
| CN111985581B (en) | A few-shot learning method based on sample-level attention network | |
| CN106780557B (en) | A moving target tracking method based on optical flow method and key point features | |
| CN107103281A (en) | Face identification method based on aggregation Damage degree metric learning | |
| CN102938070B (en) | A kind of behavior recognition methods based on action subspace and weight behavior model of cognition | |
| CN107301376B (en) | A Pedestrian Detection Method Based on Deep Learning Multi-layer Stimulation | |
| CN110008828B (en) | Pairwise constraint component analysis measurement optimization method based on difference regularization | |
| CN106548194B (en) | Construction method and positioning method of two-dimensional image human joint point positioning model | |
| CN111311708A (en) | A Visual SLAM Method Based on Semantic Optical Flow and Inverse Depth Filtering | |
| CN111402303A (en) | A Target Tracking Architecture Based on KFSTRCF | |
| CN112101473B (en) | A Smoke Detection Algorithm Based on Few-Sample Learning | |
| CN112101086B (en) | A face clustering method based on link prediction | |
| WO2018058419A1 (en) | Two-dimensional image based human body joint point positioning model construction method, and positioning method | |
| CN118094439B (en) | Bank abnormal transaction detection method, system and device | |
| CN111539985A (en) | Self-adaptive moving target tracking method fusing multiple features | |
| CN115810127A (en) | Small sample image classification method based on supervision and self-supervision combined contrast learning | |
| CN116704202A (en) | Visual relation detection method based on knowledge embedding | |
| Kansizoglou et al. | Haseparator: Hyperplane-assisted softmax | |
| CN111860097B (en) | Abnormal behavior detection method based on fuzzy theory | |
| Zhang et al. | RecFRCN: Few-shot object detection with recalibrated faster R-CNN | |
| CN107247996A (en) | A kind of Active Learning Method applied to different distributed data environment | |
| CN114863485A (en) | Cross-domain pedestrian re-identification method and system based on deep mutual learning | |
| Lin et al. | Localization-aware meta tracker guided with adversarial features |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |