A calibration method and system based on machine vision recognition
By using a method of periodic selective data collection and dynamic allocation of processing threads, the problem of resource waste and model accuracy caused by differences in data sources during target recognition model training is solved, achieving efficient and stable data processing and model training results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN VICO TECH CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-14
AI Technical Summary
Existing technologies lack consideration for the characteristics of each data source and the differences in target object types during target recognition model training, resulting in target localization deviations, inaccurate feature extraction, decreased model generalization ability, and serious waste of computing resources.
A calibration method based on machine vision recognition is adopted to periodically and selectively collect raw or standard videos. Combined with the data source's own processing standards and monitoring scenarios, processing threads are dynamically allocated, and resource allocation is optimized through a multi-period verification mechanism to achieve targeted selection of collection types and avoid the limitations of a uniform collection mode.
Significantly reduce the waste of computing resources, improve data processing efficiency, ensure the stability and accuracy of model training, adapt to the video data processing needs of multiple data sources, and improve the model training effect.
Smart Images

Figure CN122391380A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual calibration technology, specifically to a calibration method and system based on machine vision recognition. Background Technology
[0002] In core application scenarios such as algorithm training, scientific research experiments, and data annotation, the training effect of target recognition models highly depends on the support of high-quality video data. It is necessary to collect video data containing a large number of target elements from multiple trusted visual surveillance data sources as training samples. It is worth noting that each trusted data source simultaneously stores two types of video data: one is the original video that has not undergone any processing and retains the original imaging information; the other is the standard video that the data source has adapted according to its own device display standards. It should be clarified that the processing standards of the data source itself are only used to meet the display and viewing needs of local videos and are not consistent with the standardization specifications required by the model training end to ensure training accuracy. The two have essential differences in key dimensions such as imaging parameters and coordinate systems. For the model training end, in order to ensure the consistency of video data imaging from multiple different data sources and avoid adverse consequences such as target localization deviation, inaccurate feature extraction, and decreased model generalization ability caused by differences in imaging coordinates and inconsistent parameters of each data source, the core requirement is to perform targeted standardization and conversion only on the regions of the video data containing the target object, without performing any processing on non-target regions within the video frame. This ensures training accuracy while reducing the computational power consumption and time cost of data processing. However, existing technologies lack consideration for the characteristics of each data source and the differences in target object types during the data acquisition and processing stages of target recognition model training. Specifically, existing technologies either uniformly collect raw videos from all data sources and perform full batch standardization on the target object portion of all raw videos at the training end; or uniformly collect standard videos from all data sources and then perform full batch standardization on the target object portion of the standard videos. However, in practical applications, different target object types will lead to significant differences in the target object area in image frames. Moreover, the video processing standards of each data source and the monitoring scenarios of the monitoring equipment are also different. Existing technologies neither consider the impact of target object type on target area, nor do they make targeted selections based on the characteristics of the monitoring data sources to determine whether each data source should provide raw or standard videos, nor do they optimize the selection based on the differences in target object area, data source processing standards, and monitoring scenarios. This not only wastes computing resources and reduces data processing efficiency, but also further exacerbates the positioning deviation in model training, causing the model training accuracy and generalization ability to fall short of expectations, seriously restricting the application effect of target recognition models in various scenarios. To address the above problems, this invention proposes a solution. Summary of the Invention
[0003] The purpose of this invention is to provide a calibration method and system based on machine vision recognition, in order to solve the problems mentioned in the background art.
[0004] This invention provides a calibration method based on machine vision recognition, comprising the following steps: Step 1: The source data acquisition module selects raw or standard videos that match the preset acquisition conditions by combining the acquisition types of each trusted data source in the acquisition period at every acquisition cycle, thereby obtaining the training videos of each data source in the acquisition period. Step 2: After receiving the training videos corresponding to each trusted data source in each acquisition cycle, the source data processing module generates training graph sets based on the acquisition cycle for each trusted data source according to the preset generation rules. Step 3: The source data processing module starts a mining process after generating a training graph set for each data source based on a collection period. After the mining process is completed, it generates and stores the data to be analyzed for each trusted data source in the collection period. Step 4: The source data analysis module analyzes all the data to be analyzed stored within the analysis cycle at preset analysis intervals, and generates the first update instruction and the second update instruction for the analysis cycle.
[0005] Furthermore, after completing step four, the following steps also need to be completed: Step 5: Each time the source data acquisition module receives the first update instruction for an analysis cycle, it updates the acquisition type of each data source stored in the first update instruction to another acquisition type that is selectively related to it. Step Six: After receiving the second update instruction for each analysis cycle, the source data processing module updates the evaluation indicators of each data source stored in its internal memory.
[0006] Furthermore, in step one, the acquisition types include two types: raw video and standard video. Raw video and standard video are mutually exclusive, meaning that only one can be selected.
[0007] Furthermore, in step two, the content generated by the trusted data source for each acquisition period based on the training graph set of the acquisition period is as follows: Based on the system operating status at the moment when the training video from each trusted data source in the acquisition period is received, determine the number of processing threads that can be created based on the acquisition period, and create the corresponding number of processing threads. Based on the evaluation metrics of each trusted data source stored in the source data processing module at the time of creation, the number of allocation threads for each data source in several allocation cycles is calculated sequentially. Based on the number of allocation threads for each data source in several allocation cycles, an equal number of processing threads are randomly assigned from all the created processing threads and a corresponding processing graph is assigned to them. Once all processing graphs of all processing threads have been specified in an allocation cycle, all processing threads are started synchronously, and a unified calibration process is performed on all specified processing graphs to obtain the standard image of the frame image within all processing graphs. After all the frame images from each data source within the training video of the acquisition period have been added to a processing atlas and the processing atlas has been standardized and calibrated, for any data source, the standard images of all frame images belonging to its training video that are temporarily stored are obtained and added to the same empty set to obtain the training atlas of the data source based on the acquisition period.
[0008] Furthermore, in step two, based on the number of allocated threads for each data source in several allocation cycles, an equal number of processing threads are randomly assigned from all created processing threads, and the corresponding processing atlas content is specified for them as follows: S21: Taking the time when all processing threads are created as the start time of the period, the first allocation period of this allocation is defined according to the preset fixed duration, and the number of allocation threads of each data source in the allocation period is calculated and obtained. S22: Based on the number of allocated threads for each data source in the allocation period, allocate an equal number of processing threads for each data source in the allocation period. After allocation, for the training video of any data source in the acquisition period, perform several extraction operations to obtain several processing graph sets. Assign a processing thread allocated to the data source in the allocation period to each processing graph set. The number of times the extraction operation is executed is consistent with the number of processing threads allocated to the data source in the allocation period. S23: Thereafter, each allocation cycle is defined in the same way as S21, and processing tasks are assigned and executed for each processing thread within each allocation cycle.
[0009] Furthermore, in S21, the number of allocation threads for each data source in the allocation period is calculated as follows: SS11: Label all trusted data sources selected by the administrator as F1, F2, ..., Ff, where f is the total number of trusted data sources selected by the administrator; SS12: Calculate the allocation thread coefficient H1 of data source F1 in this allocation period. The formula for calculating H1 is as follows: , g=1, 2, ..., f; where G1 is the evaluation index of data source F1 stored in the source data processing module during the allocation period in this allocation, Gg refers to the evaluation index of each data source stored in the source data processing module during the allocation period in this allocation, and β1 is the adjustment factor of data source F1 in the allocation period in this allocation, and the calculation formula is: β1= 0.9 + (λ1 - 0.8) × 0.5, where the value of λ1 in the allocation period is 1.0; SS13: Calculate the number of allocation threads I1 of data source F1 in the allocation period during this allocation. The calculation formula is I1=max(1,round(H1×J)), where J is the total number of processing threads currently created. SS14: Calculate and obtain the number of allocation threads for data sources F2, F3, ..., Ff in the allocation period according to SS11 to SS13, and label them as I2, I3, ..., If.
[0010] Furthermore, in step three, the mining steps for obtaining the data to be analyzed from any trusted data source in any collection period are as follows: The trusted data source is obtained based on the training image set of the acquisition period and the single-frame processing time of each standard image within it; The acquisition type and acquisition conditions of the trusted data source in the acquisition period are obtained. A video segment that is selectively related to the acquisition type and matches the acquisition conditions is extracted from the data source and used as the selective video of the data source in the acquisition period. According to the acquisition time of each standard image in the training image set, the frame image corresponding to the acquisition time is found in the selective video. A box selection operation is performed on the frame image. After the box selection operation is completed, the box selection area in the frame image is uniformly calibrated according to the preset uniform calibration rules to obtain the standard image of the frame image and the single frame processing time is recorded. The standard images of all frames after unified calibration are added to the same empty dataset to obtain the selected image set of the data source in the acquisition period; the data to be analyzed of the data source in the acquisition period is generated according to the single frame processing time of the selected image set and the single frame processing time of each frame of the standard image set in it.
[0011] Furthermore, in step four, the contents of the first update instruction and the second update instruction for any analysis cycle are as follows: S11: Select one data source from all trusted data sources selected by the administrator as the source to be analyzed, and label all the data to be analyzed stored in the source to be analyzed during the analysis period as A1, A2, ..., Aa, a≥1; S12: Extract all standard frames contained in the training image set within the data to be analyzed, and label them as B1, B2, ..., Bb, b≥1 respectively; S13: Read the standard image B1, obtain the area of the selection box used to select the target object within the standard image B1, and use the area as the processing area of the standard image B1, marked as C1. Similarly, obtain the processing areas of the standard images B2, B3, ..., Bb in sequence. S14: Calculate the single-frame processing area and single-frame processing time of the training image set within the data A1 to be analyzed, as follows: The discrete point filtering algorithm is used to process the processing area of the standard images B1, B2, ..., Bb, and the average value of all remaining processing areas after data processing is calculated. The average value is then calibrated as the single-frame processing area C1 of the training image set in the data A1 to be analyzed. The processing time of all remaining processed areas after data processing is obtained from the data to be analyzed A1, and the average value is calculated using the summation and averaging formula. The average value is used as the single frame processing time C2 of the training image set in the data to be analyzed A1. S15: Calculate the multidimensional evaluation index E1 of the training image set within the data A1 to be analyzed using the formula E1=(C2 / C1)×ɑ1+(C3 / C)×ɑ2+(D1 / D)×ɑ3; where C3 is the total number of standard images in the training image set, C is the total number of frame images contained in the training video of the training image set obtained after unified calibration processing, D1 is the standard deviation of the processing time of the processing area of the standard images B1, B2, ..., Bb in the data A1 to be analyzed, D is the preset standard critical fluctuation threshold, and ɑ1, ɑ2, and ɑ3 are the preset calibration efficiency weight, calibration effectiveness weight, and calibration stability weight, respectively. S16: Calculate the single-frame processing area and single-frame processing time of a selected map set within the data A1 to be analyzed according to S12 to S14 respectively, and calculate and obtain the multi-dimensional evaluation index E1 of the selected map set within the data A1 to be analyzed according to S15. S17: Calculate and obtain the single-frame processing time of the training graph set and the selected graph set within the data to be analyzed A2, A3, ..., Aa, respectively, according to S12 to S16; The single-frame processing time of the training image set in each of the data to be analyzed (A1, A2, ..., Aa) is compared with the single-frame processing time of a selected image set, and the comparison results are statistically analyzed. Based on the comparison results, it is determined whether the acquisition type of the source to be analyzed stored in the source data acquisition module should be updated in the analysis period. Based on the determination results, the evaluation index of the source to be analyzed is calculated. S18: Select all the trusted data sources as the sources to be analyzed in sequence. According to S17, update the collection type of the source to be analyzed stored in the source data collection module in the analysis cycle in sequence, and calculate the evaluation index of all trusted data sources respectively. The analysis period generates a first update instruction based on all data sources that are determined to require a data collection type update during the analysis period, and generates a second update instruction based on the evaluation metrics of all trusted data sources.
[0012] Furthermore, in S17, the comparison and determination are as follows: The number of data to be analyzed that satisfy the condition that the single-frame processing time of the training image set is greater than or equal to the single-frame processing time of the selected image set is counted, and the number of data to be analyzed that satisfy the condition that the single-frame processing time of the training image set is less than the single-frame processing time of the selected image set is counted; if the former number is greater than the latter number, it is determined that the acquisition type of the source to be analyzed does not need to be updated within the analysis period; if the former number is less than or equal to the latter number, it is determined that the acquisition type of the source to be analyzed needs to be updated within the analysis period.
[0013] A calibration system based on machine vision recognition includes: The source data acquisition module is used to selectively acquire raw or standard videos that match preset acquisition conditions at each acquisition cycle, based on the acquisition type of each data source in the acquisition cycle, thereby obtaining training videos from each data source in the acquisition cycle, and transmitting the training videos to the source data processing module. The source data processing module is used to generate training graph sets based on the collection period for each trusted data source according to preset generation rules after receiving the training videos corresponding to each trusted data source in each collection period. The source data analysis module is used to start a mining process once after the source data processing module completes the unified calibration processing of the training video of each data source in the acquisition period for each acquisition period, and to obtain and store the data to be analyzed from each data source in the acquisition period after the mining process is completed. The source data analysis module is also used to analyze all the data to be analyzed stored in the analysis cycle at a preset analysis cycle interval, and generate the first update instruction and the second update instruction of the analysis cycle. The source data acquisition module is also used to update the acquisition type of each data source stored in the first update instruction to another acquisition type that is selectively related to each data source contained in the first update instruction, upon receiving the first update instruction for each analysis cycle. The source data processing module is also used to update the evaluation metrics of each data source stored in it after receiving the second update instruction for each analysis cycle.
[0014] Compared with existing technologies, it has the following advantages: This invention periodically updates the acquisition type for each data source, comprehensively covering both raw video and standard video acquisition scenarios. It selects the appropriate acquisition type based on the processing standards of each data source and the monitoring scenarios of the monitoring equipment, completely overcoming the limitations of the unified acquisition mode in existing technologies and significantly reducing the waste of computing resources. In this solution, the source data analysis module compares the single-frame processing time of the training image set corresponding to the current acquisition type of each trusted data source with that of the selected image set corresponding to another acquisition type at a preset analysis cycle. Based on the statistical results, it determines whether to update the acquisition type, achieving dynamic switching between the two acquisition types. This breaks the fixed pattern of the existing technology that uniformly acquires raw or standard video from all data sources. This approach fully adapts to the video processing standards of each data source and the monitoring scenarios of the monitoring equipment, selecting a standardized acquisition type that better fits the target recognition model for each data source. This avoids unnecessary standardization conversions caused by unified acquisition and solves the problem of serious computing waste caused by selecting acquisition types based on data source characteristics. This invention optimizes system resource allocation through dynamic allocation of processing threads and a multi-cycle verification mechanism, further improving data processing efficiency, reducing resource waste, ensuring stable operation of the calibration process, and adapting to the processing needs of multiple data sources and large-scale video data. Based on the system's operating status, the number of processing threads that can be created is determined, and the number of threads is calculated and allocated in conjunction with the evaluation indicators of each data source. Furthermore, the total number of threads is verified in each allocation cycle to ensure reasonable thread allocation and avoid resource waste or situations where no threads are available for the data source. Attached Figure Description
[0015] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a system block diagram of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Please see Figure 1 , Figure 2 This application provides a calibration method and system based on machine vision recognition, including a source data acquisition module, a source data processing module, and a source data analysis module: The source data acquisition module is used to selectively acquire original or standard videos that match preset acquisition conditions at each acquisition cycle, based on the acquisition type of each trusted data source in the acquisition cycle, thereby obtaining training videos from each trusted data source in the acquisition cycle, and transmitting the training videos to the source data processing module. The trusted data source and collection conditions are selected by the administrator. The data source is a visual acquisition device that has completed authorized acquisition and has dual-stream storage capability. The collection conditions are used to specify the start time point and collection duration of the original video or standard video to be collected. For example, the content of a collection condition can be "2021.2.10, 24 hours". The original video refers to the video directly acquired from the data source without distortion correction or coordinate conversion processing. The standard video from any data source refers to the original video acquired from the data source, which has undergone distortion correction and coordinate conversion processing according to the preset processing rules of the data source. The preset processing rules of any data source are pre-set according to the hardware parameters of the data source, such as lens distortion parameters, installation angle, pixel resolution and acquisition scene requirements. It should be noted that the acquisition types include two types: raw video and standard video. Raw video and standard video are mutually exclusive, meaning that only one can be selected. The training video content collected by any trusted data source in any collection period is as follows: The acquisition type of the data source updated and stored in the source data acquisition module is obtained. If the acquisition type is raw video, then according to the acquisition conditions of the data source in the acquisition period, a raw video segment matching the acquisition conditions is extracted from all the raw videos stored in the data source and used as the training video of the data source in the acquisition period. The start time point and video duration of the training video are consistent with the start time point and acquisition duration in the acquisition conditions. If the acquisition type is standard video, then according to the acquisition conditions of the acquisition period corresponding to the data source, a standard video segment matching the acquisition conditions is extracted from all the standard videos stored in the data source and used as the training video of the data source in the acquisition period, wherein the start time point and video duration of the training video are consistent with the start time point and acquisition duration in the acquisition conditions. The source data processing module is used to generate training graph sets based on the acquisition period for each trusted data source according to a preset generation rule after receiving the training videos from each trusted data source in each acquisition period. The rules for generating trusted data sources for any given acquisition period, based on the training graph set for that acquisition period, are as follows: Based on the system operating status at the moment when the training video of each trusted data source in the acquisition period is received, determine the number of processing threads that can be created based on the acquisition period, and create the corresponding number of processing threads. The system operating status includes, but is not limited to, CPU utilization, memory free amount, thread load, etc. Based on the evaluation metrics of each trusted data source stored in the source data processing module at the time of creation, the number of allocation threads for each data source in this allocation is calculated sequentially over several allocation periods. Based on the number of allocation threads for each data source over several allocation periods, an equal number of processing threads are randomly assigned from all created processing threads and assigned corresponding processing graphs. The specific details are as follows: S21: Taking the moment when all processing threads are created as the start time of the period, and according to a preset fixed duration, define the first allocation period for this allocation, and calculate the number of allocated threads for each data source in the allocation period. The calculation steps are as follows: SS11: Label all trusted data sources selected by the administrator as F1, F2, ..., Ff, where f is the total number of trusted data sources selected by the administrator; SS12: Calculate the allocation thread coefficient H1 of data source F1 in this allocation period. The formula for calculating H1 is as follows: g = 1, 2, ..., f; In the formula, G1 is the evaluation index of data source F1 stored in the source data processing module during the allocation period in this allocation, Gg refers to the evaluation index of each data source stored in the source data processing module during the allocation period in this allocation, and β1 is the adjustment factor of data source F1 in the allocation period in this allocation. The calculation formula is: β1 = 0.9 + (λ1 - 0.8) × 0.5. λ1 is not a fixed value. It takes different values according to the order of the allocation period in this allocation. In the allocation period, the value of λ1 is 1.0. SS13: Calculate the number of allocated threads I1 for data source F1 in the allocation period during this allocation. The calculation formula is I1=max(1,round(H1×J)), where J is the total number of currently created processing threads. In the formula, max(1,) is used to ensure that the number of allocated threads for each data source in the allocation period during this allocation is at least 1, avoiding the situation where there are no processing threads available for allocation for a data source; the round() function is used to ensure that the number of processing threads available for allocation for each data source is an integer. SS14: Calculate and obtain the number of allocation threads for data sources F2, F3, ..., Ff in the allocation period according to SS11 to SS13, and label them as I2, I3, ..., If; Based on the number of threads allocated to each data source in the allocation period, an equal number of processing threads are allocated to each data source in the allocation period. After the allocation is completed, for the training video of any data source in the acquisition period, several extraction operations are performed to obtain several processing graph sets. For each processing graph set, a processing thread allocated to the data source in the allocation period is specified. The number of extraction operations is consistent with the number of processing threads allocated to the data source in the allocation period. The extraction operation involves extracting a predetermined fixed number of frame images sequentially from the beginning to the end according to the playback order of the frame images in the training video, and generating several processing image sets based on the extracted frame images. Once all processing graphs of all processing threads have been specified in an allocation cycle, all processing threads are started synchronously, and a unified calibration process is performed on all specified processing graphs to obtain the standard image of the frame image within all processing graphs. For any given processing thread, the following is the content of its unified labeling process for the specified processing graph: The training image set is traversed to identify all frame images containing the target object. For each identified frame image, a bounding box operation is performed. After the bounding box operation is completed, the bounding box region in the frame image is uniformly calibrated according to a preset uniform calibration rule to obtain the standard image of the frame image and the processing time of each frame is recorded. The target object is the object to be identified specified by the target recognition model to be trained, including but not limited to one or more of people, animals, plants, and objects. The standard images of all frames after unified calibration are temporarily stored. Among them, the unified calibration rules are used to eliminate differences in shooting angle, image scale, imaging parameters and local texture deviation between different frames of images, and to unify the calibration boundaries, annotation coordinates, category labels and annotation formats. The content of the bounding box operation for any identified frame image is as follows: Based on the number of rows and columns of all pixels of the target object within the frame image, the largest number of rows and columns is selected as the matching item to match the most suitable selection box from a number of preset selection boxes of various sizes, and the target object is selected in the frame image using the selection box. It should be noted that the training process of the target recognition model relies on training data that has been labeled with targets. Therefore, before the target recognition model training begins, the target objects in the training data must be labeled with their positions. This step performs frame-by-frame target recognition on the training video during the data analysis phase. Its purpose is to automatically determine the position information of the target objects within the frame, provide a basis for the subsequent labeling of training data, avoid manual frame-by-frame screening and positioning of targets, and improve the efficiency of data labeling and the degree of automation in dataset preparation. S22: Thereafter, each allocation cycle is defined in the same way as S21, and processing tasks are assigned and executed for each processing thread within each allocation cycle; It should be noted that after each allocation cycle is defined, the number of allocation threads for each data source in each allocation cycle is calculated according to SS11 to SS13. The calculation formula for λ1 is λ1 = the total number of standard images calibrated by each data source in the previous allocation cycle / the preset number of calibration standard images. S23: When the frame images of each data source in the training video of the acquisition period are added to a processing graph set and the processing graph set has been uniformly labeled, for any data source, obtain the standard image of all frame images of the training video belonging to it that is temporarily stored, and add it to the same empty set to obtain the training graph set of the data source based on the acquisition period. In this process, when each data source finishes running in any allocation cycle, the end time of the current allocation cycle is used as the start time of the next allocation cycle to complete the delineation of the next allocation cycle. It should be noted that in this allocation process, after the number of allocation threads for each data source is calculated in each allocation cycle, the sum of the number of allocation threads for each data source is verified. The verification content is as follows: If the sum of the number of allocation threads for all data sources in the allocation period is greater than J, then the number of allocation threads for each data source in the allocation period will be decreased by 1 in descending order of the evaluation metrics of each data source, until the sum of the allocation thread data for all data sources in the allocation period equals J. The source data analysis module is used to start a mining process after the source data processing module generates a training graph set for each data source based on a collection period. After the mining process is completed, it generates the data to be analyzed for each trusted data source in the collection period and transmits the generated data to be analyzed for each trusted data source in the collection period to the source data analysis module for storage. The steps for mining data from any trusted data source in any collection period are as follows: The trusted data source is obtained based on the training image set of the acquisition period and the single-frame processing time of each standard image within it; The acquisition type and acquisition conditions of the trusted data source in the acquisition period are obtained. A video segment that is selectively related to the acquisition type and matches the acquisition conditions is extracted from the data source and used as the selective video of the data source in the acquisition period. According to the acquisition time of each standard image in the training image set, the frame image corresponding to the acquisition time is found in the selective video. A box selection operation is performed on the frame image. After the box selection operation is completed, the box selection area in the frame image is uniformly calibrated according to the preset uniform calibration rules to obtain the standard image of the frame image and the single frame processing time is recorded. The standard images of all frames after unified calibration are added to the same empty dataset to obtain the selected image set of the data source in the acquisition period; Based on the single-frame processing time of the training image set and each standard image within it, the single-frame processing time of the selected image set and each image within it generates the data to be analyzed from the data source during the acquisition period. The source data analysis module is also used to analyze all the data to be analyzed stored within the analysis period at preset analysis intervals, and to determine the analysis steps as follows: S11: Select one data source from all trusted data sources selected by the administrator as the source to be analyzed, and label all the data to be analyzed stored in the source to be analyzed during the analysis period as A1, A2, ..., Aa, a≥1; S12: Extract all standard frames contained in the training image set within the data to be analyzed, and label them as B1, B2, ..., Bb, b≥1 respectively; S13: Read the standard image B1, obtain the area of the selection box used to select the target object within the standard image B1, and use the area as the processing area of the standard image B1, marked as C1. Similarly, obtain the processing areas of the standard images B2, B3, ..., Bb in sequence. S14: Calculate the single-frame processing area and single-frame processing time of the training image set within the data A1 to be analyzed, as follows: The discrete point filtering algorithm is used to process the processing area of the standard images B1, B2, ..., Bb, and the average value of all remaining processing areas after data processing is calculated. The average value is then calibrated as the single-frame processing area C1 of the training image set in the data A1 to be analyzed. The processing time of all remaining processed areas after data processing is obtained from the data to be analyzed A1, and the average value is calculated using the summation and averaging formula. The average value is used as the single frame processing time C2 of the training image set in the data to be analyzed A1. In this application, the discrete point filtering algorithm is the H-score filtering algorithm; S15: Calculate the multidimensional evaluation index E1 of the training graph set within the data A1 to be analyzed using the formula E1=(C2 / C1)×ɑ1+(C3 / C)×ɑ2+(D1 / D)×ɑ3. The multidimensional evaluation index is artificially defined and used to measure the performance of the source to be analyzed in the unified calibration process from the dimensions of calibration efficiency, calibration effectiveness, and calibration stability. The larger the value, the better the overall calibration performance of the data A1 under the training graph set, the higher the calibration efficiency, the higher the effective calibration ratio, and the more stable the calibration process. Conversely, the lower the value, the worse the overall calibration performance of the data A1 under the training graph set. In the formula, C3 is the total number of standard images in the training image set, reflecting the number of effectively calibrated images; C is the total number of frame images contained in the training video of the training image set obtained after unified calibration processing; D1 is the standard deviation of the processing time of the processing area of standard images B1, B2, ..., Bb in the data to be analyzed A1, reflecting the degree of fluctuation of the processing time of the processing area of a single frame standard image; D is the preset standard critical fluctuation threshold; α1, α2, and α3 are the preset calibration efficiency weight, calibration effectiveness weight, and calibration stability weight, respectively. The value range of α1 is 0.4~0.5, the value range of α2 is 0.3~0.4, and the value range of α3 is 0.1~0.2. These values can be adaptively adjusted according to the actual calibration scenario, such as prioritizing efficiency or prioritizing quality, to ensure the pertinence and practicality of the multi-dimensional evaluation indicators. It should be noted that the variables in the formula have been normalized to remove the influence of dimensions before being substituted into the formula for calculation. S16: Calculate the single-frame processing area and single-frame processing time of a selected map set within the data A1 to be analyzed according to S12 to S14 respectively, and calculate and obtain the multi-dimensional evaluation index E1 of the selected map set within the data A1 to be analyzed according to S15. S17: Calculate and obtain the single-frame processing time of the training graph set and the selected graph set within the data to be analyzed A2, A3, ..., Aa, respectively, according to S12 to S16; The single-frame processing time of the training image set within each of the data sets to be analyzed (A1, A2, ..., Aa) is compared with the single-frame processing time of a selected image set. The comparison results are statistically analyzed, and based on the comparison results, it is determined whether the acquisition type of the source to be analyzed stored in the source data acquisition module should be updated during the analysis period. The comparison determination content is as follows: The number of data to be analyzed that satisfy the condition that the single-frame processing time of the training image set is greater than or equal to the single-frame processing time of the selected image set, and the number of data to be analyzed that satisfy the condition that the single-frame processing time of the training image set is less than the single-frame processing time of the selected image set, are counted. If the former number is greater than the latter number, it is determined that the acquisition type of the source to be analyzed does not need to be updated within the analysis period; if the former number is less than or equal to the latter number, it is determined that the acquisition type of the source to be analyzed needs to be updated within the analysis period. Based on the judgment results, the evaluation indicators of the source to be analyzed are calculated as follows: If it is determined that the acquisition type of the source to be analyzed needs to be updated within the current analysis period, a discrete point filtering algorithm is used to process the multidimensional evaluation indicators of the training map sets within the data to be analyzed, A1, A2, ..., Aa. The average value of all remaining multidimensional evaluation indicators after data processing is calculated, and the average value is designated as the evaluation indicator of the source to be analyzed. Otherwise, a discrete point filtering algorithm is used to process the multidimensional evaluation indicators of one map set within the data to be analyzed, A1, A2, ..., Aa. The average value of all remaining multidimensional evaluation indicators after data processing is calculated, and the average value is designated as the evaluation indicator of the source to be analyzed. S18: Select all the trusted data sources as the sources to be analyzed in sequence. According to S17, update the collection type of the source to be analyzed stored in the source data collection module in the analysis cycle in sequence, and calculate the evaluation index of all trusted data sources respectively. The first update instruction for the analysis period is generated based on all data sources that are determined to require an update of the acquisition type in the analysis period, and the first update instruction is transmitted to the source data acquisition module. The second update instruction for the analysis cycle is generated based on the evaluation metrics of all trusted data sources, and the second update instruction is transmitted to the source data processing module. After receiving the first update instruction of the analysis cycle, the source data acquisition module updates the acquisition type of each data source contained in the first update instruction to another acquisition type that is selectively related to it. For example: If the acquisition type of a source to be analyzed is stored in the source data acquisition module during the analysis period as raw video, then the acquisition type of the source to be analyzed stored in the source data acquisition module will be updated from raw video to standard video; if the current acquisition type is standard video, then it will be updated to raw video. After receiving the transmitted second update instruction, the source data processing module updates the evaluation metrics of each trusted data source stored within it.
[0018] Some of the data in the above formulas are numerical calculations with dimensions removed, and the contents not described in detail in this specification are all prior art known to those skilled in the art.
[0019] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A calibration method based on machine vision recognition, characterized in that, Includes the following steps: Step 1: The source data acquisition module selects raw or standard videos that match the preset acquisition conditions by combining the acquisition types of each trusted data source in the acquisition period at every acquisition cycle, thereby obtaining the training videos of each data source in the acquisition period. Step 2: After receiving the training videos corresponding to each trusted data source in each acquisition cycle, the source data processing module generates training graph sets based on the acquisition cycle for each trusted data source according to the preset generation rules. Step 3: The source data processing module starts a mining process after generating a training graph set for each data source based on a collection period. After the mining process is completed, it generates and stores the data to be analyzed for each trusted data source in the collection period. Step 4: The source data analysis module analyzes all the data to be analyzed stored within the analysis cycle at preset analysis intervals, and generates the first update instruction and the second update instruction for the analysis cycle.
2. The calibration method based on machine vision recognition according to claim 1, characterized in that, After completing step four, the following steps also need to be completed: Step 5: Each time the source data acquisition module receives the first update instruction for an analysis cycle, it updates the acquisition type of each data source stored in the first update instruction to another acquisition type that is selectively related to it. Step Six: After receiving the second update instruction for each analysis cycle, the source data processing module updates the evaluation indicators of each data source stored in its internal memory.
3. The calibration method based on machine vision recognition according to claim 1, characterized in that, In step one, the acquisition types include two types: raw video and standard video. Raw video and standard video are mutually exclusive, meaning that only one can be selected.
4. The calibration method based on machine vision recognition according to claim 1, characterized in that, In step two, the content generated by the trusted data source for each acquisition period based on the training graph set of the acquisition period is as follows: Based on the system operating status at the moment when the training video from each trusted data source in the acquisition period is received, determine the number of processing threads that can be created based on the acquisition period, and create the corresponding number of processing threads. Based on the evaluation metrics of each trusted data source stored in the source data processing module at the time of creation, the number of allocation threads for each data source in several allocation cycles is calculated sequentially. Based on the number of allocation threads for each data source in several allocation cycles, an equal number of processing threads are randomly assigned from all the created processing threads and a corresponding processing graph is assigned to them. Once all processing graphs of all processing threads have been specified in an allocation cycle, all processing threads are started synchronously, and a unified calibration process is performed on all specified processing graphs to obtain the standard images of the frames in all processing graphs and their single-frame processing time. After all the frame images from each data source within the training video of the acquisition period have been added to a processing atlas and the processing atlas has been standardized and calibrated, for any data source, the standard images of all frame images belonging to its training video that are temporarily stored are obtained and added to the same empty set to obtain the training atlas of the data source based on the acquisition period.
5. The calibration method based on machine vision recognition according to claim 4, characterized in that, In step two, based on the number of allocated threads for each data source in several allocation cycles, an equal number of processing threads are randomly assigned from all created processing threads, and the corresponding processing atlas content is specified for each thread as follows: S21: Taking the time when all processing threads are created as the start time of the period, the first allocation period of this allocation is defined according to the preset fixed duration, and the number of allocation threads of each data source in the allocation period is calculated and obtained. S22: Based on the number of allocated threads for each data source in the allocation period, allocate an equal number of processing threads for each data source in the allocation period. After allocation, for the training video of any data source in the acquisition period, perform several extraction operations to obtain several processing graph sets. Assign a processing thread allocated to the data source in the allocation period to each processing graph set. The number of times the extraction operation is executed is consistent with the number of processing threads allocated to the data source in the allocation period. S23: Thereafter, each allocation cycle is defined in the same way as S21, and processing tasks are assigned and executed for each processing thread within each allocation cycle.
6. The calibration method based on machine vision recognition according to claim 5, characterized in that, S21, the number of allocation threads for each data source in this allocation period is calculated as follows: SS11: Label all trusted data sources selected by the administrator as F1, F2, ..., Ff, where f is the total number of trusted data sources selected by the administrator; SS12: Calculate the allocation thread coefficient H1 of data source F1 in this allocation period. The formula for calculating H1 is as follows: , g=1, 2, ..., f; where G1 is the evaluation index of data source F1 stored in the source data processing module during the allocation period in this allocation, Gg refers to the evaluation index of each data source stored in the source data processing module during the allocation period in this allocation, and β1 is the adjustment factor of data source F1 in the allocation period in this allocation, and the calculation formula is: β1= 0.9 + (λ1 - 0.8) × 0.5, where the value of λ1 in the allocation period is 1.0; SS13: Calculate the number of allocation threads I1 of data source F1 in the allocation period during this allocation. The calculation formula is I1=max(1,round(H1×J)), where J is the total number of processing threads currently created. SS14: Calculate and obtain the number of allocation threads for data sources F2, F3, ..., Ff in the allocation period according to SS11 to SS13, and label them as I2, I3, ..., If.
7. The calibration method based on machine vision recognition according to claim 4, characterized in that, In step three, the mining steps for obtaining the data to be analyzed from any trusted data source in any collection period are as follows: The trusted data source is obtained based on the training image set of the acquisition period and the single-frame processing time of each standard image within it; The acquisition type and acquisition conditions of the trusted data source in the acquisition period are obtained. A video segment that is selectively related to the acquisition type and matches the acquisition conditions is extracted from the data source and used as the selective video of the data source in the acquisition period. According to the acquisition time of each standard image in the training image set, the frame image corresponding to the acquisition time is found in the selective video. A box selection operation is performed on the frame image. After the box selection operation is completed, the box selection area in the frame image is uniformly calibrated according to the preset uniform calibration rules to obtain the standard image of the frame image and the single frame processing time is recorded. The standard images of all frames after unified calibration are added to the same empty dataset to obtain the selected image set of the data source in the acquisition period; the data to be analyzed of the data source in the acquisition period is generated according to the single frame processing time of the selected image set and the single frame processing time of each frame of the standard image set in it.
8. The calibration method based on machine vision recognition according to claim 1, characterized in that, In step four, the contents of the first and second update instructions for any analysis cycle are as follows: S11: Select one data source from all trusted data sources selected by the administrator as the source to be analyzed, and label all the data to be analyzed stored in the source to be analyzed during the analysis period as A1, A2, ..., Aa, a≥1; S12: Extract all standard frames contained in the training image set within the data to be analyzed, and label them as B1, B2, ..., Bb, b≥1 respectively; S13: Read the standard image B1, obtain the area of the selection box used to select the target object within the standard image B1, and use the area as the processing area of the standard image B1, marked as C1. Similarly, obtain the processing areas of the standard images B2, B3, ..., Bb in sequence. S14: Calculate the single-frame processing area and single-frame processing time of the training image set within the data A1 to be analyzed, as follows: The discrete point filtering algorithm is used to process the processing area of the standard images B1, B2, ..., Bb, and the average value of all remaining processing areas after data processing is calculated. The average value is then calibrated as the single-frame processing area C1 of the training image set in the data A1 to be analyzed. The processing time of all remaining processed areas after data processing is obtained from the data to be analyzed A1, and the average value is calculated using the summation and averaging formula. The average value is used as the single frame processing time C2 of the training image set in the data to be analyzed A1. S15: Calculate the multidimensional evaluation index E1 of the training image set within the data A1 to be analyzed using the formula E1=(C2 / C1)×ɑ1+(C3 / C)×ɑ2+(D1 / D)×ɑ3; where C3 is the total number of standard images in the training image set, C is the total number of frame images contained in the training video of the training image set obtained after unified calibration processing, D1 is the standard deviation of the processing time of the processing area of the standard images B1, B2, ..., Bb in the data A1 to be analyzed, D is the preset standard critical fluctuation threshold, and ɑ1, ɑ2, and ɑ3 are the preset calibration efficiency weight, calibration effectiveness weight, and calibration stability weight, respectively. S16: Calculate the single-frame processing area and single-frame processing time of a selected map set within the data A1 to be analyzed according to S12 to S14 respectively, and calculate and obtain the multi-dimensional evaluation index E1 of the selected map set within the data A1 to be analyzed according to S15. S17: Calculate and obtain the single-frame processing time of the training graph set and the selected graph set within the data to be analyzed A2, A3, ..., Aa, respectively, according to S12 to S16; The single-frame processing time of the training image set in each of the data to be analyzed (A1, A2, ..., Aa) is compared with the single-frame processing time of a selected image set, and the comparison results are statistically analyzed. Based on the comparison results, it is determined whether the acquisition type of the source to be analyzed stored in the source data acquisition module should be updated in the analysis period. Based on the determination results, the evaluation index of the source to be analyzed is calculated. S18: Select all the trusted data sources as the sources to be analyzed in sequence. According to S17, update the collection type of the source to be analyzed stored in the source data collection module in the analysis cycle in sequence, and calculate the evaluation index of all trusted data sources respectively. The analysis period generates a first update instruction based on all data sources that are determined to require a data collection type update during the analysis period, and generates a second update instruction based on the evaluation metrics of all trusted data sources.
9. The calibration method based on machine vision recognition according to claim 8, characterized in that, In S17, the comparison and judgment are as follows: count the number of data to be analyzed that satisfy the requirement that the single frame processing time of the training graph set is greater than or equal to the single frame processing time of the selected graph set, and the number of data to be analyzed that satisfy the requirement that the single frame processing time of the training graph set is less than the single frame processing time of the selected graph set. If the former quantity is greater than the latter quantity, it is determined that the acquisition type of the source to be analyzed does not need to be updated within the analysis period; if the former quantity is less than or equal to the latter quantity, it is determined that the acquisition type of the source to be analyzed needs to be updated within the analysis period.
10. A calibration system based on machine vision recognition, characterized in that, include: The source data acquisition module is used to selectively acquire raw or standard videos that match preset acquisition conditions at each acquisition cycle, based on the acquisition type of each data source in the acquisition cycle, thereby obtaining training videos from each data source in the acquisition cycle, and transmitting the training videos to the source data processing module. The source data processing module is used to generate training graph sets based on the collection period for each trusted data source according to preset generation rules after receiving the training videos corresponding to each trusted data source in each collection period. The source data analysis module is used to start a mining process once after the source data processing module completes the unified calibration processing of the training video of each data source in the acquisition period for each acquisition period, and to obtain and store the data to be analyzed from each data source in the acquisition period after the mining process is completed. The source data analysis module is also used to analyze all the data to be analyzed stored in the analysis cycle at a preset analysis cycle interval, and generate the first update instruction and the second update instruction of the analysis cycle. The source data acquisition module is also used to update the acquisition type of each data source stored in the first update instruction to another acquisition type that is selectively related to each data source contained in the first update instruction, upon receiving the first update instruction for each analysis cycle. The source data processing module is also used to update the evaluation metrics of each data source stored in it after receiving the second update instruction for each analysis cycle.