Optimization methods for data density-based anomaly detection algorithms

KR1020260123639APending Publication Date: 2026-08-14AHA LABS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
KR1020250015586
Authority / Receiving Office
KR · KR
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-02-07
Publication Date
2026-08-14

Smart Images

  • Figure PAT00002_ABST
    Figure PAT00002_ABST
Patent Text Reader

Abstract

The present invention relates to a method for optimizing a data density-based anomaly detection algorithm, and more specifically, to a method for optimizing a data density-based anomaly detection algorithm with improved performance and speed. To achieve the above objective, the present invention provides a method for optimizing a data density-based anomaly detection algorithm characterized by comprising the steps of: inputting an image; dividing the input image into blocks of a certain size; dividing each of the divided blocks into a plurality of layers; extracting data points characteristic of each selected layer among the divided layers; forming a set of grouped data points extracted from the layers; storing the set in a memory bank; performing sampling on the stored set; and storing the sample values ​​obtained through sampling in a memory bank.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] The present invention relates to a method for optimizing a data density-based anomaly detection algorithm, and more specifically, to a method for optimizing a data density-based anomaly detection algorithm with improved performance and speed. Background Technology

[0003] In the era of big data, detecting anomalies in large-scale data sets is emerging as a critical challenge in various fields, including finance, cybersecurity, healthcare, and industrial systems. Anomalies refer to data points or patterns that deviate significantly from the expected normal range, and detecting such anomalies is essential for uncovering fraudulent activities, diagnosing defects, predicting failures, and ensuring the overall integrity of systems.

[0004] Conventional anomaly detection models have primarily used the Unfold method to extract data features. While the Unfold method is a powerful technique that helps represent high-dimensional data more concisely, it suffers from a significant degradation in algorithm speed during the process. In particular, although model performance improves as the number of features stored through the training process increases, there is a problem where processing speed progressively slows down. This acts as a critical disadvantage in environments where the model processes real-time data or requires fast responses.

[0005] In the industrial sector, the performance of anomaly detection models is a critical factor. High-performance models can detect anomalies with high accuracy and ensure system stability. However, such performance is often achieved at the expense of model processing speed. In particular, density-based anomaly detection models require high computational loads and long processing times to improve performance, as they detect anomalies based on data density and pattern complexity. This can act as a significant limitation in industrial environments where real-time monitoring and rapid response are essential.

[0006] Therefore, a new approach is needed to implement efficient anomaly detection while maintaining a balance between model performance and speed. Prior art literature

[0008] Korean Patent Publication No. 2021-0141060 The problem to be solved

[0009] The objective of the present invention to solve the above-mentioned problems is to provide an optimization method for a data density-based anomaly detection algorithm with improved performance and speed.

[0010] The technical problems that the present invention aims to solve are not limited to those mentioned above, and other unmentioned technical problems will be clearly understood by those skilled in the art to which the present invention belongs from the description below. means of solving the problem

[0012] The present invention, for achieving the above-mentioned purpose, provides a method for optimizing a data density-based abnormality detection algorithm, comprising the steps of: inputting an image; dividing the input image into blocks of a predetermined size; dividing each of the divided blocks into a plurality of layers; extracting data points characteristic of each selected layer among the divided layers; forming a set of grouped data points extracted from the layers; storing the set in a memory bank; performing sampling on the stored set; and storing the sampled values ​​in the memory bank.

[0013] In an embodiment of the present invention, in the step of dividing each of the divided blocks into a plurality of layers, the block may be characterized by being divided into: a first layer including edges, lines, points, and color changes; a second layer including patterns and textures of an object; a third layer including partial shapes and structures of an object; and a fourth layer including the entire shapes and structures of an object.

[0014] In an embodiment of the present invention, in the step of extracting data points for each selected layer among the divided layers, the second layer and the third layer may be selected so that data points are extracted.

