Method, Distributed Processing Platform, Device, and Storage Medium for Identifying Production Defects
The distributed processing platform optimizes image models by reallocating resources to address the issue of mechanical defects in production processes, enhancing defect recognition efficiency and reducing missed detections.
Patent Information
- Application Number
- CN202211190868.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-09-28
AI Technical Summary
In the mechanical production process, it is difficult for the prior art to effectively identify all defect types, resulting in frequent mechanical missed detection, and the retraining efficiency of image models is low, extending the feedback cycle of defect recognition failure.
The distributed processing platform obtains production images of defect recognition failures in real time, uses the historical model parameter set for optimization, combines resource recycling and tuning processing, and improves the recognition efficiency of the image model.
It realizes timely identification of defects during the production process, reduces the probability of mechanical missed inspection, and improves the feedback efficiency of defect identification.
Smart Images

Figure CN115526859B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of machining production, and particularly relates to a method for identifying production defects, a distributed processing platform, a device, and a storage medium. Background Art
[0002] During the mechanical production and processing process, product defects are usually detected by taking pictures of the products. In related technologies, an image model is usually trained offline and then put into production for defect detection. The recognition effect of the image model depends on the amount of training samples and the types of defects covered during training. In practical applications, it is difficult to use all types of defects in production for training the image model. Therefore, during the production process, when detecting product defects, there are situations where defects cannot be recognized, resulting in mechanical undetected products. Therefore, there is an urgent need for a method that can respond and process in a timely manner when the defect recognition in the production process fails, so as to reduce the probability of mechanical undetected products. Summary of the Invention
[0003] The main purpose of the embodiments of this application is to propose a method for identifying production defects, a distributed processing platform, a device, and a storage medium, aiming to reduce the probability of mechanical undetected products during the production process of products.
[0004] A method for identifying production defects proposed according to the first aspect of the embodiments of this application is applied to a distributed processing platform. The method includes:
[0005] Obtain the classification data of the production image in which the defect recognition fails in the current defect detection;
[0006] Match the classification data with a historical training model set to obtain a historical model parameter set;
[0007] For each historical model parameter in the historical model parameter set, when there is no corresponding idle first training container in the preset distributed training resource pool, store the historical model parameter in a preset resource queue and perform resource recovery processing on the distributed training resource pool according to the resource queue;
[0008] After the resource recovery processing, extract the historical model parameter from the resource queue and determine a second training container corresponding to the historical model parameter in the distributed training resource pool;
[0009] Optimize the first image model corresponding to the historical model parameter through the second training container to obtain a second image model;
[0010] Obtain the recognition result of the production image according to the production image and the second image model.
[0011] Second aspect, an embodiment of the present application provides a distributed processing platform, which applies the method for identifying production defects described in any one of the first aspect.
[0012] Third aspect, an embodiment of the present application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the method for identifying production defects described in any one of the first aspect.
[0013] Fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the method for identifying production defects described in any one of the first aspect.
[0014] The present application provides a method, a distributed processing platform, a device, and a storage medium for identifying production defects. By real-time sending the production images with failed defect identification in the current defect detection to the distributed processing platform, the distributed processing platform determines the associated historical model parameter set according to the classification data of the production images, and then can optimize the first image model corresponding to the historical model parameter set until it correctly identifies whether there are defects in the production images. Since the distributed training resource pool and the resource recycling process are adopted, the optimization of the first image model can be processed in a timely manner, improving the feedback efficiency of the recognition result of the production images. Therefore, during the production process, the recognition result of the production images with failed defect identification can be obtained in a timely manner, thereby reducing the probability of mechanical undetected defects of the products. Therefore, the method, the distributed processing platform, the device, and the storage medium for identifying production defects in the embodiments of the present application can reduce the probability of mechanical undetected defects of the products during the production process. Description of the Drawings
[0015] Figure 1 is a schematic flowchart of the method for identifying production defects provided by an embodiment of the present application;
[0016] Figure 2 is a schematic flowchart of the image quality classification data in the method for identifying production defects provided by an embodiment of the present application;
[0017] Figure 3 is a schematic flowchart of a specific embodiment to which the method for identifying production defects provided by an embodiment of the present application is applied;
[0018] Figure 4 is a schematic block diagram of the module structure of the distributed processing platform provided by an embodiment of the present application;
[0019] Figure 5 is a schematic hardware structure diagram of the device corresponding to the method for identifying production defects provided by an embodiment of the present application. Detailed Embodiments
[0020] In order to make the objectives, technical solutions, and advantages of this application more clear and understandable, the following further details this application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.
[0021] It should be noted that unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0022] During the mechanical production and processing process, product defect detection is usually performed by taking pictures of products. In related technologies, an image model is usually trained offline and then put into production for defect detection. The recognition effect of the image model depends on the training sample size and the defect types covered during training. In practical applications, it is difficult to use all defect types in production for the training of the image model. Therefore, during the production process, when defect detection is performed on products, there are situations where defects cannot be recognized. Although the image model can be retrained to improve the recognition effect, the current training efficiency of the image model is low, resulting in a long cycle for it to be reapplied to the production line. Therefore, during the actual production process of products, there are situations of mechanical missed inspections. Therefore, there is an urgent need for a method that can respond and process in a timely manner when defect recognition fails during the production process to reduce the probability of mechanical missed inspections of products. Based on this, the embodiments of this application propose a method, a distributed processing platform, a device, and a storage medium for production defect recognition, aiming to reduce the probability of mechanical missed inspections of products during the production process.
[0023] In the first aspect, as shown in Figure 1 the production defect recognition method proposed by the embodiments of this application is applied to a distributed processing platform and includes:
[0024] Step S100: Obtain classification data of production images with failed defect recognition in the current defect detection.
[0025] It should be noted that a failed defect recognition means that it is impossible to determine whether there are defects in the production image, and further, it is impossible to recognize the specific defect category. For example, if the probabilities of normal products obtained after a failed defect detection and the probabilities of various defined defects do not meet the set probability range, it means a failed defect recognition. The classification data includes product attribute classification and image quality classification. By classifying and training different products and different image qualities, more refined optimization of defects can be achieved, and the time required for tuning is shorter, shortening the feedback time of the recognition effect of production images with failed defect recognition, so as to reduce the probability of mechanical missed inspections of products during the production process.
[0026] Step S200: Match the classification data with the historical training model set to obtain a historical model parameter set.
[0027] It should be noted that through the matching, the historical first image model related to the production images with failed defect recognition can be screened out, reducing the number of image models for optimization processing. The historical model parameter set represents a set of basic attributes of the image models to be optimized, and the basic attributes include model parameters, model identifiers, etc.
[0028] Step S300: For each historical model parameter in the historical model parameter set, when there is no corresponding idle first training container in the preset distributed training resource pool, deposit the historical model parameter into the preset resource queue and perform resource recovery processing on the distributed training resource pool according to the resource queue.
[0029] It should be noted that an idle first training container means that it cannot be used for the training of the first image model corresponding to the historical model parameter. The first training container can be a container with a training task or a container without a training task.
[0030] It should be noted that the resource recovery processing is to release some resources (such as unused or infrequently used) in the distributed training resource pool. At this time, the distributed training resource pool can re-integrate the resources to timely provide resources for the training of the image model corresponding to the historical model parameter in the resource queue, so that the first image model corresponding to the historical model parameter can be optimized and trained in time, shortening the feedback time of the recognition effect, and thus reducing the probability of product missed inspection.
[0031] It should be noted that the container is a virtual resource, which is obtained by logically partitioning the hardware resources (such as CPU and memory) in the distributed training resource pool. The distributed training resource pool is obtained by distributed deployment of multiple servers. The deployment method is not limited in the embodiments of the present application.
[0032] Step S400: After the resource recovery processing, extract the historical model parameter from the resource queue and determine the second training container corresponding to the historical model parameter in the distributed training resource pool.
[0033] It should be noted that the second training container can reuse the existing container or be newly created. It is specifically determined according to the status and hardware parameters of each training container in the distributed training resource pool. For example, if there is a training container in the distributed training resource pool without a training task and can be used by the image model corresponding to the historical model parameter in the resource queue, it can be directly reused. Or if all the existing training containers have training tasks, but there are still resources in the distributed training resource pool that can be partitioned into containers, then a new one needs to be created. The new creation can be directly created based on the requirements of the historical model parameter for the hardware or copied directly based on the existing training containers.
[0034] It should be noted that for each set of historical model parameters, at least one resource recovery process can be performed until all the first image models corresponding to the historical model parameters in the set of historical model parameters are deployed in the training container for training.
[0035] Step S500: Optimize the first image model corresponding to the historical model parameters through the second training container to obtain a second image model.
[0036] Step S600: Obtain the recognition result of the production image according to the production image and the second image model.
[0037] Therefore, by sending the production images with failed defect recognition in the current defect detection to the distributed processing platform in real time, the distributed processing platform determines the associated set of historical model parameters according to the classification data of the production images, and then can optimize the first image model corresponding to the set of historical model parameters until it correctly identifies whether there are defects in the production images. Since the distributed training resource pool and the resource recovery process are adopted, the optimization of the first image model can be processed in a timely manner, improving the feedback efficiency of the recognition result of the production images. Therefore, during the production process, the recognition results of the production images with failed defect recognition can be obtained in a timely manner, thereby reducing the probability of mechanical undetected defects of the products. Therefore, the method, distributed processing platform, device and storage medium for production defect recognition in the embodiments of the present application can reduce the probability of mechanical undetected defects of the products during the production process.
[0038] It can be understood that step S100: Obtain the classification data of the production images with failed defect recognition in the current defect detection, including: in the current defect detection, obtain the production images with failed defect recognition; perform target area annotation on the production images to obtain multiple target areas; classify each target area to obtain the corresponding classification data.
[0039] It should be noted that the target area annotation can be automatically performed according to the existing target area division of the product. By classifying the target areas, the training and optimization of the multi-dimensional image models of the production images can be achieved simultaneously, thereby improving the optimization efficiency.
[0040] It can be understood that with reference to Figure 2 as shown, the classification data includes image quality classification data; classifying each target area to obtain the corresponding classification data includes:
[0041] Step S110: Obtain the brightness data of the target area and the image quality index corresponding to the image quality classification data.
[0042] It should be noted that the image quality index is a standard for measuring image quality, such as saturation, integrity, contrast, etc. Those skilled in the art can set one or more according to actual production needs.
[0043] It should be noted that the brightness data represents the brightness of the picture.
[0044] Step S120: Determine the quality data of the target area according to the image quality index.
[0045] Exemplarily, if the image quality index is saturation, the quality data represents the saturation value of the target area.
[0046] Step S130: Perform vector addition on the brightness data and the quality data to obtain the quality summary data.
[0047] Step S140: Compare the quality summary data with the image threshold range corresponding to the image quality index to obtain the image quality classification data.
[0048] Exemplarily, assume the image threshold ranges are [0,20], (21,40], (41,60], (61,80], (81,100]; the quality data is x, and the brightness data is y. When x + y = 64, it means the quality summary data is within the image threshold range of (61,80]. At this time, it is necessary to find the image model corresponding to the image threshold range of (61,80] in the historical model set and obtain the corresponding historical model parameters. When there is no first training container corresponding to the historical model parameters, store the corresponding historical model parameters in the resource queue for execution.
[0049] It can be understood that the classification data includes attribute classification data; classifying each target area to obtain the corresponding classification data further includes: extracting feature data from the target area; performing clustering analysis according to the feature data to obtain the attribute classification data, and the attribute classification data includes at least one of product type, model, and detection feature.
[0050] It should be noted that feature extraction can be performed using existing neural networks, and the embodiments of the present application will not elaborate too much on this.
[0051] It should be noted that by setting the attribute classification data, it is possible to achieve classification training for a single product and a single feature, which corresponds to one type of product for one production line in the actual production process, and the recognition success rate is higher.
[0052] It is understandable that the resource recovery process for the distributed training resource pool according to the resource queue in step S400 includes: obtaining the model training resource utilization rate of the image quality classification data corresponding to each historical model parameter in the resource queue; when there is a third training container corresponding to the historical model parameter in the distributed training resource pool, determining whether the model training resource utilization rate corresponding to the historical model parameter is greater than the first preset utilization rate value; when the model training resource utilization rate corresponding to the historical model parameter is less than the first preset utilization rate value, destroying the corresponding third training container.
[0053] Exemplarily, for products A and B, there are respectively image models A and B corresponding to the image threshold ranges located in (61, 80]. When the historical model parameters of the first image model corresponding to the image threshold range in (61, 80] in product A are put into the resource queue, when there is a training container in the distributed training resource pool that has trained image models A and B with the image threshold range of (61, 80] within the historical time period, the total number of training times of this training container will be counted within the historical time period, and this total number of training times will be used as the model training resource utilization rate of the image quality classification data corresponding to the historical model parameter A.
[0054] It is understandable that determining the second training container corresponding to the historical model parameter in the distributed training resource pool in step S400 includes: when the model training resource utilization rate corresponding to the historical model parameter is greater than the second preset utilization rate value and there is a corresponding third training container, determining whether the corresponding third training container is idle; when the third training container corresponding to the first historical model is in an idle state, using the corresponding third training container as the second training container; when the third training container corresponding to the first historical model is in a non-idle state, copying the third training container to obtain the second training container.
[0055] It should be noted that when there are multiple model training resource utilization rates corresponding to the third training containers that are all greater than the second preset utilization rate value, it will be determined one by one whether the third training containers are in an idle state. Only when there is no idle third training container in the distributed training resource pool as the model training resource corresponding to the historical model parameter, will copying be performed.
[0056] It is understandable that determining the second training container corresponding to the historical model parameter in the distributed training resource pool in step S400 further includes:
[0057] When the model training resource utilization rate corresponding to the historical model parameter is less than the first preset utilization rate value, recreate the second training container in the distributed training resource pool.
[0058] By recreating it so that it does not occupy other training containers with high usage frequencies, the probability that the training containers with high usage frequencies are in an idle state can be made higher, thereby further improving the efficiency of optimizing the entire model, and further shortening the feedback duration of the recognition results corresponding to the production images with failed defect recognition in the production line.
[0059] It can be understood that the historical model parameters include a model identifier and model parameters; step S500 optimizes the first image model corresponding to the historical model parameters through a second training container to obtain a second image model, including: loading the first image model into the second training container according to the model identifier; tuning the model parameters according to preset model adjustment parameters; retraining the first image model according to the tuned model parameters to obtain a second image model.
[0060] When the tuning fails this time, the model adjustment parameters will change correspondingly during the next tuning.
[0061] It should be noted that for the optimization of each first image model, the same model adjustment parameters can be used, and multiple tuning algorithms can be used for tuning, and the one with the best tuning effect is used as the corresponding second image model.
[0062] It should be noted that retraining means inputting the training sample set into the first image model, and judging whether to adjust the model parameters of the current first model according to the output result of the first image model until the output result of the first image model matches the expected result.
[0063] It can be understood that step S600, obtaining the recognition result of the production image according to the production image and the second image model, includes: inputting the production image into each second image model respectively; determining the recognition result according to the output result of each second image model.
[0064] It should be noted that when there is a second image model that can correctly recognize whether there are defects in the production image or the specific defect type, the recognition effect can be fed back, otherwise the first image model needs to be optimized again.
[0065] It should be noted that in some embodiments, before inputting the production image into the second image model, the production image can be subjected to image augmentation processing, such as color augmentation, image flipping, or brightness augmentation, etc., to improve the recognition accuracy.
[0066] Exemplarily, the above method for recognizing production defects in the present application is described below with a specific embodiment:
[0067] Refer to Figure 3As shown in the figure, the entire system applying the above method is divided into three segments, namely an image recognition module, a queue optimization module, and an image training platform. The processing flow of the image recognition module is as follows: Take a photo to obtain a production image -> Perform defect recognition on the production image -> Determine whether the production image can identify good products and non-good products -> Unable to identify: Upload the production image -> Able to identify: Continue production. The processing in the queue optimization module is as follows: Perform target area annotation on the uploaded production image -> Classify the target area to obtain classification data -> Match the classification data with the historical model set to obtain a set of historical model parameters corresponding to multiple image models -> Input the set of historical model parameters into resource monitoring to monitor and manage the model training resources required for each historical model parameter in the historical model parameters -> When there is no idle first training container corresponding to the historical model parameter in the distributed training resource pool, input the historical model parameter into the resource queue -> Perform resource replication and resource scaling processing on the resource queue -> Determine the second training container -> Perform model optimization and correction according to the model adjustment parameters -> The corrected second image model identifies the production image. When the identification is successful, synchronize the identification result to the production line. When there is no second image model with successful identification, re-determine the model adjustment parameters to perform the next round of optimization processing on the first image model.
[0068] It can be understood that, referring to Figure 4 As shown in the figure, an embodiment of the present application also proposes a distributed processing platform that applies the above method for production defect recognition. The distributed processing platform includes:
[0069] A preprocessing module 100, configured to obtain classification data of a production image that fails in defect recognition in the current defect detection;
[0070] A matching module 200, configured to match the classification data with a set of historical training models to obtain a set of historical model parameters;
[0071] A resource recovery processing module 300, configured to, for each historical model parameter in the set of historical model parameters, when there is no corresponding idle first training container in the preset distributed training resource pool, store the historical model parameter in the preset resource queue and perform resource recovery processing on the distributed training resource pool according to the resource queue;
[0072] A resource determination module 400, configured to, after the resource recovery processing, sequentially extract the historical model parameters from the resource queue and determine a second training container corresponding to the historical model parameter in the distributed training resource pool;
[0073] An optimization module 500, configured to optimize the first image model corresponding to the historical model parameter through the second training container to obtain a second image model;
[0074] A feedback module 600, configured to obtain an identification result of the production image according to the production image and the second image model.
[0075] It should be noted that the above modules can be processed by distributed tasks, thereby improving efficiency.
[0076] It can be understood that according to the electronic device provided in the third aspect embodiment of the present application, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the above method for identifying production defects is implemented.
[0077] The electronic device can be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.
[0078] Please refer to Figure 5 , Figure 5 which illustrates the hardware structure of an electronic device in another embodiment. The electronic device includes:
[0079] A processor 701, which can be implemented by using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0080] A memory 702, which can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 702 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of the present specification through software or firmware, the relevant program codes are stored in the memory 702, and the processor 701 is called to execute the method for identifying production defects in the embodiments of the present application;
[0081] An input / output interface 703, configured to implement information input and output;
[0082] A communication interface 704, configured to implement communication interaction between this device and other devices, and can implement communication through a wired manner (such as USB, network cable, etc.) or through a wireless manner (such as mobile network, WIFI, Bluetooth, etc.); and,
[0083] A bus 705, which transmits information between various components of the device (such as the processor 701, the memory 702, the input / output interface 703, and the communication interface 704);
[0084] Among them, the processor 701, the memory 702, the input / output interface 703, and the communication interface 704 are communicatively connected to each other inside the device through the bus 705.
[0085] It can be understood that according to a computer-readable storage medium provided by an embodiment of the present application, the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for identifying production defects is implemented.
[0086] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include memories remotely disposed relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0087] The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art will know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
[0088] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0089] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, and appropriate combinations thereof.
[0090] In the description of the present application and the above-mentioned drawings, the terms "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0091] It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that three relationships can exist. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally means that the associated objects before and after are in an "or" relationship. "At least one (one) of the following" or its similar expression means any combination of these items, including any combination of single items (ones) or plural items (ones). For example, at least one (one) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0092] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the above-mentioned division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.
[0093] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0094] In addition, in each embodiment of the present application, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0095] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of the present application. The foregoing storage medium includes: various media that can store programs such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0096] The preferred embodiments of the embodiments of the present application have been described above with reference to the accompanying drawings, and thus do not limit the scope of the rights of the embodiments of the present application. Any modifications, equivalent replacements, and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the rights of the embodiments of the present application.
Claims
1. A method for identifying production defects, characterized in that, Applied to a distributed processing platform, the method includes: Obtaining classification data of production images that failed in defect recognition during current defect detection; Matching the classification data with a historical training model set to obtain a historical model parameter set; For each historical model parameter in the historical model parameter set, when there is no corresponding idle first training container in the preset distributed training resource pool, storing the historical model parameter in a preset resource queue and performing resource recovery processing on the distributed training resource pool according to the resource queue; After the resource recovery processing, extracting the historical model parameter from the resource queue and determining a second training container corresponding to the historical model parameter in the distributed training resource pool; Optimizing the first image model corresponding to the historical model parameter through the second training container to obtain a second image model; Obtaining an identification result of the production image according to the production image and the second image model; Wherein, the classification data includes image quality classification data; the resource recovery processing is to destroy the third training container when there is a third training container corresponding to the historical model parameter in the resource queue in the distributed training resource pool and the model training resource utilization rate of the image quality classification data corresponding to the historical model parameter is less than a first preset utilization rate value; Wherein, when the model training resource utilization rate corresponding to the historical model parameter is greater than a second preset utilization rate value and there is a corresponding third training container, the second training container is the idle third training container or a replicated non-idle third training container.
2. The method for identifying production defects according to claim 1, characterized in that The obtaining of the classification data of the production images that failed in defect recognition during current defect detection includes: During current defect detection, obtaining production images that failed in defect recognition; Performing target area annotation on the production images to obtain a plurality of target areas; Classifying each of the target areas to obtain corresponding classification data.
3. The method for identifying production defects according to claim 2, wherein, The classification data includes image quality classification data; the classifying each of the target areas to obtain corresponding classification data includes: Obtaining the brightness data of the target area and an image quality index corresponding to the image quality classification data; Determining the quality data of the target area according to the image quality index; Performing vector addition on the brightness data and the quality data to obtain quality summary data; Comparing the quality summary data with an image threshold range corresponding to the image quality index to obtain the image quality classification data.
4. The method for identifying production defects according to claim 2, characterized in that, The classification data includes attribute classification data; the classifying each of the target areas to obtain corresponding classification data further includes: Performing feature extraction on the target area to obtain feature data; Performing clustering analysis according to the feature data to obtain the attribute classification data, and the attribute classification data includes at least one of product type, model, and detection feature.
5. The method for identifying production defects according to claim 1, wherein The performing of resource recovery processing on the distributed training resource pool according to the resource queue includes: Obtain the model training resource utilization rate corresponding to each historical model parameter in the resource queue for the image quality classification data; When there is a third training container corresponding to the historical model parameter in the distributed training resource pool, determine whether the model training resource utilization rate corresponding to the historical model parameter is greater than a first preset utilization rate value; When the model training resource utilization rate corresponding to the historical model parameter is less than the first preset utilization rate value, destroy the corresponding third training container.
6. The method for identifying production defects according to claim 5, wherein The determining the second training container corresponding to the historical model parameter in the distributed training resource pool includes: When the model training resource utilization rate corresponding to the historical model parameter is greater than a second preset utilization rate value and there is a corresponding third training container, determine whether the corresponding third training container is idle; When the third training container corresponding to the historical model parameter is in an idle state, use the corresponding third training container as the second training container; When the third training container corresponding to the historical model parameter is in a non-idle state, copy the third training container to obtain the second training container.
7. The method for identifying production defects according to claim 5, characterized in that, The determining the second training container corresponding to the historical model parameter in the distributed training resource pool includes: When the model training resource utilization rate corresponding to the historical model parameter is less than the first preset utilization rate value, recreate a second training container in the distributed training resource pool.
8. The method for identifying production defects according to claim 1, wherein, The historical model parameter includes a model identifier and model parameters; the optimizing the first image model corresponding to the historical model parameter through the second training container to obtain a second image model includes: According to the model identifier, load the first image model into the second training container; Optimize the model parameters according to preset model adjustment parameters; According to the optimized model parameters, retrain the first image model to obtain the second image model.
9. The method for identifying production defects according to claim 1, wherein The obtaining the recognition result of the production image according to the production image and the second image model includes: Input the production image into each second image model respectively; Determine the recognition result according to the output result of each second image model.
10. A distributed processing platform, characterized in that, The distributed processing platform applies the method for production defect recognition according to any one of claims 1 to 9.
11. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the method for production defect recognition according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the method for production defect recognition according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Image data processing method and device, computer equipment and storage medium
CN112506637A
Model installation method and device, electronic equipment, storage medium and product
CN114662591A