Method and system for inspecting surface quality of aluminum profile
By constructing a list of YOLO defect recognition models for aluminum profile surface quality inspection lines and rationally allocating inspection tasks, the problem of uneven detection accuracy and speed in aluminum profile surface quality inspection was solved, achieving efficient and accurate inspection results.
Patent Information
- Application Number
- CN202511021154.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-07-24
AI Technical Summary
Existing methods for inspecting the surface quality of aluminum profiles suffer from several problems when dealing with the demands of high-precision products in industrial mass production. These problems include the accuracy of inspections being affected by the external environment, uneven inspection speeds, difficulties in managing task deadlines, and a contradiction between speed adaptability and accuracy.
Construct a list of YOLO defect identification models for each surface quality inspection line. Based on the product association information of aluminum profiles and the operation and occupancy information of the inspection lines, rationally allocate the surface quality inspection tasks of aluminum profiles and use the YOLO defect identification models for inspection.
It improves the accuracy and efficiency of aluminum profile surface quality inspection, balances the contradiction between inspection speed adaptability and defect inspection accuracy, and reduces the difficulty of task deadline management.
Smart Images

Figure CN120525883B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of aluminum profile surface defect detection, and in particular to an aluminum profile surface quality inspection method and system. BACKGROUND
[0002] Aluminum profile surface quality inspection refers to the process of detecting and evaluating various defects on the surface of aluminum profiles during production to ensure that the aluminum profile products meet quality standards. Common surface defects include scratches, dents, cracks, spots, bubbles, and stains. Traditional aluminum profile surface quality inspection methods include manual visual inspection and mechanical probe contact detection. Manual visual inspection has the problems of low efficiency, strong subjectivity, and high cost. Mechanical probe contact detection has the problem of easily scratching the surface of aluminum profile products. Therefore, the existing aluminum profile surface quality inspection method is not ideal for the actual application of industrial batch production of high-precision aluminum profile products.
[0003] The popularization of machine vision detection technology has greatly improved the inspection efficiency and accuracy of aluminum profile surface quality inspection, but there are still limitations in some scenarios: (1) The detection accuracy of machine vision detection technology is affected by external environment. Strong light, reflection or low illumination areas at different positions in the factory building may cause image overexposure, underexposure or increased noise, affecting detection accuracy; (2) The detection efficiency of machine vision detection technology is affected by its own hardware. Different aluminum profile surface quality inspection equipment on different surface quality inspection lines may have different image acquisition frequencies and image processing speeds, resulting in differences in inspection speed range of different surface quality inspection lines, increasing the difficulty of task deadline management of surface quality inspection; (3) Since the defects on the surface of aluminum profiles have different image characteristics at different moving speeds, the defect recognition model used by machine vision detection technology needs to consider different inspection speeds used by the surface quality inspection line. There is a contradiction between the adaptability of the defect recognition model trained at a large speed interval and the high accuracy of defect recognition of the defect recognition model trained at a small speed interval, i.e. the balance between high speed adaptability of the defect recognition model trained at a large speed interval and high accuracy of defect recognition of the defect recognition model trained at a small speed interval.
[0004] Therefore, how to improve the inspection accuracy of aluminum profile surface quality inspection under the demand of industrial batch production of high-precision aluminum profile products, reasonably plan the distribution of aluminum profile surface quality inspection tasks among multiple surface quality inspection lines, reduce the difficulty of task deadline management of surface quality inspection, and balance the contradiction between inspection speed adaptability and defect inspection accuracy, is a technical problem that needs to be solved. SUMMARY
[0005] The present application provides an aluminum profile surface quality inspection method and system, which aims to solve at least one of the above technical problems.
[0006] To achieve the above object, the present application provides a surface quality inspection method of aluminum profiles, comprising the following steps:
[0007] Collecting aluminum profile inspection test images of each surface quality inspection line, and constructing a YOLO defect recognition model list of each surface quality inspection line; wherein the YOLO defect recognition model list comprises several YOLO defect recognition models corresponding to different inspection speed sections;
[0008] Obtaining several aluminum profile surface quality inspection tasks within a target inspection period, and extracting aluminum profile product association information and surface quality inspection deadlines in each aluminum profile surface quality inspection task;
[0009] Querying running occupation information of each surface quality inspection line within the target inspection period, and distributing each aluminum profile surface quality inspection task and the corresponding YOLO defect recognition model to each surface quality inspection line according to the aluminum profile product association information and the surface quality inspection deadlines of each aluminum profile surface quality inspection task and the several YOLO defect recognition models of each surface quality inspection line;
[0010] Driving the aluminum profile surface quality inspection equipment of each surface quality inspection line to load the allocated YOLO defect recognition model, and executing the aluminum profile surface quality inspection of the aluminum profile surface quality inspection task allocated within the inspection period corresponding to the YOLO defect recognition model.
[0011] Optionally, the step of collecting aluminum profile inspection test images of each surface quality inspection line and constructing a YOLO defect recognition model list of each surface quality inspection line specifically comprises:
[0012] Performing aluminum profile inspection tests on several surface quality inspection lines using aluminum profile inspection test samples, and obtaining aluminum profile inspection test images collected by each surface quality inspection line;
[0013] Performing manual labeling on the collected aluminum profile inspection test images and constructing a training image sample set, training the YOLO model using the constructed training image sample set, and obtaining several YOLO defect recognition models corresponding to different actual inspection speed ranges for each surface quality inspection line;
[0014] Constructing a YOLO defect recognition model list of each surface quality inspection line, and establishing a storage mapping relationship between the YOLO defect recognition model list and each surface quality inspection line.
[0015] Optionally, the step of performing aluminum profile inspection tests on several surface quality inspection lines using aluminum profile inspection test samples, and obtaining aluminum profile inspection test images collected by each surface quality inspection line specifically comprises:
[0016] Prepare an aluminum profile inspection test sample composed of a plurality of defective aluminum profiles; wherein the plurality of defective aluminum profiles are configured to cover all different categories of defects in all divided areas on the aluminum profile;
[0017] Query the standard inspection speed range of each surface quality inspection line, pre-divide the standard inspection speed range into a plurality of different inspection speed minimum sections, take the middle value of each inspection speed minimum section as the inspection speed feature, and generate an aluminum profile quality inspection speed preset set of each surface quality inspection line based on the inspection speed feature of each inspection speed minimum section;
[0018] According to a plurality of inspection speed features in the aluminum profile quality inspection speed preset set of each surface quality inspection line, perform aluminum profile inspection tests on the plurality of defective aluminum profiles in the aluminum profile inspection test sample, and obtain aluminum profile inspection test images collected by each surface quality inspection line.
[0019] Optionally, artificial labeling is performed on the collected aluminum profile inspection test images, and a training image sample set is constructed, the YOLO model is trained using the constructed training image sample set, and a plurality of YOLO defect recognition models corresponding to different actual inspection speed ranges of each surface quality inspection line are obtained.
[0020] Artificial labeling is performed on the collected aluminum profile inspection test images, a plurality of inspection speed minimum sections of each surface quality inspection line are merged into a plurality of actual inspection speed ranges with equal range lengths according to a preset section merging rule, and a training image sample set of each actual inspection speed range is constructed.
[0021] The training image sample set is divided into training samples and test samples, the YOLO model is trained using the training samples, and a plurality of YOLO defect recognition models corresponding to different actual inspection speed ranges of each surface quality inspection line are obtained.
[0022] The model recognition accuracy of each inspection speed minimum section is tested on the YOLO defect recognition model of the actual inspection speed range using the single aluminum profile inspection test image corresponding to each inspection speed minimum section in the actual inspection speed range in the test sample.
[0023] The model recognition accuracy of each inspection speed minimum section is taken as the model fitness of the YOLO defect recognition model of the actual inspection speed range, and the model fitness of all inspection speed minimum sections is stored in the model fitness list attached to the YOLO defect recognition model.
[0024] Optionally, the preset segment merging rule is configured such that when the first target number of inspection speeds most frequently used in the historical aluminum profile surface quality inspection process fall within the actual inspection speed range after merging, the difference between the middle value of the actual inspection speed range and the middle value is within a preset deviation value range, and the range number of the actual inspection speed range obtained after merging of the plurality of inspection speed minimum segments is the smallest.
[0025] Optionally, the plurality of aluminum profile surface quality inspection tasks in the target inspection period are obtained, and the aluminum profile product association information and the surface quality inspection deadline in each aluminum profile surface quality inspection task are extracted, specifically including:
[0026] The plurality of aluminum profile surface quality inspection tasks in the target inspection period are queried in the aluminum profile preparation plan list; wherein each aluminum profile surface quality inspection task corresponds to the surface quality inspection requirement of part or all of the aluminum profiles in an aluminum profile preparation order;
[0027] The aluminum profile product association information and the surface quality inspection deadline in each aluminum profile surface quality inspection task are extracted; wherein the aluminum profile product association information includes the aluminum profile product quantity and the aluminum profile product type, and the aluminum profile product quantity, the aluminum profile product type and the surface quality inspection deadline are configured to be obtained from the surface quality inspection requirement of the corresponding aluminum profile preparation order.
[0028] Optionally, the running occupation information of each surface quality inspection line in the target inspection period is queried, and each aluminum profile surface quality inspection task and the corresponding YOLO defect recognition model are allocated to each surface quality inspection line according to the aluminum profile product association information and the surface quality inspection deadline of each aluminum profile surface quality inspection task and the plurality of YOLO defect recognition models of each surface quality inspection line, specifically including:
[0029] The running occupation information of each surface quality inspection line in the target inspection period is queried, and the idle period of each surface quality inspection line in the target inspection period in the running occupation information is extracted;
[0030] The aluminum profile product quantity and the aluminum profile product type in the aluminum profile product association information of each aluminum profile surface quality inspection task are extracted, and the surface quality inspection level of each aluminum profile surface quality inspection task is determined based on the aluminum profile product type;
[0031] Each aluminum profile surface quality inspection task and the YOLO defect recognition model corresponding to the actual inspection speed are allocated to each surface quality inspection line according to the aluminum profile product quantity, the surface quality inspection level and the surface quality inspection deadline of each aluminum profile surface quality inspection task.
[0032] Optionally, according to the aluminum profile product quantity, the surface quality inspection grade and the surface quality inspection deadline of each aluminum profile surface quality inspection task, the YOLO defect recognition model corresponding to each aluminum profile surface quality inspection task and the actual inspection speed is allocated to each surface quality inspection line step, specifically including:
[0033] According to the aluminum profile product quantity, the surface quality inspection grade and the surface quality inspection deadline of each aluminum profile surface quality inspection task, considering the idle period of each surface quality inspection line within the target inspection period and the YOLO defect recognition model of each surface quality inspection line;
[0034] When the task execution period of the corresponding surface quality inspection line satisfies the first constraint condition that the actual inspection speed adopted by the task execution period of the surface quality inspection line and the actual aluminum profile inspection quantity determined by the task execution period are greater than the aluminum profile product quantity, and the second constraint condition that the model fitness of the YOLO defect recognition model to which the actual inspection speed adopted by the task execution period of the surface quality inspection line belongs in the YOLO defect recognition model list is not lower than the model fitness requirement corresponding to the surface quality inspection grade of the aluminum profile surface quality inspection task, the sum of the number of times of switching the actual inspection speed of each surface quality inspection line within the target inspection period is minimized as the optimization target;
[0035] The optimization algorithm is used to solve the aluminum profile surface quality inspection task allocated to each surface quality inspection line and the task execution period and the actual inspection speed of each aluminum profile surface quality inspection task, and the YOLO defect recognition model corresponding to each aluminum profile surface quality inspection task and the actual inspection speed is allocated to each surface quality inspection line.
[0036] Optionally, the aluminum profile surface quality inspection equipment of each surface quality inspection line is driven to load the allocated YOLO defect recognition model, and the aluminum profile surface quality inspection step of the aluminum profile surface quality inspection task allocated to the YOLO defect recognition model corresponding to the inspection period is executed, specifically including:
[0037] The aluminum profile surface quality inspection equipment of each surface quality inspection line is driven to load the allocated YOLO defect recognition model before the task execution period of each aluminum profile surface quality inspection task;
[0038] The actual inspection speed corresponding to each aluminum profile surface quality inspection task is controlled to be adopted by each surface quality inspection line in the task execution period of each aluminum profile surface quality inspection task, and the YOLO defect recognition model is used to execute the aluminum profile surface quality inspection of the corresponding aluminum profile surface quality inspection task.
[0039] Furthermore, in order to achieve the above object, the application further provides a surface quality inspection system for aluminum profiles, comprising:
[0040] The acquisition module is configured to acquire aluminum profile inspection test images of each surface quality inspection line and construct a YOLO defect identification model list of each surface quality inspection line.
[0041] The acquisition module is configured to acquire aluminum profile inspection test images of each surface quality inspection line and construct a YOLO defect identification model list of each surface quality inspection line.
[0042] The acquisition module is configured to acquire aluminum profile inspection test images of each surface quality inspection line and construct a YOLO defect identification model list of each surface quality inspection line.
[0043] The acquisition module is configured to acquire aluminum profile inspection test images of each surface quality inspection line and construct a YOLO defect identification model list of each surface quality inspection line.
[0044] The application has the following beneficial effects: a surface quality inspection method and system for aluminum profiles are provided, a plurality of YOLO defect identification models corresponding to different actual inspection speed ranges of each surface quality inspection line are generated through aluminum profile inspection tests, aluminum profile product association information and surface quality inspection deadlines of aluminum profile surface quality inspection tasks are extracted, the running occupancy information of each surface quality inspection line is considered, the aluminum profile surface quality inspection tasks allocated to each surface quality inspection line and the task execution period and actual inspection speed of each aluminum profile surface quality inspection task are solved, each surface quality inspection line is driven to load the allocated YOLO defect identification model and execute the corresponding aluminum profile surface quality inspection task, the allocation of aluminum profile surface quality inspection tasks among multiple surface quality inspection lines is reasonably planned, and the contradiction between inspection speed adaptability and defect inspection accuracy is balanced. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 The figure is a flowchart of the surface quality inspection method for aluminum profiles according to the embodiment of the application.
[0046] Figure 2 The figure is a structural diagram of the surface quality inspection system for aluminum profiles according to the embodiment of the application. DETAILED DESCRIPTION
[0047] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0048] The embodiment of the present application provides a surface quality inspection method of an aluminum profile. Figure 1 , Figure 1 FIG. 1 is a flowchart of a surface quality inspection method of an aluminum profile according to an embodiment of the present application.
[0049] In the embodiment, the surface quality inspection method of the aluminum profile comprises the following steps:
[0050] S100: collecting aluminum profile inspection test images of each surface quality inspection line, and constructing a YOLO defect identification model list of each surface quality inspection line; wherein the YOLO defect identification model list comprises a plurality of YOLO defect identification models corresponding to different inspection speed sections;
[0051] S200: obtaining a plurality of aluminum profile surface quality inspection tasks in a target inspection period, and extracting aluminum profile product association information and a surface quality inspection deadline in each aluminum profile surface quality inspection task;
[0052] S300: querying running occupation information of each surface quality inspection line in the target inspection period, and distributing each aluminum profile surface quality inspection task and a corresponding YOLO defect identification model to each surface quality inspection line according to the aluminum profile product association information and the surface quality inspection deadline of each aluminum profile surface quality inspection task and the plurality of YOLO defect identification models of each surface quality inspection line;
[0053] S400: driving aluminum profile surface quality inspection equipment of each surface quality inspection line to load the allocated YOLO defect identification model, and performing aluminum profile surface quality inspection of the aluminum profile surface quality inspection task allocated in the inspection period corresponding to the YOLO defect identification model.
[0054] It should be noted that the promotion of machine vision detection technology makes the aluminum profile surface quality inspection greatly improved in inspection efficiency and inspection accuracy, but there are still limitations in some scenarios: (1) The detection accuracy of machine vision detection technology is affected by the external environment. The strong light, reflection or low illumination area at different positions in the factory building may cause image overexposure, underexposure or noise increase, affecting the detection accuracy; (2) The detection efficiency of machine vision detection technology is affected by its own hardware. The aluminum profile surface quality inspection equipment of different surface quality inspection lines may have different image acquisition frequencies and image processing speeds, so that the inspection speed range of different surface quality inspection lines has differences, which increases the difficulty of task deadline management of surface quality inspection; (3) Since the defects on the surface of the aluminum profile have different image characteristics at different moving speeds, the defect recognition model used by the machine vision detection technology needs to consider the different inspection speeds used by the performance quality inspection line. There is a contradiction between the adaptability of the defect recognition model trained by a large speed interval range and the high accuracy of defect inspection of the defect recognition model trained by a small speed interval range, that is, the balance between the high adaptability of the defect recognition model trained by a large speed interval range and the high accuracy of defect inspection of the defect recognition model trained by a small speed interval range.
[0055] To solve the above problems, the embodiment generates several YOLO defect recognition models corresponding to different actual inspection speed ranges for each surface quality inspection line through aluminum profile inspection testing, extracts aluminum profile product association information and surface quality inspection deadline of the aluminum profile surface quality inspection task, considers the running occupation information of each surface quality inspection line, solves the aluminum profile surface quality inspection task allocated to each surface quality inspection line and the task execution period and actual inspection speed of each aluminum profile surface quality inspection task, drives each surface quality inspection line to load the allocated YOLO defect recognition model and execute the corresponding aluminum profile surface quality inspection task, reasonably plans the allocation of aluminum profile surface quality inspection tasks among multiple surface quality inspection lines, and balances the contradiction between inspection speed adaptability and defect inspection accuracy.
[0056] In a preferred embodiment, the aluminum profile inspection test images of each surface quality inspection line are collected, and the YOLO defect recognition model list step of each surface quality inspection line is constructed, specifically including:
[0057] S110: Perform aluminum profile inspection testing on several surface quality inspection lines using aluminum profile inspection test samples, and obtain aluminum profile inspection test images collected by each surface quality inspection line;
[0058] S120: Perform artificial labeling on the collected aluminum profile inspection test images and construct a training image sample set, train the YOLO model using the constructed training image sample set, and obtain several YOLO defect recognition models corresponding to different actual inspection speed ranges for each surface quality inspection line.
[0059] S130: Construct a YOLO defect identification model list for each surface quality inspection line, and establish a storage mapping relationship between the YOLO defect identification model list and each surface quality inspection line.
[0060] In this embodiment, first, aluminum profile inspection test samples are used to perform aluminum profile inspection tests in the full speed range on each surface quality inspection line to obtain aluminum profile inspection test images, and then training image sample sets are constructed and the training of YOLO models is performed to obtain YOLO defect identification models corresponding to different actual inspection speed ranges for each surface quality inspection line. Thus, considering the different influences of different positions and environments on the surface quality inspection lines, by reasonably planning several actual inspection speed ranges and training YOLO defect identification models for each actual inspection speed range, the speed range of the YOLO defect identification model can be ensured to have sufficient adaptability to reduce the frequent switching of YOLO defect identification models caused by different surface quality inspection periods, while ensuring that the overall system has high recognition accuracy.
[0061] It should be noted that YOLO (You Only Look Once) is a real-time target detection algorithm based on deep learning, and the defect identification of YOLO technology in the industrial scene belongs to a relatively mature technology application in the field. The present embodiment only provides an implementation process of a feasible route, but it should be noted that this implementation process is only a preferred embodiment of the present application and does not limit the patent scope of the present application. In the present embodiment, the specific process of generating a YOLO defect identification model is as follows:
[0062] (1) Data collection: aluminum profile inspection test samples (previously provided with scratches, depressions, cracks, spots, bubbles, and stains) are used to perform aluminum profile inspection tests in the full speed range on each surface quality inspection line to obtain aluminum profile inspection test images collected by an image acquisition device;
[0063] (2) Data preprocessing: defects are labeled for the collected aluminum profile inspection test images, the defect labeled images are classified according to different actual detection speed ranges of each surface quality inspection line, the file format of each class labeled image is converted into YOLO format, and a training image sample set of different actual detection speed ranges for each surface quality inspection line is obtained;
[0064] (3) YOLO model construction: an initial YOLO model containing a backbone network, a neck network, and a detection head is constructed, the backbone network is used to extract image features of the input training image sample set, the neck network is used to fuse the extracted image features, and the detection head is used to realize the prediction of the bounding box and the class.
[0065] The loss function of the YOLO model in this embodiment can be set as:
[0066]
[0067] In the formula, and is a balance coefficient, is a bounding box coordinate loss, is a confidence loss, is a classification loss.
[0068] In actual application, when training YOLO, first, the initial YOLO model constructed is used to perform image feature extraction, image feature fusion, and prediction of bounding boxes and classes on the input training image, then the loss between the prediction result and the label (including bounding box loss, confidence loss and classification loss) is calculated by using the loss function, and then the model parameters are optimized by gradient descent and the like, to obtain the finally trained YOLO defect recognition model.
[0069] In some feasible embodiments, data enhancement such as rotation, flipping, brightness adjustment, and noise addition on the collected aluminum profile inspection test image can also be performed to improve the robustness of the trained model.
[0070] In some feasible embodiments, the training image sample set can also be divided into a training set and a validation set, the training set is used to train the YOLO model, and the validation set is used to evaluate the model performance, to guide the adjustment of hyperparameters and optimize the training result.
[0071] Further, the aluminum profile inspection test sample is used to perform aluminum profile inspection test on the plurality of surface quality inspection lines, and the step of obtaining the aluminum profile inspection test image collected by each surface quality inspection line includes:
[0072] S111: preparing an aluminum profile inspection test sample composed of a plurality of defective aluminum profiles; wherein the plurality of defective aluminum profiles are configured to cover all different types of defects in all divided regions on the aluminum profile;
[0073] S112: querying the standard inspection speed range of each surface quality inspection line, dividing the standard inspection speed range into a plurality of different inspection speed minimum sections, taking the middle value of each inspection speed minimum section as the inspection speed feature, and generating the aluminum profile quality inspection speed preset set of each surface quality inspection line based on the inspection speed feature of each inspection speed minimum section;
[0074] S113: According to the several inspection speed characteristics of the set of aluminum profile quality inspection speed presets, perform aluminum profile inspection tests on the several defect aluminum profiles in the aluminum profile inspection test sample, and obtain the aluminum profile inspection test images collected by each surface quality inspection line.
[0075] Furthermore, artificial labeling is performed on the collected aluminum profile inspection test images, and a training image sample set is constructed. The YOLO model is trained using the constructed training image sample set, and the steps of obtaining several YOLO defect recognition models corresponding to different actual inspection speed ranges for each surface quality inspection line are as follows:
[0076] S121: Artificial labeling is performed on the collected aluminum profile inspection test images, several inspection speed minimum sections of each surface quality inspection line are merged into several actual inspection speed ranges with equal range lengths according to a preset section merging rule, and a training image sample set for each actual inspection speed range is constructed;
[0077] S122: The training image sample set is divided into training samples and test samples, the YOLO model is trained using the training samples, and several YOLO defect recognition models corresponding to different actual inspection speed ranges for each surface quality inspection line are obtained;
[0078] S123: The model recognition accuracy of each inspection speed minimum section is tested for the YOLO defect recognition model of the actual inspection speed range using the single aluminum profile inspection test image corresponding to each inspection speed minimum section in the actual inspection speed range in the test sample;
[0079] S124: The model recognition accuracy of each inspection speed minimum section is used as the model fitness of the YOLO defect recognition model of the actual inspection speed range, and the model fitness of all inspection speed minimum sections is stored in the model fitness list attached to the YOLO defect recognition model.
[0080] In this embodiment, first, an aluminum profile inspection test sample covering all different types of defects possessed by all divided areas on the aluminum profile is prepared, and is divided into several different minimum inspection speed sections, then aluminum profile inspection test is performed on each surface quality inspection line at the inspection speed characteristics of each minimum inspection speed section, aluminum profile inspection test images are obtained, after manual annotation, several minimum inspection speed sections of each surface quality inspection line are merged into several actual inspection speed ranges with equal range length according to the preset section merging rule, and this is used as a training image sample set to perform YOLO defect recognition model training of several corresponding to different actual inspection speed ranges of each surface quality inspection line, finally, model recognition accuracy test of each YOLO defect recognition model for each minimum inspection speed section in its actual inspection speed range is performed, and a model fitness list is generated, which provides data support for subsequent solving of aluminum profile surface quality inspection tasks allocated to each surface quality inspection line and task execution period and actual inspection speed of each aluminum profile surface quality inspection task.
[0081] In actual application, the preset section merging rule is configured as: the difference between the front target number of inspection speeds most frequently used in the historical aluminum profile surface quality inspection process and the middle value of the corresponding actual inspection speed range falls within the preset deviation value range, and the range number of the actual inspection speed range obtained after merging several minimum inspection speed sections is the smallest.
[0082] In the preferred embodiment, several aluminum profile surface quality inspection tasks in the target inspection period are obtained, and the aluminum profile product association information and surface quality inspection deadline in each aluminum profile surface quality inspection task are extracted, which specifically includes:
[0083] S210: querying several aluminum profile surface quality inspection tasks in the target inspection period in the aluminum profile preparation plan list; wherein each aluminum profile surface quality inspection task corresponds to the surface quality inspection requirement of part or all of the aluminum profiles in an aluminum profile preparation order;
[0084] S220: extracting the aluminum profile product association information and surface quality inspection deadline in each aluminum profile surface quality inspection task; wherein the aluminum profile product association information includes the aluminum profile product quantity and the aluminum profile product type, and the aluminum profile product quantity, the aluminum profile product type and the surface quality inspection deadline are configured to be obtained from the surface quality inspection requirement of the corresponding aluminum profile preparation order.
[0085] In this embodiment, considering that different aluminum profile surface quality inspection tasks may correspond to different numbers of aluminum profile products, different types of aluminum profile products and different surface quality inspection deadlines, the surface quality inspection requirements of part or all of the aluminum profiles in the aluminum profile preparation order need to be extracted in the aluminum profile surface quality inspection task, which serves as data support for subsequent allocation of each aluminum profile surface quality inspection task and the corresponding YOLO defect recognition model to each surface quality inspection line.
[0086] In a preferred embodiment, the running occupancy information of each surface quality inspection line in the target inspection period is queried, and each aluminum profile surface quality inspection task and the corresponding YOLO defect recognition model are allocated to each surface quality inspection line according to the aluminum profile product association information and the surface quality inspection deadline of each aluminum profile surface quality inspection task and the several YOLO defect recognition models of each surface quality inspection line.
[0087] S310: Query the running occupancy information of each surface quality inspection line in the target inspection period, and extract the idle period of each surface quality inspection line in the target inspection period in the running occupancy information;
[0088] S320: Extract the number of aluminum profile products and the type of aluminum profile products in the aluminum profile product association information of each aluminum profile surface quality inspection task, and determine the surface quality inspection level of each aluminum profile surface quality inspection task based on the type of aluminum profile products.
[0089] S330: According to the number of aluminum profile products, the surface quality inspection level and the surface quality inspection deadline of each aluminum profile surface quality inspection task, each aluminum profile surface quality inspection task and the YOLO defect recognition model corresponding to the actual inspection speed are allocated to each surface quality inspection line.
[0090] Further, according to the number of aluminum profile products, the surface quality inspection level and the surface quality inspection deadline of each aluminum profile surface quality inspection task, each aluminum profile surface quality inspection task and the YOLO defect recognition model corresponding to the actual inspection speed are allocated to each surface quality inspection line.
[0091] S331: According to the number of aluminum profile products, the surface quality inspection level and the surface quality inspection deadline of each aluminum profile surface quality inspection task, considering the idle period of each surface quality inspection line in the target inspection period and the several YOLO defect recognition models of each surface quality inspection line.
[0092] S332: when the task execution time period of the surface quality inspection line to which each aluminum profile surface quality inspection task is assigned meets the first constraint condition that the actual inspection speed adopted by the task execution time period of the surface quality inspection line and the actual aluminum profile inspection quantity determined by the task execution time period are greater than the aluminum profile product quantity, and the second constraint condition that the model fitness of the YOLO defect recognition model to which the actual inspection speed adopted by the task execution time period of the surface quality inspection line belongs in the YOLO defect recognition model list is not lower than the model fitness requirement corresponding to the surface quality inspection level of the aluminum profile surface quality inspection task, the optimization target is to minimize the sum of the number of times of switching the actual inspection speed of each surface quality inspection line within the target inspection time period;
[0093] S333: using an optimization algorithm to solve the aluminum profile surface quality inspection task assigned to each surface quality inspection line and the task execution time period and actual inspection speed for executing each aluminum profile surface quality inspection task, and assigning the YOLO defect recognition model corresponding to each aluminum profile surface quality inspection task and actual inspection speed to each surface quality inspection line.
[0094] On this basis, the aluminum profile surface quality inspection equipment of each surface quality inspection line is driven to load the assigned YOLO defect recognition model, and to perform the aluminum profile surface quality inspection step of the aluminum profile surface quality inspection task assigned to the YOLO defect recognition model corresponding to the inspection time period, specifically including:
[0095] S410: driving the aluminum profile surface quality inspection equipment of each surface quality inspection line to load the assigned YOLO defect recognition model before the task execution time period of each aluminum profile surface quality inspection task;
[0096] S420: controlling each surface quality inspection line to adopt the actual inspection speed corresponding to the aluminum profile surface quality inspection task in the task execution time period of each aluminum profile surface quality inspection task, and to perform the aluminum profile surface quality inspection of the corresponding aluminum profile surface quality inspection task using the YOLO defect recognition model.
[0097] In the embodiment, by performing aluminum profile inspection tests on each surface quality inspection line, a plurality of YOLO defect recognition models corresponding to different actual inspection speed ranges of each surface quality inspection line are generated, aluminum profile product association information and surface quality inspection deadlines of a plurality of aluminum profile surface quality inspection tasks in a target inspection period are extracted, running occupancy information of each surface quality inspection line in the target inspection period is considered, aluminum profile surface quality inspection efficiency and aluminum profile inspection quality are taken as constraint conditions, the minimum YOLO defect recognition model switching times are taken as optimization objectives, the aluminum profile surface quality inspection tasks allocated to each surface quality inspection line and the task execution period and actual inspection speed of each aluminum profile surface quality inspection task are solved, the YOLO defect recognition model corresponding to each aluminum profile surface quality inspection task is determined according to the actual inspection speed, and finally each surface quality inspection line is driven to load the allocated YOLO defect recognition model and execute the corresponding aluminum profile surface quality inspection task, so that the inspection accuracy of the aluminum profile surface quality inspection under the demand of industrial batch production of high-precision aluminum profile products is improved, the allocation of the aluminum profile surface quality inspection task between a plurality of surface quality inspection lines is reasonably planned, the task deadline management difficulty of the surface quality inspection is reduced, and the contradiction between the inspection speed adaptability and the defect inspection accuracy is balanced.
[0098] Referring to Figure 2 , Figure 2 FIG. 1 is a structural schematic diagram of an aluminum profile surface quality inspection system according to an embodiment of the present application.
[0099] As Figure 2 shown, the aluminum profile surface quality inspection system according to the embodiment of the present application comprises:
[0100] The acquisition module 10 is configured to acquire aluminum profile inspection test images of each surface quality inspection line and construct a YOLO defect recognition model list of each surface quality inspection line; wherein the YOLO defect recognition model list comprises a plurality of YOLO defect recognition models corresponding to different inspection speed sections.
[0101] The acquisition module 20 is configured to acquire a plurality of aluminum profile surface quality inspection tasks in a target inspection period and extract aluminum profile product association information and surface quality inspection deadlines in each aluminum profile surface quality inspection task.
[0102] The query module 30 is configured to query running occupancy information of each surface quality inspection line in the target inspection period, and allocate each aluminum profile surface quality inspection task and the corresponding YOLO defect recognition model to each surface quality inspection line according to the aluminum profile product association information and the surface quality inspection deadlines of each aluminum profile surface quality inspection task and the plurality of YOLO defect recognition models of each surface quality inspection line.
[0103] The execution module 40 is configured to drive the aluminum profile surface quality inspection equipment of each surface quality inspection line to load the YOLO defect identification model assigned to the aluminum profile surface quality inspection equipment, and perform the aluminum profile surface quality inspection of the aluminum profile surface quality inspection equipment in the inspection period corresponding to the aluminum profile surface quality inspection task assigned to the YOLO defect identification model.
[0104] Other embodiments or specific implementations of the aluminum profile surface quality inspection system of the present application can refer to the above-mentioned method embodiments, and will not be described here.
[0105] It can be understood that, in the description of the present specification, the description of the terms "an embodiment", "another embodiment", "other embodiments", or "first embodiment to Nth embodiment" means that the specific features, structures, materials or characteristics described in combination with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0106] It should be noted that, in this document, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or system. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0107] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the present application specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for inspecting the surface quality of an aluminum profile, characterized in that: The following steps are involved: Collect aluminum profile inspection test images from each surface quality inspection line and construct a YOLO defect recognition model list for each surface quality inspection line; wherein the YOLO defect recognition model list includes several YOLO defect recognition models corresponding to different inspection speed sections; Obtain several aluminum profile surface quality inspection tasks within the target inspection period, and extract the aluminum profile product related information and surface quality inspection period in each aluminum profile surface quality inspection task; Query the operation occupancy information of each surface quality inspection line during the target inspection period. Based on the aluminum profile product association information and surface quality inspection period of each aluminum profile surface quality inspection task and several YOLO defect recognition models of each surface quality inspection line, each aluminum profile surface quality inspection task and the corresponding YOLO defect recognition model are assigned to each surface quality inspection line. Specifically, the following steps are performed: querying the operation occupancy information of each surface quality inspection line within the target inspection period, and extracting the idle period of each surface quality inspection line within the target inspection period from the operation occupancy information; Extracting the quantity and type of aluminum profile products from the aluminum profile product associated information of each aluminum profile surface quality inspection task, and determining the surface quality inspection grade of each aluminum profile surface quality inspection task based on the aluminum profile product type; According to the number of aluminum profile products, surface quality inspection level and surface quality inspection period of each aluminum profile surface quality inspection task, the YOLO defect recognition model corresponding to each aluminum profile surface quality inspection task and actual inspection speed is assigned to each surface quality inspection line; The aluminum profile surface quality inspection equipment of each surface quality inspection line is driven to load the assigned YOLO defect recognition model and perform the aluminum profile surface quality inspection of the aluminum profile surface quality inspection task assigned to it within the inspection period corresponding to the YOLO defect recognition model.
2. The surface quality inspection method of aluminum profiles according to claim 1, characterized in that: Collect aluminum profile inspection test images for each surface quality inspection line and build a YOLO defect recognition model for each surface quality inspection line. The steps include: Performing aluminum profile inspection tests on a plurality of surface quality inspection lines using aluminum profile inspection test samples, and obtaining aluminum profile inspection test images collected by each surface quality inspection line; Manual annotation was performed on the collected aluminum profile inspection test images to construct a training image sample set. The constructed training image sample set was used to train the YOLO model, and several YOLO defect recognition models corresponding to different actual inspection speed ranges were obtained for each surface quality inspection line. Build a YOLO defect recognition model list for each surface quality inspection line, and establish a storage mapping relationship between the YOLO defect recognition model list and each surface quality inspection line.
3. The surface quality inspection method of aluminum profiles according to claim 2, characterized in that: The aluminum profile inspection test is performed on several surface quality inspection lines using an aluminum profile inspection test sample, and the steps of obtaining aluminum profile inspection test images collected by each surface quality inspection line include: Preparing an aluminum profile inspection test sample consisting of a plurality of defective aluminum profiles; wherein the plurality of defective aluminum profiles are configured to cover all different types of defects present in all divided areas on the aluminum profile; Query the standard inspection speed range of each surface quality inspection line, pre-divide the standard inspection speed range into several different minimum inspection speed segments, use the middle value of each minimum inspection speed segment as the inspection speed feature, and generate a preset set of aluminum profile quality inspection speeds for each surface quality inspection line based on the inspection speed features of each minimum inspection speed segment; According to several inspection speed characteristics in the preset set of aluminum profile quality inspection speeds for each surface quality inspection line, aluminum profile inspection tests are performed on several defective aluminum profiles in the aluminum profile inspection test samples, and aluminum profile inspection test images collected by each surface quality inspection line are obtained.
4. The surface quality inspection method of aluminum profiles according to claim 3, characterized in that: Manual annotation is performed on the collected aluminum profile inspection test images to construct a training image sample set. The constructed training image sample set is used to train the YOLO model to obtain several YOLO defect recognition model steps corresponding to different actual inspection speed ranges for each surface quality inspection line. Specifically, the steps include: Manual annotation is performed on the collected aluminum profile inspection test images. Several minimum inspection speed sections of each surface quality inspection line are merged into several actual inspection speed ranges of equal length according to the preset section merging rules. A training image sample set is constructed for each actual inspection speed range. The training image sample set is divided into training samples and test samples, and the YOLO model is trained using the training samples to obtain several YOLO defect recognition models corresponding to different actual inspection speed ranges for each surface quality inspection line; Using the individual aluminum profile inspection test images corresponding to each minimum inspection speed segment within the actual inspection speed range of the test sample, the YOLO defect recognition model within the actual inspection speed range is tested for model recognition accuracy in each minimum inspection speed segment; The model recognition accuracy of each inspection speed minimum section is used as the model fitness of the YOLO defect recognition model in the actual inspection speed range, and the model fitness of all inspection speed minimum sections is stored in the model fitness list attached to the YOLO defect recognition model.
5. The surface quality inspection method of aluminum profiles according to claim 4, characterized in that: The preset section merging rule is configured as follows: when the previous target number of inspection speeds used most times in the historical aluminum profile surface quality inspection process falls into the actual inspection speed range corresponding to the merger, the difference between the inspection speed speed and the middle value of the actual inspection speed range is within the preset deviation value range, and the actual inspection speed range obtained after merging several sections with the minimum inspection speed has the smallest range number.
6. The surface quality inspection method of aluminum profiles according to claim 1, characterized in that: Obtain several aluminum profile surface quality inspection tasks within the target inspection period, and extract the aluminum profile product-related information and surface quality inspection deadline steps in each aluminum profile surface quality inspection task, specifically including: Querying a number of aluminum profile surface quality inspection tasks within a target inspection period in the aluminum profile preparation plan list; wherein each aluminum profile surface quality inspection task corresponds to the surface quality inspection requirements of a portion or all of the aluminum profiles in an aluminum profile preparation order; Extract the aluminum profile product-related information and surface quality inspection period in each aluminum profile surface quality inspection task; wherein, the aluminum profile product-related information includes the aluminum profile product quantity and the aluminum profile product type, and the aluminum profile product quantity, the aluminum profile product type and the surface quality inspection period are configured to be extracted from the surface quality inspection requirements of the corresponding aluminum profile preparation order.
7. The surface quality inspection method of aluminum profiles according to claim 1, characterized in that: According to the number of aluminum profile products, surface quality inspection level and surface quality inspection period of each aluminum profile surface quality inspection task, the YOLO defect recognition model corresponding to each aluminum profile surface quality inspection task and actual inspection speed is assigned to each surface quality inspection line step, including: According to the number of aluminum profile products, surface quality inspection level and surface quality inspection period of each aluminum profile surface quality inspection task, the idle period of each surface quality inspection line within the target inspection period and several YOLO defect recognition models of each surface quality inspection line are considered; When each aluminum profile surface quality inspection task is assigned to a task execution period of the corresponding surface quality inspection line that meets the idle period and the surface quality inspection deadline, the first constraint condition is that the actual inspection speed adopted by the surface quality inspection line during the task execution period and the actual number of aluminum profile inspections determined during the task execution period are greater than the number of aluminum profile products. The second constraint condition is that the model fitness of the YOLO defect recognition model to which the actual inspection speed adopted by the surface quality inspection line belongs in the YOLO defect recognition model list is not lower than the model fitness requirement corresponding to the surface quality inspection level of the aluminum profile surface quality inspection task. The optimization goal is to minimize the sum of the number of times the actual inspection speed of each surface quality inspection line is switched within the target inspection period. An optimization algorithm is used to solve the aluminum profile surface quality inspection tasks assigned to each surface quality inspection line, the task execution period and the actual inspection speed of each aluminum profile surface quality inspection task, and the YOLO defect recognition model corresponding to each aluminum profile surface quality inspection task and the actual inspection speed is assigned to each surface quality inspection line.
8. The surface quality inspection method of aluminum profiles according to claim 7, characterized in that: Drive the aluminum profile surface quality inspection equipment of each surface quality inspection line to load the assigned YOLO defect recognition model and execute the aluminum profile surface quality inspection steps of the aluminum profile surface quality inspection task assigned to it during the inspection period corresponding to the YOLO defect recognition model, specifically including: Driving the aluminum profile surface quality inspection equipment of each surface quality inspection line to load the assigned YOLO defect recognition model before the task execution period of each aluminum profile surface quality inspection task; Each surface quality inspection line is controlled to adopt the actual inspection speed corresponding to each aluminum profile surface quality inspection task during the task execution period of the aluminum profile surface quality inspection task, and the YOLO defect recognition model is used to perform the aluminum profile surface quality inspection of the corresponding aluminum profile surface quality inspection task.
9. A surface quality inspection system for aluminum profiles, characterized in that: include: An acquisition module is used to collect aluminum profile inspection test images from each surface quality inspection line and construct a YOLO defect recognition model list for each surface quality inspection line; wherein the YOLO defect recognition model list includes a plurality of YOLO defect recognition models corresponding to different inspection speed sections; An acquisition module is used to acquire several aluminum profile surface quality inspection tasks within a target inspection period, and extract aluminum profile product related information and surface quality inspection period in each aluminum profile surface quality inspection task; The query module is used to query the operation occupancy information of each surface quality inspection line during the target inspection period. Based on the aluminum profile product association information and surface quality inspection period of each aluminum profile surface quality inspection task and the several YOLO defect recognition models of each surface quality inspection line, each aluminum profile surface quality inspection task and the corresponding YOLO defect recognition model are assigned to each surface quality inspection line. Specifically, it includes: querying the operation occupancy information of each surface quality inspection line within the target inspection period, and extracting the idle period of each surface quality inspection line within the target inspection period from the operation occupancy information; Extracting the quantity and type of aluminum profile products from the aluminum profile product associated information of each aluminum profile surface quality inspection task, and determining the surface quality inspection grade of each aluminum profile surface quality inspection task based on the aluminum profile product type; According to the number of aluminum profile products, surface quality inspection level and surface quality inspection period of each aluminum profile surface quality inspection task, the YOLO defect recognition model corresponding to each aluminum profile surface quality inspection task and actual inspection speed is assigned to each surface quality inspection line; An execution module is used to drive the aluminum profile surface quality inspection equipment of each surface quality inspection line to load the assigned YOLO defect recognition model and perform the aluminum profile surface quality inspection of the aluminum profile surface quality inspection task assigned to it within the inspection period corresponding to the YOLO defect recognition model.
Citation Information
Patent Citations
Wood board defect online detection method based on yov8 binocular vision
CN119067920A
Aluminum profile surface defect analysis method based on machine vision
CN119723703A