[0015] In an embodiment of the present invention, the step of forming a grouped set of data points extracted from the layer may be characterized by comprising: a step of setting a plurality of adjacent blocks as a single window; a step of applying windows of various sizes for each layer; a step of extracting data points for each window; a step of performing pooling for data points included in each window; and a step of grouping the pooling results performed for each window to form a set.

[0016] In an embodiment of the present invention, the step of sampling the stored set of parts may be characterized by including: a step of clustering the set of parts stored in the memory bank; and a step of sampling the cluster formed by clustering the set of parts.

[0017] In an embodiment of the present invention, the step of performing clustering on a set of parts stored in a memory bank may be characterized by comprising: a step of setting a plurality of cluster numbers for the set of parts and performing clustering according to the number of clusters; a step of calculating a silhouette coefficient for each of the set number of clusters; a step of selecting the number of clusters with the highest silhouette coefficient; and a step of performing final clustering on the set of parts stored in the memory bank using the selected number of clusters.

[0018] In an embodiment of the present invention, the step of performing the clustering may be characterized by comprising: a step of randomly setting a center point corresponding to the number of clusters set for each set part stored in the memory bank; a step of forming a cluster by assigning each set part to the nearest center point; a step of updating the center point of the cluster to the average of the set part values ​​within the cluster; and a step of repeating the steps of forming a cluster by assigning each set part to the nearest center point and updating the center point of the cluster to the average of the set part values ​​within the cluster until the center point is fixed.

[0019] In an embodiment of the present invention, in the step where a plurality of cluster numbers are set for the set part and clustering is performed according to the number of clusters, the number of clusters may be set to be 2 or more and 20 or less.

[0020] In an embodiment of the present invention, the step of performing sampling on a cluster formed by clustering the set part comprises: a step of selecting any data point within the cluster as an initial starting point; a step of calculating the distance between the initial starting point and the data points within the cluster; a step of selecting the data point calculated to be the farthest distance as a new starting point; a step of calculating the distance between the new starting point and the data points within the cluster; a step of selecting the data point calculated to be the farthest distance as a new starting point; and a step of repeating the steps of calculating the distance between the new starting point and the data points within the cluster and selecting the data point calculated to be the farthest distance as a new starting point until the number of selected data points reaches a preset number, wherein the selected data points are arranged to form the sample value.

[0021] In an embodiment of the present invention, after the step of storing the sample value obtained through sampling in a memory bank, the invention may further include a step of making a determination regarding the new image by comparing the sample value stored in the memory bank with a data point extracted from the new image. Effects of the invention

[0023] The effect of the present invention according to the above configuration is that the speed is improved compared to algorithms using conventional unfolding techniques.

[0024] In addition, according to the present invention, since sampling is performed after clustering, the accuracy of detecting abnormalities is improved.

[0025] The effects of the present invention are not limited to the effects described above, and should be understood to include all effects that can be inferred from the configuration of the invention described in the detailed description of the invention or the claims. Brief explanation of the drawing

[0027] FIG. 1 is a basic algorithm of an optimization method for a data density-based abnormal detection algorithm according to an embodiment of the present invention. FIG. 2 is a flowchart of an optimization method for a data density-based abnormal detection algorithm according to an embodiment of the present invention. FIG. 3 is an example diagram of the step of dividing blocks of an image and dividing them into layers according to an embodiment of the present invention. FIG. 4 is a flowchart of the step of forming a grouped set of data points extracted from a layer according to an embodiment of the present invention. FIG. 5 is an exemplary diagram showing the process of forming a collection part according to an embodiment of the present invention. FIG. 6 is a flowchart of the steps for sampling a stored set of parts according to an embodiment of the present invention. FIG. 7 is a flowchart of the steps for clustering a set of items stored in a memory bank according to an embodiment of the present invention. FIG. 8 is a flowchart of the steps for clustering according to an embodiment of the present invention. FIG. 9 is a flowchart of the step of sampling for a cluster formed by clustering a collection unit according to an embodiment of the present invention. FIG. 10 is an example diagram of a step in which sampling is performed on a cluster formed by clustering a collection part according to an embodiment of the present invention. FIG. 11 is an example diagram of a step in which a new image is determined by comparing a sample value stored in a memory bank according to an embodiment of the present invention with a data point extracted from a new image. Specific details for implementing the invention

