Software defect prediction method and system
By constructing image sets in different dimensions and environments, performing multi-dimensional quality scoring and comprehensive analysis of identification defects, the problem of inaccurate identification of intelligent image recognition technology in complex environments is solved, and higher recognition accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202411983914.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing intelligent image recognition technology is difficult to effectively evaluate and deal with image recognition defects in complex environments under multi-dimensional and multi-state conditions, resulting in inaccurate recognition.
By obtaining images of all objects recorded in the intelligent image recognition service software, building image sets in different dimensions and environments, performing multi-dimensional quality scores and comprehensive analysis of defect recognition, generating defect scores, and then predicting software defect objects.
It improves the accuracy and robustness of intelligent image recognition services, can evaluate image recognition defects more comprehensively and accurately, and optimizes the software's recognition capabilities and fault tolerance.
Smart Images

Figure CN119919779A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software security technology, and in particular to a software defect prediction method and system. Background Art
[0002] With the continuous development of artificial intelligence technology, especially deep learning and computer vision technology, intelligent image recognition services based on artificial intelligence have been widely used in many fields. These technologies can help users identify and understand various objects, scenes, texts, animals and other information through intelligent analysis of image and video content, thus providing more intelligent and efficient solutions for various industries.
[0003] However, despite the significant progress made in intelligent image recognition technology, there are still some challenges in practical applications. The image quality and the characteristics of the objects in the image can significantly affect the performance of the recognition system. High-quality images usually achieve better recognition results, while low-quality, blurred or images affected by complex environmental conditions often lead to inaccurate recognition. In addition, the complexity of certain objects or scenes increases the difficulty of image recognition.
[0004] Most current image recognition technologies rely on the scale and quality of training data sets to improve the accuracy of recognition models, and integrate multiple recognition modules to cope with different types of images. However, in actual application scenarios, image quality and environmental conditions are unpredictable, and traditional image recognition systems often have difficulty coping with challenges in multiple dimensions and states. Therefore, how to comprehensively and accurately evaluate the defects of intelligent image recognition services has become an important issue facing current technologies.
[0005] Therefore, a software defect prediction method and system are proposed. Summary of the invention
[0006] The purpose of the present invention is to provide a software defect prediction method and system, which obtains all objects recorded in intelligent image recognition service software; obtains images of objects in different dimensions and different environments to form a first image set and a second image set; scores and sorts the image quality in the first image set and the second image set to generate a first image scoring vector and a second image scoring vector; recognizes the first image set and the second image set multiple times by the intelligent image recognition service software to obtain a first image recognition defect vector and a second image recognition defect vector; analyzes the recognition defect vector and the image scoring vector to obtain a first defect score and a second defect score; obtains an object defect score by combining the first defect score and the second defect score; averages the object defect score to obtain a defect score threshold; and obtains an intelligent image recognition service software defect object based on the defect score threshold.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A method for predicting software defects, wherein the defect prediction process of intelligent image recognition service software includes:
[0009] Acquire all objects recorded in the intelligent image recognition service software; select a first object from the objects, acquire images of the first object in different dimensions to form a first image set; acquire images of the first object in different environments to form a second image set;
[0010] Performing quality scores on the images in the first image set in different dimensions, obtaining first image scores in different dimensions and sorting them, and generating first image score vectors; performing multiple recognitions on the first image set by intelligent image recognition service software, and obtaining first image recognition defect vectors; and comprehensively analyzing the first image recognition defect vectors and the first image score vectors, and obtaining first defect scores of the images in different dimensions;
[0011] Performing quality scoring on the images in the second image set in different environments, obtaining and sorting the second image scores in different environments, and generating a second image scoring vector; performing multiple recognition on the second image set by intelligent image recognition service software, and obtaining a second image recognition defect vector; and comprehensively analyzing the second image recognition defect vector and the second image scoring vector, and obtaining the second defect scores of the images in different environments;
[0012] Obtaining an object defect score of the intelligent image recognition service software by combining the first defect score and the second defect score;
[0013] The object defect score of the object is obtained and averaged to obtain a defect score threshold; and the intelligent image recognition service software defect object is obtained according to the defect score threshold.
[0014] Preferably, the different dimensions include image resolution, image size, noise and image clarity; the different environments include background interference, lighting conditions and occlusion.
[0015] Preferably, the specific calculation formula for the first image score is:
[0016]
[0017] Among them, S1 is the first image score, ω1 is the image resolution weight, P actual is the actual number of pixels in the image, P ideal is the ideal number of pixels in the image, ω2 is the image size weight, A actual is the actual area of the image, A ideal is the area of the desired image, ω3 is the image noise weight, NL is the image noise level, ω4 is the image clarity weight, and BM is the image blur level;
[0018] The image noise level is obtained through image processing algorithms; the image blurriness is based on a measure of blurriness.
[0019] Preferably, the generation process of the first image recognition defect vector is: the images in the first image set are recognized multiple times by the intelligent image recognition service software and averaged to obtain a first recognition error rate of the image; based on the first recognition error rate, the first image recognition defect vector is obtained; wherein the first recognition error rate is the ratio of the number of false recognitions and the number of missed recognitions to the total number of recognitions;
[0020] The generation process of the second image recognition defect vector is: the images in the second image set are recognized and averaged multiple times by intelligent image recognition service software to obtain a second recognition error rate of the image; and the second image recognition defect vector is obtained based on the second recognition error rate.
[0021] Preferably, the first defect score acquisition process:
[0022] S10. Obtaining a first recognition error rate through the process of acquiring the first image recognition defect vector;
[0023] S20. Obtain a first recognition error rate vector by obtaining a first recognition error rate of an image in the first image set; obtain a first recognition error rate vector greater than a recognition error threshold T according to the first recognition error rate vector and the first image scoring vector. e1 The corresponding image scoring threshold T q1 ;
[0024] S30. Determine whether the elements in the first recognition error rate vector and the first image score vector need to set the recognition error rate penalty factor λ e1 and quality score penalty factor λ q1 ; When the element in the first recognition error rate vector is greater than T e1 , set the recognition error rate penalty factor λ e1 , obtain the first optimized recognition error rate vector; when the element in the first image score vector is less than T q1 , set the quality score penalty factor λ q1 , obtain the first optimized image score vector;
[0025] S40. Obtaining a first defect scoring vector by weighting the first optimized recognition error rate vector and the first optimized image scoring vector;
[0026] S50. Obtain a first defect score by summing and averaging the elements in the first defect score vector.
[0027] Preferably, the specific calculation formula for the second image score is:
[0028]
[0029] Wherein, S2 is the second image score, f() is the second image scoring function, L is the lighting condition score, B is the background interference score, O is the occlusion score, b is the image brightness, Ib is the brightness value under ideal lighting, Bc is the background complexity of the image, and Or is the proportion of occluded objects in the image;
[0030] Image brightness is measured using the average brightness or standard deviation of the image; the background complexity of the image is measured using image processing algorithms (such as image segmentation); and the proportion of occluded objects in the image is calculated using an occlusion detection algorithm.
[0031] Preferably, the specific calculation process of the object defect score is:
[0032] S E =α1S F +α2S S ;
[0033] Among them, S E is the object defect score, α1 is the first defect score weight, S F is the first defect score, α2 is the second defect score weight, S S Score the second defect.
[0034] A defect prediction system for software, the defect prediction process of intelligent image recognition service software includes:
[0035] The data acquisition module acquires all objects recorded in the intelligent image recognition service software; selects a first object from the objects, acquires images of the first object in different dimensions to form a first image set; acquires images of the first object in different environments to form a second image set;
[0036] A first defect module is configured to score the quality of the images in the first image set in different dimensions, obtain first image scores in different dimensions and sort them, and generate a first image score vector; perform multiple recognitions on the first image set through intelligent image recognition service software to obtain a first image recognition defect vector; and comprehensively analyze the first image recognition defect vector and the first image score vector to obtain a first defect score of the image in different dimensions;
[0037] The second defect module is configured to score the quality of the images in the second image set in different environments, obtain the second image scores in different environments and sort them, and generate a second image score vector; perform multiple recognition on the second image set through intelligent image recognition service software to obtain a second image recognition defect vector; and comprehensively analyze the second image recognition defect vector and the second image score vector to obtain the second defect scores of the images in different environments;
[0038] A defect synthesis module, which obtains an object defect score of the intelligent image recognition service software by synthesizing the first defect score and the second defect score;
[0039] The defect prediction module obtains the object defect score of the object and performs average processing to obtain a defect score threshold; and obtains the intelligent image recognition service software defect object according to the defect score threshold.
[0040] Preferably, the specific calculation formula for the first image score is:
[0041]
[0042] Among them, S1 is the first image score, ω1 is the image resolution weight, P actual is the actual number of pixels in the image, P ideal is the ideal number of pixels in the image, ω2 is the image size weight, A actual is the actual area of the image, A ideal is the area of the desired image, ω3 is the image noise weight, NL is the image noise level, ω4 is the image clarity weight, and BM is the image blur level.
[0043] Preferably, the specific calculation formula for the second image score is:
[0044]
[0045] Among them, S2 is the second image score, f() is the second image scoring function, L is the lighting condition score, B is the background interference score, O is the occlusion score, b is the image brightness, Ib is the brightness value under ideal lighting, Bc is the background complexity of the image, and Or is the proportion of occluded objects in the image.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] 1. The present invention improves the accuracy of intelligent image recognition services through multi-dimensional quality scoring and comprehensive analysis of identified defects. Image quality is scored based on multiple dimensions such as image resolution, size, noise, and clarity, and quality assessment is performed on images in different environments. These images are recognized multiple times by the intelligent image recognition service to obtain identification defect vectors. By combining these two aspects of information, a comprehensive analysis is performed to obtain the final defect score of the image. This method not only takes into account image quality, but also introduces environmental factors, making defect assessment more comprehensive and accurate, and can effectively deal with image recognition problems in complex application scenarios.
[0048] 2. The present invention innovatively introduces the image recognition error rate in the defect scoring process. Based on the recognition error rate, an image recognition defect vector is generated and combined with the image quality scoring vector for analysis. By identifying the key defect factors in the image that may affect the accuracy of software recognition, and optimizing the recognition process and reducing the error rate, the recognition ability and accuracy of the software are improved. The fault tolerance and stability of the software when facing complex images are effectively improved, which helps to optimize the overall performance of the intelligent image recognition service and the software defect detection effect.
[0049] 3. The present invention introduces a threshold-based penalty method to optimize the image defect scoring process. When the image quality score or recognition error rate is lower than the set threshold, the defect score is adjusted by adding the corresponding penalty factor to optimize the potential problem image. This can automatically identify images that affect the accuracy of software defect recognition and perform weighted corrections, so that low-quality or high-error-rate images have a significant impact on the software score. This enables the software to more accurately identify and correct potential defects, optimizing the recognition and processing capabilities of software defects. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic flow chart of a software defect prediction method provided by the present invention;
[0051] Figure 2 A schematic diagram of the structure of a software defect prediction system according to the present invention;
[0052] Figure 3 A schematic diagram of the logic judgment of defect scoring provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] Embodiment 1
[0055] See also Figure 1 The present invention provides a method for predicting software defects. The defect prediction process of intelligent image recognition service software includes:
[0056] Acquire all objects recorded in the intelligent image recognition service software; select a first object from the objects, acquire images of the first object in different dimensions to form a first image set; acquire images of the first object in different environments to form a second image set;
[0057] Furthermore, the different dimensions include image resolution, image size, noise and image clarity; the different environments include background interference, lighting conditions and occlusion.
[0058] By acquiring image sets from different dimensions and environmental perspectives and comprehensively evaluating the image quality and recognition accuracy, the reliability and accuracy of the image recognition system under diverse conditions are further ensured, thereby improving the comprehensiveness and accuracy of defect prediction.
[0059] Performing quality scores on the images in the first image set in different dimensions, obtaining first image scores in different dimensions and sorting them, and generating first image score vectors; performing multiple recognitions on the first image set by intelligent image recognition service software, and obtaining first image recognition defect vectors; and comprehensively analyzing the first image recognition defect vectors and the first image score vectors, and obtaining first defect scores of the images in different dimensions;
[0060] Furthermore, the specific calculation formula of the first image score is:
[0061]
[0062] Among them, S1 is the first image score, ω1 is the image resolution weight, P actual is the actual number of pixels in the image, P ideal is the ideal number of pixels in the image, ω2 is the image size weight, A actual is the actual area of the image, A ideal is the area of the desired image, ω3 is the image noise weight, NL is the image noise level, ω4 is the image clarity weight, and BM is the image blur level;
[0063] Rate the resolution, Score the image size, Score the noise, Score clarity;
[0064] The image noise level is obtained through image processing algorithms; the image blurriness is based on a measure of blurriness.
[0065] By scoring the quality of images in multiple dimensions and combining the multiple recognition results of the intelligent image recognition service software, the defects of the images in different dimensions are evaluated. This method is applied in the image recognition system to effectively improve the prediction and optimization capabilities of image recognition defects.
[0066] Table 1 Image quality scores in different dimensions
[0067] Image number Resolution score Noise Rating Clarity Rating Image size rating First Image Rating Image 1 0.8 0.5 0.9 0.7 0.725 Image 2 0.6 0.4 0.7 0.6 0.516 Image 3 0.9 0.2 0.8 0.8 0.689 Image 4 0.7 0.3 0.5 0.5 0.523 Image 5 1.0 0.1 1.0 0.9 0.863
[0068] From Table 1, it can be analyzed that the image resolution, clarity and image size are linearly positively correlated with the first image score, and the image noise is linearly negatively correlated with the first image score.
[0069] Furthermore, the generation process of the first image recognition defect vector is: the images in the first image set are recognized and averaged multiple times by intelligent image recognition service software to obtain a first recognition error rate of the image; based on the first recognition error rate, a first image recognition defect vector is obtained; wherein the first recognition error rate is the ratio of the number of false recognitions and the number of missed recognitions to the total number of recognitions.
[0070] By recognizing images multiple times and calculating the first recognition error rate, the defects in image recognition are quantified, thereby improving the accuracy and robustness of the recognition system.
[0071] Further, the first defect score acquisition process, see Figure 3 :
[0072] S10. Obtaining a first recognition error rate through the process of acquiring the first image recognition defect vector;
[0073] S20. Obtain a first recognition error rate vector by obtaining a first recognition error rate of an image in the first image set; obtain a first recognition error rate vector greater than a recognition error threshold T according to the first recognition error rate vector and the first image scoring vector. e1 The corresponding image scoring threshold T q1 ;
[0074] Among them, the recognition error threshold is obtained by testing and training a large number of images, and the image scoring threshold is obtained according to the image quality;
[0075] S30. Determine whether the elements in the first recognition error rate vector and the first image score vector need to set the recognition error rate penalty factor λ e1 and quality score penalty factor λ q1 ; When the element in the first recognition error rate vector is greater than T e1 , set the recognition error rate penalty factor λ e1 , obtain the first optimized recognition error rate vector; when the element in the first image score vector is less than T q1 , set the quality score penalty factor λ q1 , obtain the first optimized image score vector;
[0076] The calculation process of the recognition error rate penalty factor is:
[0077]
[0078] Among them, E1 is the first recognition error rate, β1 is the strength of the error rate penalty factor, usually in [1, 3]. When E1≤Te1 When E1>T e1 When , β1∈(1,3]; the larger E1 is, the larger β1 is.
[0079] The calculation process of the quality score penalty factor is:
[0080]
[0081] Where q1 is the first image score, γ1 is the strength of the penalty factor for adjusting the quality score, usually with a value between [1, 3]. When q1 ≥ T q1 When q1<T q1 When ,γ1∈(1,3]; the smaller E1 is, the larger β1 is.
[0082] S40. Obtaining a first defect scoring vector by weighting the first optimized recognition error rate vector and the first optimized image scoring vector;
[0083] S50. Obtain a first defect score by summing and averaging the elements in the first defect score vector.
[0084] Table 2 Optimizing defect scores based on threshold penalty mechanism
[0085] First recognition error rate First optimize the recognition error rate First Image Rating First Optimized Image Scoring First Defect Score 0.05 0.06 0.92 0.90 0.10 0.12 0.14 0.85 0.82 0.18 0.15 0.16 0.78 0.75 0.23 0.22 0.25 0.65 0.62 0.30 0.08 0.09 0.90 0.88 0.09
[0086] By combining the recognition error rate and the image scoring vector, the penalty factor optimization process is set to effectively adjust the performance of the recognition system under different image qualities. Not only does it improve recognition accuracy, but it can also dynamically adjust the score according to the image quality, ensuring that defect assessment under various conditions is more accurate and reliable, thereby optimizing the overall performance of the intelligent image recognition service software.
[0087] Performing quality scoring on the images in the second image set in different environments, obtaining and sorting the second image scores in different environments, and generating a second image scoring vector; performing multiple recognition on the second image set by intelligent image recognition service software, and obtaining a second image recognition defect vector; and comprehensively analyzing the second image recognition defect vector and the second image scoring vector, and obtaining the second defect scores of the images in different environments;
[0088] Furthermore, the specific calculation formula of the second image score is:
[0089]
[0090] Wherein, S2 is the second image score, f() is the second image scoring function, L is the lighting condition score, B is the background interference score, O is the occlusion score, b is the image brightness, Ib is the brightness value under ideal lighting, Bc is the background complexity of the image, and Or is the proportion of occluded objects in the image;
[0091] Image brightness is measured using the average brightness and standard deviation of the image; the background complexity of the image is measured using image processing algorithms (such as image segmentation); and the proportion of occluded objects in the image is calculated using an occlusion detection algorithm.
[0092] By evaluating the quality of images and analyzing their defects in different environments, the performance of intelligent image recognition systems in various practical application scenarios is evaluated. This method takes into account environmental factors such as lighting, background interference and occlusion, and comprehensively scores from multiple angles, thereby improving the robustness and accuracy of the recognition system.
[0093] Furthermore, the generation process of the second image recognition defect vector is: the images in the second image set are recognized and averaged multiple times by intelligent image recognition service software to obtain a second recognition error rate of the image; and the second image recognition defect vector is obtained based on the second recognition error rate.
[0094] The second defect score acquisition process, see Figure 3 :
[0095] S10. Obtaining a second recognition error rate by acquiring a second image recognition defect vector;
[0096] S20. Obtain a second recognition error rate vector by obtaining a second recognition error rate of an image in the second image set; obtain a second recognition error rate vector greater than a recognition error threshold T according to the second recognition error rate vector and the second image scoring vector. e2 The corresponding image scoring threshold T q2 ;
[0097] S30. Determine whether the elements in the second recognition error rate vector and the second image score vector need to set the recognition error rate penalty factor λ e2 and quality score penalty factor λ q2 ; When the element in the second recognition error rate vector is greater than T e2 , set the recognition error rate penalty factor λ e2 , obtain the second optimized recognition error rate vector; when the element in the second image score vector is less than T q2 , set the quality score penalty factor λ q2 , obtain the second optimized image score vector;
[0098] S40. Obtaining a second defect scoring vector by weighting the second optimized recognition error rate vector and the second optimized image scoring vector;
[0099] S50. Obtain a second defect score by summing and averaging the elements in the second defect score vector.
[0100] Obtaining an object defect score of the intelligent image recognition service software by combining the first defect score and the second defect score;
[0101] The object defect score of the object is obtained and averaged to obtain a defect score threshold; and the intelligent image recognition service software defect object is obtained according to the defect score threshold.
[0102] Furthermore, the specific calculation process of the object defect score is as follows:
[0103] S E =α1S F +α2S S ;
[0104] Among them, S E is the object defect score, α1 is the first defect score weight, S F is the first defect score, α2 is the second defect score weight, S S Score the second defect.
[0105] By combining the first and second defect scores, the recognition defects of the object are comprehensively evaluated, and more accurate defect judgments are provided by combining different scoring dimensions. The stability and reliability of the intelligent image recognition service software under multi-dimensional and multi-environmental conditions are ensured, thereby improving the overall performance and application effect of the system.
[0106] The present invention improves the defect prediction accuracy of intelligent image recognition service software. First, by acquiring images in different dimensions and environments, a diverse image set is constructed, providing a rich data basis for subsequent scoring and defect identification. By performing multi-dimensional quality scoring and recognition error rate analysis on the image, the image resolution, size, noise and clarity are comprehensively considered to evaluate the defects of the image in different dimensions. The second defect score further improves the comprehensiveness and accuracy of defect assessment by analyzing the performance of the image under different environmental conditions, such as lighting, background interference and occlusion. The defect synthesis module ensures the stability and efficiency of the image recognition service in various complex scenarios by combining the first and second defect scores. Finally, objects that may have defects are predicted based on the comprehensive score, which improves the robustness of the intelligent image recognition system and reduces the cases of misidentification and missed identification. This method not only optimizes the recognition process, but also provides an accurate quantitative basis for defect detection of intelligent image recognition service software.
[0107] Embodiment 2
[0108] The present invention provides a software defect prediction method, which is applied to a software defect prediction system. The specific method flow chart and system structure diagram refer to Figure 1 and Figure 2 .
[0109] As an embodiment of the present invention, refer to Figure 1 S1 in the embodiment, S1 is applied to a data acquisition module of a defect prediction system of a software, the data acquisition module is used to acquire all objects recorded in the intelligent image recognition service software; select a first object from the objects, acquire images of the first object in different dimensions to form a first image set; acquire images of the first object in different environments to form a second image set;
[0110] Furthermore, the different dimensions include image resolution, image size, noise and image clarity; the different environments include background interference, lighting conditions and occlusion.
[0111] As an embodiment of the present invention, refer to Figure 1 S2 in the embodiment, S2 is applied to a first defect module of a defect prediction system of a software, the first defect module is used to score the quality of the images in the first image set through different dimensions, obtain and sort the first image scores under different dimensions, and generate a first image score vector; perform multiple recognition on the first image set through intelligent image recognition service software to obtain a first image recognition defect vector; comprehensively analyze the first image recognition defect vector and the first image score vector to obtain the first defect score of the image under different dimensions;
[0112] Furthermore, the specific calculation formula of the first image score is:
[0113]
[0114] Among them, S1 is the first image score, ω1 is the image resolution weight, P actual is the actual number of pixels in the image, P ideal is the ideal number of pixels in the image, ω2 is the image size weight, A actual is the actual area of the image, A ideal is the area of the desired image, ω3 is the image noise weight, NL is the image noise level, ω4 is the image clarity weight, and BM is the image blur level;
[0115] The image noise level is obtained through image processing algorithms; the image blurriness is based on a measure of blurriness.
[0116] Furthermore, the generation process of the first image recognition defect vector is as follows: the images in the first image set are recognized and averaged multiple times by the intelligent image recognition service software to obtain a first recognition error rate of the image; based on the first recognition error rate, a first image recognition defect vector is obtained; wherein the first recognition error rate is a ratio of the number of false recognitions and the number of missed recognitions to the total number of recognitions;
[0117] Further, the first defect score acquisition process, see Figure 3 :
[0118] S10. Obtaining a first recognition error rate through the process of acquiring the first image recognition defect vector;
[0119] S20. Obtain a first recognition error rate vector by obtaining a first recognition error rate of an image in the first image set; obtain a first recognition error rate vector greater than a recognition error threshold T according to the first recognition error rate vector and the first image scoring vector. e1 The corresponding image scoring threshold T q1 ;
[0120] S30. Determine whether the elements in the first recognition error rate vector and the first image score vector need to set the recognition error rate penalty factor λ e1 and quality score penalty factor λ q1 ; When the element in the first recognition error rate vector is greater than T e1 , set the recognition error rate penalty factor λ e1 , obtain the first optimized recognition error rate vector; when the element in the first image score vector is less than T q1 , set the quality score penalty factor λ q1 , obtain the first optimized image score vector;
[0121] S40. Obtaining a first defect score vector by weighting the first optimized recognition error rate vector and the first optimized image score vector;
[0122] S50. Obtain a first defect score by summing and averaging the elements in the first defect score vector.
[0123] As an embodiment of the present invention, refer to Figure 1 S3 in the embodiment, S3 is applied to a second defect module of a defect prediction system of a software, the second defect module is used to score the quality of the images in the second image set in different environments, obtain the second image scores in different environments and sort them, and generate a second image score vector; perform multiple recognition on the second image set by intelligent image recognition service software to obtain a second image recognition defect vector; comprehensively analyze the second image recognition defect vector and the second image score vector to obtain the second defect score of the image in different environments;
[0124] Furthermore, the specific calculation formula of the second image score is:
[0125]
[0126] Wherein, S2 is the second image score, f() is the second image scoring function, L is the lighting condition score, B is the background interference score, O is the occlusion score, b is the image brightness, Ib is the brightness value under ideal lighting, Bc is the background complexity of the image, and Or is the proportion of occluded objects in the image;
[0127] Image brightness is measured using the average brightness and standard deviation of the image; the background complexity of the image is measured using image processing algorithms (such as image segmentation); and the proportion of occluded objects in the image is calculated using an occlusion detection algorithm.
[0128] Furthermore, the generation process of the second image recognition defect vector is: the images in the second image set are recognized and averaged multiple times by intelligent image recognition service software to obtain a second recognition error rate of the image; and the second image recognition defect vector is obtained based on the second recognition error rate.
[0129] The second defect score acquisition process, see Figure 3 :
[0130] S100. Obtaining a second recognition error rate through the process of acquiring the second image recognition defect vector;
[0131] S200. Obtain a second recognition error rate vector by acquiring a second recognition error rate of an image in a second image set; and obtain a second recognition error rate vector greater than a recognition error threshold T according to the second recognition error rate vector and the second image scoring vector. e2 The corresponding image scoring threshold T q2 ;
[0132] S300. Determine whether the elements in the second recognition error rate vector and the second image score vector need to be set with the second error rate penalty factor λ e2 and the second quality score penalty factor λ q2 ; When the element in the second recognition error rate vector is greater than T e2 , set the recognition error rate penalty factor λ e2 , obtain the second optimized recognition error rate vector; when the element in the second image score vector is less than T q2 , set the quality score penalty factor λ q2 , obtain the second optimized image score vector;
[0133] The calculation process of the recognition error rate penalty factor is:
[0134]
[0135] Among them, E2 is the second recognition error rate, β2 is the strength of adjusting the second error rate penalty factor, usually with a value in [1, 3]. When E2≤T e2 , β1=1.
[0136] The calculation process of the second quality score penalty factor is:
[0137]
[0138] Where q2 is the second image score, γ2 is the strength of the penalty factor for adjusting the quality score, and its value is usually in [1, 3]. When q2 ≥ T q2 , γ2=1.
[0139] S400. Obtain a second defect scoring vector by weighting the second optimized recognition error rate vector and the second optimized image scoring vector;
[0140] S500. Obtain a second defect score by summing and averaging the elements in the second defect score vector.
[0141] As an embodiment of the present invention, refer to Figure 1 S4 in which S4 is applied to a defect synthesis module of a defect prediction system of a software, and the defect synthesis module is used to obtain an object defect score of an intelligent image recognition service software by synthesizing a first defect score and a second defect score;
[0142] As an embodiment of the present invention, refer to Figure 1 S50 in the embodiment is applied to a defect prediction module of a defect prediction system of a software, and the defect prediction module is used to obtain the object defect score of the object, perform average processing, and obtain a defect score threshold; and obtain the defect object of the intelligent image recognition service software according to the defect score threshold.
[0143] Furthermore, the specific calculation process of the object defect score is as follows:
[0144] S E =α1S F +α2S S ;
[0145] Among them, S E is the object defect score, α1 is the first defect score weight, S F is the first defect score, α2 is the second defect score weight, S S Score the second defect. See Table 3 for specific data;
[0146] Table 3 Object defect scoring data table
[0147] First Defect Score Second Defect Score Object defect scoring 0.85 0.72 0.785 0.65 0.60 0.638 0.92 0.80 0.846 0.60 0.45 0.573
[0148] The present invention significantly improves the defect prediction performance of the intelligent image recognition service software through the joint application of data acquisition, the first defect scoring module, the second defect scoring module and the defect synthesis module. In the data acquisition module, the system constructs a diversified image set by acquiring images in different dimensions and different environments. The first defect scoring module performs multi-dimensional quality scoring on the image, combines image recognition error rate analysis, and comprehensively evaluates the defect performance of the image in various dimensions, thereby effectively judging the image quality. The second defect scoring module focuses on the recognition effect of the image under different environmental conditions, taking into account factors such as lighting changes, background complexity and occlusion degree, and improving the accuracy and robustness of recognition. The defect synthesis module provides a comprehensive basis for the defect scoring of the object by integrating the first and second defect scores, and finally predicts objects that may have defects through the scoring threshold in the defect prediction module.
[0149] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A software defect prediction method, characterized in that: The defect prediction process of the intelligent image recognition service software includes: Acquire all objects recorded in the intelligent image recognition service software; select a first object from the objects, acquire images of the first object in different dimensions to form a first image set; acquire images of the first object in different environments to form a second image set; Performing quality scores on the images in the first image set in different dimensions, obtaining first image scores in different dimensions and sorting them, and generating first image score vectors; performing multiple recognitions on the first image set by intelligent image recognition service software, and obtaining first image recognition defect vectors; and comprehensively analyzing the first image recognition defect vectors and the first image score vectors, and obtaining first defect scores of the images in different dimensions; Performing quality scoring on the images in the second image set in different environments, obtaining and sorting the second image scores in different environments, and generating a second image scoring vector; performing multiple recognition on the second image set by intelligent image recognition service software, and obtaining a second image recognition defect vector; and comprehensively analyzing the second image recognition defect vector and the second image scoring vector, and obtaining the second defect scores of the images in different environments; Obtaining an object defect score of the intelligent image recognition service software by combining the first defect score and the second defect score; The object defect score of the object is obtained and averaged to obtain a defect score threshold; and the intelligent image recognition service software defect object is obtained according to the defect score threshold.
2. A method for predicting software defects according to claim 1, characterized in that: The different dimensions include image resolution, image size, noise and image clarity; the different environments include background interference, lighting conditions and occlusion.
3. The method for predicting software defects according to claim 1, characterized in that: The specific calculation formula of the first image score is: Among them, S1 is the first image score, ω1 is the image resolution weight, P actual is the actual number of pixels in the image, P ideal is the ideal number of pixels in the image, ω2 is the image size weight, A actual is the actual area of the image, A ideal is the area of the desired image, ω3 is the image noise weight, NL is the image noise level, ω4 is the image clarity weight, and BM is the image blur level; The image noise level is obtained through image processing algorithms; the image blurriness is based on a measure of blurriness.
4. The method for predicting software defects according to claim 1, characterized in that: The generation process of the first image recognition defect vector is as follows: the images in the first image set are recognized multiple times by the intelligent image recognition service software and averaged to obtain a first recognition error rate of the image; based on the first recognition error rate, a first image recognition defect vector is obtained; wherein the first recognition error rate is the ratio of the number of false recognitions and the number of missed recognitions to the total number of recognitions; The generation process of the second image recognition defect vector is: the images in the second image set are recognized and averaged multiple times by intelligent image recognition service software to obtain a second recognition error rate of the image; and the second image recognition defect vector is obtained based on the second recognition error rate.
5. The method for predicting software defects according to claim 1, characterized in that: The first defect score acquisition process: S10. Obtaining a first recognition error rate through the process of acquiring the first image recognition defect vector; S20. Obtain a first recognition error rate vector by obtaining a first recognition error rate of an image in the first image set; obtain a first recognition error rate vector greater than a recognition error threshold T according to the first recognition error rate vector and the first image scoring vector. e1 The corresponding image scoring threshold T q1 ; S30. Determine whether the elements in the first recognition error rate vector and the first image score vector need to set the recognition error rate penalty factor λ e1 and quality score penalty factor λ q1 ; When the element in the first recognition error rate vector is greater than T e1 , set the recognition error rate penalty factor λ e1 , obtain the first optimized recognition error rate vector; when the element in the first image score vector is less than T q1 , set the quality score penalty factor λ q1 , obtain the first optimized image score vector; S40. Obtaining a first defect score vector by weighting the first optimized recognition error rate vector and the first optimized image score vector; S50. Obtain a first defect score by summing and averaging the elements in the first defect score vector.
6. A method for predicting software defects according to claim 1, characterized in that: The specific calculation formula of the second image score is: Wherein, S2 is the second image score, f() is the second image scoring function, L is the lighting condition score, B is the background interference score, O is the occlusion score, b is the image brightness, Ib is the brightness value under ideal lighting, Bc is the background complexity of the image, and Or is the proportion of occluded objects in the image; Image brightness is measured using the average brightness and standard deviation of the image; the background complexity of the image is measured using an image processing algorithm; and the proportion of occluded objects in the image is calculated using an occlusion detection algorithm.
7. A method for predicting software defects according to claim 1, characterized in that: The specific calculation process of the object defect score is as follows: S E =α1S F +α2S S ; Among them, S E is the object defect score, α1 is the first defect score weight, S F is the first defect score, α2 is the second defect score weight, S S Score the second defect.
8. A software defect prediction system, characterized in that: The defect prediction process of the intelligent image recognition service software includes: The data acquisition module acquires all objects recorded in the intelligent image recognition service software; selects a first object from the objects, acquires images of the first object in different dimensions to form a first image set; acquires images of the first object in different environments to form a second image set; A first defect module is configured to score the quality of the images in the first image set in different dimensions, obtain first image scores in different dimensions and sort them, and generate a first image score vector; perform multiple recognitions on the first image set through intelligent image recognition service software to obtain a first image recognition defect vector; and comprehensively analyze the first image recognition defect vector and the first image score vector to obtain a first defect score of the image in different dimensions; The second defect module is configured to score the quality of the images in the second image set in different environments, obtain the second image scores in different environments and sort them, and generate a second image score vector; perform multiple recognition on the second image set through intelligent image recognition service software to obtain a second image recognition defect vector; and comprehensively analyze the second image recognition defect vector and the second image score vector to obtain the second defect scores of the images in different environments; A defect synthesis module, which obtains an object defect score of the intelligent image recognition service software by synthesizing the first defect score and the second defect score; The defect prediction module obtains the object defect score of the object and performs average processing to obtain a defect score threshold; and obtains the intelligent image recognition service software defect object according to the defect score threshold.
9. A software defect prediction system according to claim 8, characterized in that: The specific calculation formula of the first image score is: Among them, S1 is the first image score, ω1 is the image resolution weight, P actual is the actual number of pixels in the image, P ideal is the ideal number of pixels in the image, ω2 is the image size weight, A actual is the actual area of the image, A ideal is the area of the desired image, ω3 is the image noise weight, NL is the image noise level, ω4 is the image clarity weight, and BM is the image blur level.
10. A software defect prediction system according to claim 8, characterized in that: The specific calculation formula of the second image score is: Among them, S2 is the second image score, f() is the second image scoring function, L is the lighting condition score, B is the background interference score, O is the occlusion score, b is the image brightness, Ib is the brightness value under ideal lighting, Bc is the background complexity of the image, and Or is the proportion of occluded objects in the image.