[0028] The present invention will be described below with reference to the attached drawings. However, the present invention can be implemented in various different forms and is therefore not limited to the embodiments described herein. Furthermore, in order to clearly explain the present invention in the drawings, parts unrelated to the explanation have been omitted, and similar parts throughout the specification have been given similar reference numerals.

[0029] Throughout the specification, when it is stated that a part is "connected (connected, in contact, combined)" with another part, this includes not only cases where they are "directly connected," but also cases where they are "indirectly connected" with other members interposed between them. Furthermore, when it is stated that a part "includes" a certain component, this means that, unless specifically stated otherwise, it does not exclude other components but rather allows for the inclusion of additional components.

[0030] The terms used herein are merely for describing specific embodiments and are not intended to limit the invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this specification, terms such as “comprising” or “having” are intended to indicate the presence of the features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.

[0031] Additionally, terms such as "...part," "...unit," and "...module" described in the specification refer to a unit that processes at least one function or operation, and this may be implemented in hardware, software, or a combination of hardware and software.

[0032] Additionally, in this specification, when a step is described as being located "before" or "after" another step, this includes not only cases where a step is in a direct chronological relationship with another step, but also cases where there is an indirect chronological relationship in which the chronological order of the two steps may change, such as a mixing step following each step.

[0033] Embodiments of the present invention will be described in detail below with reference to the attached drawings.

[0034] FIG. 1 is a basic algorithm of an optimization method for a data density-based abnormal detection algorithm according to an embodiment of the present invention, FIG. 2 is a flowchart of an optimization method for a data density-based abnormal detection algorithm according to an embodiment of the present invention, and FIG. 3 is an example diagram of a step of dividing blocks for an image and dividing them into layers according to an embodiment of the present invention.

[0035] Referring to FIGS. 1 to 3, the optimization method of a data density-based abnormal detection algorithm may include the steps of: inputting an image (S100); dividing the input image into blocks of a certain size (S200); dividing each divided block into multiple layers (S300); extracting a characteristic data point for each selected layer among the divided layers (S400); forming a group of grouped data points extracted from the layers (S500); storing the group in a memory bank (S600); performing sampling on the stored group (S700); and storing the sampled values ​​in a memory bank (S800).

[0036] Below, each step will be explained in detail.

[0037] First, the step (S100) of inputting an image can be arranged so that an image (10) for training is input into a data density-based abnormal detection model.

[0038] At this time, the image (10) may be configured to be converted into a format optimized for the model, such as RGB or Grayscale.

[0039] In addition, if the size of the image (10) is not constant, it may be arranged to be resized or padded to fit the model.

[0040] Next, in the step (S200) where the input image is divided into blocks of a certain size, the image (10) may be divided into blocks (20) of a certain size.

[0041] At this time, the block (20) may be provided as a single pixel. However, the size of the block (20) is not limited thereto and may be provided in units of 32x32 pixels or 64x64 pixels.

[0042] Next, in the step (S300) where each divided block is divided into multiple layers, each of the divided blocks (20) may be divided into multiple layers (30).

[0043] At this time, the block (20) may be arranged to be divided into four layers.

[0044] Specifically, the first layer may be configured to include basic information, such as edges, lines, points, and color changes, as low-level features.

[0045] The second layer can be configured to include the pattern and texture structure of an object that combines low-level features as an intermediate feature.

[0046] The third layer is a high-level feature and may be configured to include information that can identify an object, such as the partial shape or structure of the object.

[0047] The fourth layer relates to the final feature and may be configured to include the overall shape and structure of the object.

[0048] In the step (S400) where characteristic data points are extracted for each selected layer among the divided layers, the second layer and the third layer may be selected to extract data points.

[0049] Specifically, the aforementioned Layer 1 is limited in classification and identification because it includes only very simple features. Furthermore, since the aforementioned Layer 4 includes too many high-dimensional features by including full object information, there is a high possibility that specific details will be lost.

[0050] In comparison, layers 2 and 3 strike a balance between low-level features (lines, points) and high-level features (object semantics), and contain information useful for classification or anomaly detection.

[0051] In particular, the above-mentioned Layer 2 effectively represents structural information such as patterns and textures, thereby providing basic clues that constitute an object. Additionally, the above-mentioned Layer 3 learns the partial shape and structural features of an object, making it effective for distinguishing objects.

[0052] Therefore, combining the above 2nd layer and the above 3rd layer allows for the extraction of more powerful and useful features.

[0053] In addition, if only the above-mentioned 2nd layer and the above-mentioned 3rd layer are selected, the amount of features is appropriately limited, which can improve the calculation speed, while at the same time, important information is preserved, which can ensure accuracy.

[0054] Conversely, including up to layer 4 requires more complex calculations, and layer 1 may be inefficient due to a lot of unnecessary details.

[0055] Accordingly, in the step (S400) where data points that are characteristic of each selected layer among the divided layers are extracted, the above-mentioned 2nd layer and the above-mentioned 3rd layer may be selected to extract data points that are characteristic of each layer.

[0056] At this time, the above data points can be quantified and extracted as vector values, etc.

[0057] FIG. 4 is a flowchart of the step of forming a grouped set of data points extracted from a layer according to an embodiment of the present invention, and FIG. 5 is an example diagram of the step of forming a grouped set of data points extracted from a layer according to an embodiment of the present invention.

[0058] Referring further to FIGS. 4 and 5, the step (S500) of forming a grouped set of data points extracted from a layer may include the step (S510) of setting a plurality of neighboring blocks into one window, the step (S520) of applying windows of various sizes for each layer, the step (S530) of extracting data points for each window, the step (S540) of performing pooling for data points included in each window, and the step (S550) of grouping the pooling results performed for each window to form a set.

[0059] In the step (S510) where a plurality of adjacent blocks are set as one window, the plurality of adjacent blocks (10) can be arranged to be set as one window.

[0060] For example, blocks (10) consisting of three blocks each in the horizontal and vertical directions may be configured to form a single window, or blocks (10) consisting of five blocks each in the horizontal and vertical directions may be configured to form a single window. At this time, the size of the window is not limited to this and it is also possible to configure it in a larger unit.

[0061] Next, in the step (S520) where windows of various sizes are applied to each layer, the windows set in the previous step can be arranged to be applied to each layer in various sizes. Small windows are advantageous for detailed data analysis, while large windows are useful for identifying global characteristics at multiple levels. Therefore, by hierarchically arranging window sizes to vary by layer, it is possible to analyze data characteristics at multiple levels.

[0062] Next, in the step (S530) where data points are extracted for each window, data points may be extracted within the window for each window.

[0063] In this step, spatially distributed data can be summarized within the range of a window. Specifically, a representative data point can be selected within each of the aforementioned windows.

[0064] For example, each block (20) in the image has a specific value (e.g., brightness, color). And, the second layer or the third layer is also provided in a form consisting of combinations of these specific values. After applying a window of a specific size to the block (20), it can be arranged to extract data points having a value corresponding to one of the maximum value, average value, or median value according to a pre-set condition for each window.

[0065] Next, in the step (S540) where pooling of data points included in each window is performed, the data points extracted in the previous step may be separated and processed according to the size of each window.

[0066] Specifically, pooling operations for the largest value, average value, median, etc., in each window can be arranged.

[0067] At this time, pooling operations can be performed in parallel on data points generated from various window sizes.

[0068] In the step (S550) where pooling results formed by window are grouped to form a set, each pooling result can be grouped to form a set.

[0069] For example, if the maximum values ​​of a 2x2 window, a 3x3 window, and a 5x5 window are extracted respectively, they can be concatenated to form a single large vector. More specifically, if the 2x2 window pooling result is [1, 2, 3, 4], the 3x3 window pooling result is [5, 6, 7, 8, 9], and the 5x5 window pooling result is [10, 11, 12, 13, 14, 15], then concatenating them results in a final pooling result of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15].

[0070] Alternatively, it may be prepared by averaging pooling results extracted from windows of various sizes and combining them into a single value. For example, the average value of the 2x2 window pooling result: [1, 2, 3, 4] is 2.5, the average value of the 3x3 window pooling result: [5, 6, 7, 8, 9] is 7, and the average value of the 5x5 window pooling result: [10, 11, 12, 13, 14, 15] is 12, and finally, by combining the average values, the final pooling result can be [2.5, 7, 12], which has the average value for each window size.

[0071] In this way, the setter can be configured to integrate data features extracted from each layer by merging the pooling results calculated for each window under preset conditions.

[0072] In the step (S600) where the collection unit is stored in the memory bank, the collection unit prepared as described above may be prepared to be stored in the memory bank.

[0073] FIG. 6 is a flowchart of the steps for sampling a stored set of parts according to an embodiment of the present invention.

[0074] Referring further to FIG. 6, the step (S700) of sampling for a stored set of sets may include the step (S710) of clustering for a set of sets stored in a memory bank and the step (S720) of sampling for a cluster formed by clustering the set of sets.

[0075] FIG. 7 is a flowchart of the steps for clustering a set of items stored in a memory bank according to an embodiment of the present invention, and FIG. 8 is a flowchart of the steps for clustering according to an embodiment of the present invention.

[0076] Referring further to FIGS. 7 and FIGS. 8, the step of performing clustering on a set of parts stored in a memory bank (S710) may include a step of setting a plurality of cluster numbers for a set of parts and performing clustering for each cluster number (S711), a step of calculating a silhouette coefficient for each set number of clusters (S712), a step of selecting the number of clusters with the highest silhouette coefficient (S713), and a step of performing final clustering on a set of parts stored in a memory bank using the selected number of clusters (S714).

[0077] Specifically, in the step (S711) where a plurality of clusters are set for a collection unit and clustering is performed according to the number of clusters, a plurality of clusters are set for a collection unit stored in a memory bank and clustering is performed accordingly.

[0078] In the step (S711) where a plurality of clusters are set for a collection unit and clustering is performed according to the number of clusters, a step (S715) in which a center point corresponding to the number of clusters set for a collection unit stored in a memory bank is randomly set may be performed first.

[0079] In the step (S715) where a centroid corresponding to the number of clusters set for a collection unit stored in a memory bank is randomly set, the number of clusters can be set to 2 to 20. Then, once the number of clusters is set, initial centroids of the set number of clusters can be randomly selected from the data points included in the collection unit. At this time, the initial centroids may be set to any location in space, or some of the data points may be initialized as centroids.

[0080] Next, a step (S716) in which each set of parts is assigned to the nearest center point to form a cluster may be performed. In the step (S716) in which each set of parts is assigned to the nearest center point to form a cluster, the distance between each data point and all center points may be calculated. This distance calculation may be performed using the Euclidean distance formula, but is not limited thereto.

[0081] Furthermore, each data point is arranged to be assigned to the nearest centroid, and the data points assigned based on each centroid can be arranged to form clusters. In other words, all data points can be assigned to belong to a specific cluster.

[0082] Next, in the step (S717) where the center point of a cluster is updated as the average of the set values ​​within the cluster, a new center point may be calculated based on the data points of each cluster. At this time, the new center point may be determined as the average value of the data points within the cluster. As a result, the location of the center point may be moved to the center within the cluster.

[0083] Next, a step (S718) may be performed in which, until the center point is fixed, each set part is assigned to the nearest center point to form a cluster, and the center point of the cluster is updated to the average of the set part values ​​within the cluster.

[0084] In this step, the step of forming a cluster by assigning each set part to the nearest center point (S716) and the step of updating the center point of the cluster to the average of the set part values ​​within the cluster (S716) may be arranged to be repeated until the center point converges to a certain position and is fixed. Alternatively, it is possible to arrange for the number of repetitions to be pre-set and repeated until the number of repetitions is reached.

[0085] After the step (S711) in which a plurality of clusters are set for the set part prepared in this way and clustering is performed according to the number of clusters, the step (S712) in which a silhouette coefficient is calculated for each set number of clusters can be performed.

[0086] In the step (S712) where a silhouette coefficient is calculated for each set number of clusters, the silhouette coefficient for evaluating the quality of clustering may be calculated according to the following mathematical formula 1.

[0088]

[0090] The above a(i) is the average distance between data point i and other data points within the cluster to which data point i belongs, the above b(i) is the minimum average distance between data point i and other clusters to which data point i does not belong, and the above S(i) is the average silhouette coefficient, with a value between -1 and 1.

[0091] Next, in the step (S713) where the number of clusters with the highest silhouette coefficient is selected, the number of clusters with the highest silhouette coefficient can be selected.

[0092] In this case, since the number of clusters with the highest silhouette coefficient indicates the state where the data is most clearly separated, arrangements can be made to select the number of clusters with the highest silhouette coefficient.

[0093] Next, in the step (S714) where final clustering is performed on the set of items stored in the memory bank using the selected number of clusters, the final clustering may be performed based on the optimal number of clusters.

[0094] At this time, the method of performing clustering can be carried out by the aforementioned S715 to S718.

[0095] In this way, the clusters derived as a result of clustering the set part based on the optimal number of clusters can be arranged to be stored in a memory bank.

[0096] FIG. 9 is a flowchart of the step of sampling for a cluster formed by clustering a collection unit according to an embodiment of the present invention, and FIG. 10 is an example diagram of the step of sampling for a cluster formed by clustering a collection unit according to an embodiment of the present invention.

[0097] Referring to FIGS. 9 and 10, the step (S720) of sampling for a cluster formed by clustering a collection unit may include: a step (S721) of selecting an arbitrary data point within the cluster as an initial starting point; a step (S722) of calculating the distance between the initial starting point and the data points within the cluster; a step (S723) of selecting the data point calculated to be the farthest distance as a new starting point; a step (S724) of calculating the distance between the new starting point and the data points within the cluster; a step (S725) of selecting the data point calculated to be the farthest distance as a new starting point; and a step (S726) of repeating the steps of calculating the distance between the new starting point and the data points within the cluster and selecting the data point calculated to be the farthest distance as a new starting point until the number of selected data points reaches a preset number.

[0098] First, in the step (S721) where an arbitrary data point within the cluster is selected as the initial starting point, an arbitrary data point may be selected from a list or array containing all data points within the cluster. This selection may be based on random sampling or specific pre-set conditions, such as a point close to the median value of the data points.

[0099] Next, in the step (S722) where the distance between the initial starting point and the data points within the cluster is calculated, the distance between the initial starting point and all data points within the cluster may be calculated. Then, this calculated distance value may be used to select a new starting point in the next step. At this time, the distance may be calculated using the Euclidean distance formula, the Manhattan distance formula, the cosine similarity formula, etc.

[0100] Next, in the step (S723) where the data point calculated to be the farthest distance is selected as the new starting point, the data point having the largest value among the distances calculated in step S722 may be selected as the new starting point. This process can contribute to ensuring that the data points are evenly distributed within the cluster.

[0101] Next, in the step (S724) where the distance between the new starting point and the data points within the cluster is calculated, the distance between the newly selected starting point and all data points within the cluster may be recalculated. This process may be used to re-evaluate the data points within the cluster and select the next starting point.

[0102] Next, the step (S725) in which the data point calculated to be the farthest distance is selected as the new starting point can be configured to select the data point with the largest value among the distances calculated in step S724 as the new starting point. That is, it can be carried out in the same way as step S723.

[0103] Next, a step (S726) may be performed in which the distance between a new starting point and data points within a cluster is calculated and the data point calculated to be the farthest distance is selected as the new starting point, until the number of selected data points reaches a preset number.

[0104] And, until the number of selected data points reaches a preset number, a step (S726) in which the distance between a new starting point and data points within a cluster is calculated and the data point calculated to be the farthest distance is selected as a new starting point is repeated, can be arranged to form a sample value with the selected data points when the number of selected data points reaches a preset number.

[0105] In the step (S800) where the sampled sample value is stored in the memory bank, the sample value derived in this way can be stored in the memory bank.

[0106] The present invention can be configured to perform learning by storing sample values ​​in a memory bank through the aforementioned process.

[0107] And, after the step (S800) in which the sampled sample value is stored in the memory bank, a step of making a judgment about the new image by comparing the sample value stored in the memory bank with the data point extracted from the new image may be further performed.

[0108] FIG. 11 is an example diagram of a step in which a new image is determined by comparing a sample value stored in a memory bank according to an embodiment of the present invention with a data point extracted from a new image.

[0109] Referring to Fig. 11, in the step where a judgment on a new image is made by comparing a sample value stored in a memory bank with a data point extracted from a new image, the sample value already stored in the memory bank may be compared with the data point extracted from the new image input for verification.

[0110] Specifically, it can be configured to calculate the distance between a sample value already stored in a memory bank and a corresponding data point extracted from a new image input for verification.

[0111] In addition, the calculated distances can be normalized to produce a normal score. The closer the normal score formed in this way is to 0, the higher the probability that there is no abnormality.

[0112] As described above, the present invention is configured to perform sampling after clustering, and compared to the conventional method of performing sampling immediately, it is possible to make a more accurate judgment and a faster judgment.

[0113] Specifically, under the same conditions, the present invention had an average defect score of 2.07 and an average normal score of 0.92, whereas the conventional example, which only performs sampling, had an average defect score of 2.05 and an average normal score of 0.97. As such, it can be confirmed that the present invention can be judged more clearly because the average defect score and the average normal score have a larger deviation compared to the conventional example.

[0114] In addition, the time required to classify 100 sheets in the conventional example, which samples data points directly, was 350ms, but the time required to classify 100 sheets in the present invention was 210ms. That is, it can be seen that the present invention enables classification at a faster speed compared to the conventional example.

[0115] In addition, according to the present invention, a collection unit formation method through pooling is provided instead of an unfolding method. While the conventional unfolding method could process 100 images per 32ms, the collection unit formation method through pooling according to the present invention can process 100 images per 21ms, so the speed can be further improved.

[0116] Although the foregoing description of the present invention has been illustrated with reference to the drawings, it is for illustrative purposes only, and those skilled in the art will understand that other specific forms can be easily modified without altering the technical spirit or essential features of the invention. Therefore, the embodiments described above should be understood as illustrative in all respects and not restrictive. For example, each component described as a single unit may be implemented in a distributed manner, and components described as distributed may likewise be implemented in a combined form. Furthermore, the described techniques may be performed in a different order than the described method.

[0117] The embodiments described in this specification and the accompanying drawings are merely illustrative of some of the technical ideas included in the present invention. Accordingly, the scope of the present invention is defined by the claims set forth below, and all modifications or variations derived from the meaning and scope of the claims and equivalent concepts thereof should be interpreted as being included within the scope of the present invention. Explanation of the symbols

[0119] 10: Image 20: Block 30: Layer

Claims

Claim 1 Optimization method of a data density-based abnormal detection algorithm, characterized by comprising: a step of inputting an image; a step of dividing the input image into blocks of a certain size; a step of dividing each of the divided blocks into a plurality of layers; a step of extracting a data point characteristic of each selected layer among the divided layers; a step of forming a set of grouped data points extracted from the layers; a step of storing the set in a memory bank; a step of performing sampling on the stored set; and a step of storing the sample value obtained through sampling in the memory bank. Claim 2 A method for optimizing a data density-based abnormal detection algorithm, wherein, in the step of dividing each of the divided blocks into a plurality of layers, the block is divided into: a first layer including edges, lines, points, and color changes; a second layer including patterns and textures of an object; a third layer including partial shapes and structures of an object; and a fourth layer including whole shapes and structures of an object. Claim 3 In claim 2, the optimization method of a data density-based abnormal detection algorithm is characterized in that, in the step of extracting data points for each selected layer among the divided layers, the second layer and the third layer are selected to extract data points. Claim 4 In claim 1, the step of forming a grouped set of data points extracted from the layer comprises: a step of setting a plurality of adjacent blocks as a single window; a step of applying windows of various sizes for each layer; a step of extracting data points for each window; a step of performing pooling for data points included in each window; and a step of grouping the pooling results performed for each window to form a set. This describes an optimization method for a data density-based abnormal detection algorithm. Claim 5 A method for optimizing a data density-based abnormal detection algorithm, characterized in that, in claim 1, the step of sampling the stored set portion comprises: a step of clustering the set portion stored in the memory bank; and a step of sampling the cluster formed by clustering the set portion. Claim 6 In claim 5, the step of performing clustering on a set portion stored in the memory bank comprises: a step of setting a plurality of cluster numbers for the set portion and performing clustering for each cluster number; a step of calculating a silhouette coefficient for each of the set cluster numbers; a step of selecting the cluster number with the highest silhouette coefficient; and a step of performing final clustering on the set portion stored in the memory bank using the selected cluster number. Claim 7 In claim 6, the step of performing the clustering comprises: a step of randomly setting a center point corresponding to the number of clusters set for each set part stored in the memory bank; a step of forming a cluster by assigning each set part to the nearest center point; a step of updating the center point of the cluster to the average of the values ​​of the set part within the cluster; and a step of repeating the steps of forming a cluster by assigning each set part to the nearest center point and updating the center point of the cluster to the average of the values ​​of the set part within the cluster until the center point is fixed. Claim 8 A method for optimizing a data density-based abnormal detection algorithm according to claim 6, wherein, in the step of setting a plurality of cluster numbers for the set part and performing clustering according to the number of clusters, the number of clusters is set to be 2 or more and 20 or less. Claim 9 In claim 7, the step of sampling for a cluster formed by clustering the set part comprises: a step of selecting any data point within the cluster as an initial starting point; a step of calculating the distance between the initial starting point and the data points within the cluster; a step of selecting the data point calculated to be the farthest distance as a new starting point; a step of calculating the distance between the new starting point and the data points within the cluster; a step of selecting the data point calculated to be the farthest distance as a new starting point; and a step of repeating the steps of calculating the distance between the new starting point and the data points within the cluster and selecting the data point calculated to be the farthest distance as a new starting point until the number of selected data points reaches a preset number, wherein the selected data points are arranged to form the sample value, thereby optimizing a data density-based abnormal detection algorithm. Claim 10 A method for optimizing a data density-based abnormal detection algorithm, characterized in that, in claim 1, after the step of storing the sample value obtained through sampling in a memory bank, the method further includes the step of comparing the sample value stored in the memory bank with a data point extracted from a new image to make a judgment regarding the new image.