CN114494253B - Method and device for industrial quality inspection - Google Patents

Method and device for industrial quality inspection Download PDF

Info

Publication number
CN114494253B
CN114494253B CN202210387644.5A CN202210387644A CN114494253B CN 114494253 B CN114494253 B CN 114494253B CN 202210387644 A CN202210387644 A CN 202210387644A CN 114494253 B CN114494253 B CN 114494253B
Authority
CN
China
Prior art keywords
image data
segmented image
target
industrial
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210387644.5A
Other languages
Chinese (zh)
Other versions
CN114494253A (en
Inventor
王克贤
赵何
张志琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Zhiyun Tiangong Technology Co ltd
Original Assignee
Jiangsu Zhiyun Tiangong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Zhiyun Tiangong Technology Co ltd filed Critical Jiangsu Zhiyun Tiangong Technology Co ltd
Priority to CN202210387644.5A priority Critical patent/CN114494253B/en
Publication of CN114494253A publication Critical patent/CN114494253A/en
Application granted granted Critical
Publication of CN114494253B publication Critical patent/CN114494253B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a method and a device for industrial quality inspection, wherein the method comprises the following steps: acquiring image data of a workpiece to be detected; processing the image data by adopting a segmentation network to obtain segmented image data, wherein the segmentation network is deployed in a GPU; judging whether or not the divided image data has a detected target; and if so, loading the segmented image data from the GPU to a CPU so as to carry out quality inspection on the workpiece to be detected. The invention can only load the segmented image data with the detection target from the GPU to the CPU by screening, thereby avoiding loading the segmented image data without the detection target, and effectively improving the detection speed of the whole quality inspection process.

Description

Method and device for industrial quality inspection
Technical Field
The invention relates to the technical field of industrial detection, in particular to an industrial quality detection method and an industrial quality detection device.
Background
With the continuous development of deep learning, the application fields of deep learning are increasing, and semantic segmentation is used as a hot branch of deep learning, and the application fields are also increasing, for example, the application fields are widely applied to the fields of automatic driving, medical image analysis, industrial defect detection, biological cell detection, and the like. However, in the process of using the graphic card deployment, the processing time of the segmentation network is obviously longer than that of the classification network and the target detection network, and in the field of industrial quality inspection, the processing speed of the model is very important, which determines the production capacity of equipment detection and greatly influences the cost of a factory.
Currently, a segmentation network is deployed in a Graphics card to process an image, and download a Processing result from a GPU (Graphics Processing Unit) to a CPU (Central Processing Unit), and then perform post-Processing on the Processing result through the CPU, but the process of downloading the Processing result from the GPU to the CPU is time-consuming, which affects the speed of device detection.
Disclosure of Invention
The present invention provides an industrial quality inspection method for solving the above technical problems, and can avoid loading the divided image data without the detection target by screening only the divided image data with the detection target from the GPU to the CPU, thereby effectively increasing the detection speed of the whole quality inspection process.
A method of industrial quality inspection, comprising the steps of: acquiring image data of a workpiece to be detected; processing the image data by adopting a segmentation network to obtain segmented image data, wherein the segmentation network is deployed in a GPU; judging whether the segmented image data has a detection target; and if so, loading the segmented image data from the GPU to a CPU so as to carry out quality inspection on the workpiece to be detected.
According to one embodiment of the invention, the detected target is an industrial defect target.
According to an embodiment of the present invention, the judging whether or not the divided image data has a detection target includes the steps of: acquiring the total number of categories of the segmented image data; calculating a detection threshold value of a segmented image of each type of industrial defect target in the segmented image data; calculating the maximum connected domain pixel number of the segmented image of each type of the industrial defect target in the segmented image data; judging whether the maximum connected domain pixel number is larger than the detection threshold value or not; if yes, the segmentation image is judged to have the detection target, and the segmentation image is loaded to the CPU from the GPU.
According to an embodiment of the present invention, the detection threshold is the number of pixels having a pixel value different from 0 in the segmented image of each type of the industrial defect target, and the detection threshold of the segmented image of each type of the industrial defect target in the segmented image data is calculated by using the following formula:
Figure 497549DEST_PATH_IMAGE001
wherein, the first and the second end of the pipe are connected with each other,the iis indicative of the detection threshold value or values,n irepresents the total number of type i industrial defect targets,A jiand the areas of the ith industrial defect object and the jth industrial defect object are shown.
According to an embodiment of the present invention, the calculating the maximum connected domain number of the segmented image of each type of the industrial defect target in the segmented image data specifically includes the following steps: dividing the segmented image where each type of industrial defect target is located into different connected domains by adopting a Two-pass algorithm, wherein the pixel value of each connected domain pixel is not equal to 0; calculating the number of pixels of each connected domain of the segmented image of each type of the industrial defect target by adopting a scanning algorithm; and calculating the maximum connected domain pixel number of which the pixel value is not 0 in the segmented image of each type of the industrial defect target by adopting a sorting algorithm.
An apparatus for industrial quality inspection, comprising: the acquisition module is used for acquiring image data of a workpiece to be detected; a processing module for processing the image data using a segmentation network to obtain segmented image data, wherein the segmentation network is deployed in a GPU; a judging module for judging whether the divided image data has a detection target; and the loading module is used for loading the segmented image data from the GPU to a CPU (central processing unit) when the segmented image data has a detected target so as to perform quality inspection on the workpiece to be detected.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of industrial quality inspection of the above embodiments when executing the computer program.
A non-transitory computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the method of industrial quality inspection of the above embodiment.
The invention has the beneficial effects that:
the invention can only load the segmented image data with the detection target from the GPU to the CPU by screening, thereby avoiding loading the segmented image data without the detection target, and effectively improving the detection speed of the whole quality inspection process.
Drawings
FIG. 1 is a flow chart of a method for industrial quality inspection according to an embodiment of the present invention;
FIG. 2 is a flowchart of determining whether segmented image data has a detected target according to one embodiment of the present invention;
fig. 3 is a block diagram of an apparatus for industrial quality inspection according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, the method for industrial quality inspection according to the embodiment of the present invention includes the following steps:
and S1, acquiring the image data of the workpiece to be detected.
In one embodiment of the invention, an industrial camera can be used to acquire image data of a workpiece to be detected on an industrial production line in real time.
And S2, processing the image data by adopting a segmentation network to obtain segmentation image data, wherein the segmentation network is arranged in the GPU.
In an embodiment of the present invention, the segmentation network may be deployed in the GPU, and the image data obtained in step S1 is subjected to segmentation processing based on the GPU power to obtain the segmented image data result. It should be noted that the result is a matrix of C × H × W, where C is the total number of categories, H is the height of each of the divided images, and W is the width of each of the divided images, and thus, it is known that the divided image data result includes C divided images result [ i ] of the categories, where i represents the ith category.
S3, it is determined whether or not the segmented image data has a detection target.
Specifically, the total number of classes of the segmented image data can be obtained, the detection threshold of the segmented image where each class of industrial defect target is located in the segmented image data can be calculated, the maximum connected domain pixel number of the segmented image where each class of industrial defect target is located in the segmented image data can be calculated, then whether the maximum connected domain pixel number is larger than the detection threshold can be judged, if yes, the segmented image is judged to have the detection target, and the segmented image is loaded to the CPU from the GPU.
The detection target is an industrial defect target, the detection threshold is the number of pixels with pixel values not 0 in the segmented image of each type of industrial defect target, and the detection threshold of the segmented image of each type of industrial defect target in the segmented image data can be calculated by adopting the following formula:
Figure 872904DEST_PATH_IMAGE002
wherein the content of the first and second substances,the ia value indicative of a detection threshold value is detected,n irepresents the total number of type i industrial defect targets,A jiand the areas of the ith industrial defect object and the jth industrial defect object are shown.
The step of calculating the maximum connected domain number of the segmented image in which each type of industrial defect target is located in the segmented image data further specifically comprises the following steps: the divided image of each type of industrial defect target is divided into different connected domains by adopting a Two-pass algorithm (wherein the pixel value of each connected domain pixel is not equal to 0), the number of each connected domain pixel of the divided image of each type of industrial defect target can be calculated by adopting a scanning algorithm, and the maximum number of connected domain pixels of which the pixel value is not 0 in the divided image of each type of industrial defect target can be calculated by adopting a sorting algorithm.
As will be further described below with reference to fig. 2, the step S3 is specifically set forth in step S3, as shown in fig. 2, including the following steps:
s301, acquiring class-number of the category total number of the segmentation image data result;
s302, initializing a category parameter i = 0;
s303, setting a segmentation image result [ i ]]Detection threshold value of (2)the i
S304, calculating the maximum connected domain pixel number N of which the pixel value is not 0 in the segmented image result [ i ];
s305, judging whether N is>the iI.e. segmenting the image result i]Whether the maximum connected domain pixel number N with the middle pixel value not being 0 is larger than the segmented image result [ i [ i ] ]]Detection threshold ofthe iIf yes, executing step S306, otherwise executing step S307;
s306, loading the segmented image result [ i ] from the GPU to the CPU;
s307, judging whether i > = class-number, namely whether the class parameter i of the segmented image data result is larger than or equal to the total class-number, if so, finishing, otherwise, i +1, and returning to the step S303 until all classes of segmented images are traversed.
This makes it possible to calculate the number of pixels having a pixel value other than 0 in the divided image data, to determine whether or not the divided image data has a detection target by sorting, and to detect the result of the segmentation network overdetection by setting the detection threshold.
And S4, if yes, loading the segmentation image data from the GPU to the CPU so as to carry out quality inspection on the workpiece to be inspected.
Specifically, each type of segmented image result [ i ] satisfying the detection threshold in the segmented image data result may be loaded from the GPU to the CPU, and the workpiece to be detected may be subjected to quality inspection in the CPU.
According to the industrial quality inspection method provided by the embodiment of the invention, the image data of the workpiece to be inspected is acquired, and the image data is processed by adopting the segmentation network to obtain the segmentation image data, wherein the segmentation network is distributed in the GPU to judge whether the segmentation image data has the inspection target, if so, the segmentation image data is loaded to the CPU from the GPU to perform quality inspection on the workpiece to be inspected, therefore, only the segmentation image data with the inspection target is loaded to the CPU from the GPU through screening, the segmentation image data without the inspection target is prevented from being loaded, and the inspection speed of the whole quality inspection process can be effectively improved.
The invention also provides a device for industrial quality inspection corresponding to the embodiment.
As shown in fig. 3, the apparatus for industrial quality inspection according to the embodiment of the present invention includes an obtaining module 10, a processing module 20, a determining module 30, and a loading module 40. The acquisition module 10 is used for acquiring image data of a workpiece to be detected; the processing module 20 is configured to process the image data by using a segmentation network to obtain segmented image data, where the segmentation network is deployed in the GPU; the judging module 30 is used for judging whether the segmented image data has a detected target; the loading module 40 is configured to load the segmented image data from the GPU to the CPU to perform quality inspection on the workpiece to be inspected when the segmented image data has the inspection target.
In an embodiment of the present invention, the obtaining module 10 may be an industrial camera, and may obtain image data of a workpiece to be detected on an industrial production line in real time.
In an embodiment of the present invention, the processing module 20 may be a segmentation network, and may be specifically disposed in the GPU, and performs segmentation processing on the image data obtained in step S1 based on the GPU power to obtain the segmented image data result. It should be noted that the result is a matrix of C × H × W, where C is the total number of categories, H is the height of each of the divided images, and W is the width of each of the divided images, and thus, it is known that the divided image data result includes C divided images result [ i ] of the categories, where i represents the ith category.
In an embodiment of the invention, the determining module 30 may be specifically configured to obtain the total number of types of the segmented image data, calculate a detection threshold of the segmented image in which each type of industrial defect object is located in the segmented image data, calculate a maximum connected domain pixel number of the segmented image in which each type of industrial defect object is located in the segmented image data, then determine whether the maximum connected domain pixel number is greater than the detection threshold, if so, determine that the segmented image has the detected object, so as to load the segmented image from the GPU to the CPU.
The detected target is an industrial defect target, the detected threshold is the number of pixels with pixel values not 0 in the segmented image of each type of industrial defect target, and the detected threshold of the segmented image of each type of industrial defect target in the segmented image data can be calculated by adopting the following formula:
Figure 279263DEST_PATH_IMAGE003
wherein, the first and the second end of the pipe are connected with each other,the ia value indicative of a detection threshold value is detected,n irepresents the total number of type i industrial defect targets,A jithe areas of the ith industrial defect object and the jth industrial defect object are shown.
The step of calculating the maximum connected domain number of the segmented image in which each type of industrial defect target is located in the segmented image data further specifically comprises the following steps: the split image of each type of industrial defect target is divided into different connected domains by adopting a Two-pass algorithm (wherein the pixel value of each connected domain pixel is not equal to 0), the number of each connected domain pixel of the split image of each type of industrial defect target can be calculated by adopting a scanning algorithm, and the maximum number of connected domain pixels of which the pixel value is not 0 in the split image of each type of industrial defect target can be calculated by adopting a sorting algorithm.
The working process of the determining module 30 will be further described with reference to fig. 2, as shown in fig. 2, the determining module 30 may be specifically configured to:
s301, acquiring class-number of the category total number of the segmentation image data result;
s302, initializing a category parameter i = 0;
s303, setting a segmentation image result [ i ]]Detection threshold ofthe i
S304, calculating the maximum connected domain pixel number N of which the pixel value is not 0 in the segmented image result [ i ];
s305, judging whether N is present>the iI.e. segmenting the image result i]Whether the maximum connected domain pixel number N with the middle pixel value not being 0 is larger than the segmented image result [ i [ i ] ]]Detection threshold ofthe iIf yes, executing step S306, otherwise executing step S307;
s306, loading the segmented image result [ i ] from the GPU to the CPU;
s307, judging whether i > = class-number, namely whether the class parameter i of the segmented image data result is larger than or equal to the total class-number, if so, finishing, otherwise, i +1, and returning to the step S303 until all classes of segmented images are traversed.
This makes it possible to calculate the number of pixels having a pixel value other than 0 in the divided image data, to determine whether or not the divided image data has a detection target by sorting, and to detect the result of the segmentation network overdetection by setting the detection threshold.
In an embodiment of the present invention, the loading module 40 may be specifically configured to load each type of segmented image result [ i ] satisfying the detection threshold from the GPU into the CPU, and perform quality inspection on the workpiece to be detected in the CPU.
According to the device for industrial quality inspection provided by the embodiment of the invention, the image data of the workpiece to be inspected is acquired through the acquisition module, the image data is processed through the processing module by adopting the segmentation network to obtain the segmentation image data, wherein the segmentation network is distributed in the GPU, whether the segmentation image data has the detection target or not is judged through the judgment module, and then the segmentation image data is loaded to the CPU from the GPU through the loading module when the segmentation image data has the detection target, so that the quality inspection is carried out on the workpiece to be inspected.
Corresponding to the above embodiment, the present invention further provides a computer device.
The computer device of the embodiment of the invention comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and when the processor executes the program, the industrial quality inspection method of the embodiment is realized.
According to the computer equipment provided by the embodiment of the invention, only the divided image data with the detection target can be loaded into the CPU from the GPU through screening, the divided image data without the detection target is prevented from being loaded, and the detection speed of the whole quality inspection process can be effectively improved.
In response to the above embodiments, the present invention also provides a non-transitory computer-readable storage medium.
The non-transitory computer-readable storage medium of the embodiment of the present invention stores thereon a computer program, which when executed by a processor, implements the method of industrial quality inspection of the above-described embodiment.
According to the non-transitory computer readable storage medium of the embodiment of the invention, only the segmented image data with the detected target can be loaded into the CPU from the GPU through screening, the segmented image data without the detected target is prevented from being loaded, and the detection speed of the whole quality inspection process can be effectively improved.
In the description of the present invention, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to imply that the number of technical features indicated is significant. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The meaning of "plurality" is two or more unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or may be connected through the use of two elements or the interaction of two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless expressly stated or limited otherwise, the first feature "on" or "under" the second feature may be directly contacting the second feature or the first and second features may be indirectly contacting each other through intervening media. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature "under," "beneath," and "under" a second feature may be directly under or obliquely under the second feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps in the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer-readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are exemplary and not to be construed as limiting the present invention, and that changes, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (5)

1. A method for industrial quality inspection, comprising the steps of:
acquiring image data of a workpiece to be detected;
processing the image data by adopting a segmentation network to obtain segmentation image data, wherein the segmentation network is deployed in a GPU;
judging whether the segmented image data has a detected target, wherein the detected target is an industrial defect target, and the method specifically comprises the following steps of:
acquiring the total number of categories of the segmented image data, wherein the total number of categories is the total number of categories of industrial defect targets in the segmented image data,
calculating a detection threshold value of a segmented image of each type of the industrial defect target in the segmented image data, wherein the detection threshold value is the number of pixels with pixel values not being 0 in the segmented image of each type of the industrial defect target, and the detection threshold value of the segmented image of each type of the industrial defect target in the segmented image data is calculated by adopting the following formula:
Figure DEST_PATH_IMAGE002
wherein, the first and the second end of the pipe are connected with each other,the iis indicative of the detection threshold value or values,n irepresents the total number of type i industrial defect targets,A jithe area of the ith industrial defect target and the jth industrial defect target is shown,
calculating the maximum connected domain pixel number of the segmented image of each type of the industrial defect target in the segmented image data,
determining whether the maximum connected component pixel number is greater than the detection threshold,
if yes, judging that the segmentation image has the detection target, and loading the segmentation image from the GPU to a CPU;
and if so, loading the segmented image data from the GPU to the CPU so as to perform quality inspection on the workpiece to be detected.
2. The method according to claim 1, wherein the step of calculating the maximum connected component number of the segmented image of each type of the industrial defect target in the segmented image data comprises the following steps:
dividing the segmented image where each type of industrial defect target is located into different connected domains by adopting a Two-pass algorithm, wherein the pixel value of each connected domain pixel is not equal to 0;
calculating the number of pixels of each connected domain of the segmented image of each type of the industrial defect target by adopting a scanning algorithm;
and calculating the maximum connected domain pixel number with the pixel value not being 0 in the segmented image of each type of the industrial defect target by adopting a sorting algorithm.
3. An apparatus for industrial quality inspection, comprising:
the acquisition module is used for acquiring image data of a workpiece to be detected;
a processing module for processing the image data using a segmentation network to obtain segmented image data, wherein the segmentation network is deployed in a GPU;
a judging module, configured to judge whether the segmented image data has a detected target, where the detected target is an industrial defect target, and the judging module is specifically configured to:
acquiring the total number of categories of the segmented image data, wherein the total number of categories is the total number of categories of industrial defect targets in the segmented image data,
calculating a detection threshold of a segmented image of each type of the industrial defect target in the segmented image data, wherein the detection threshold is the number of pixels with pixel values not being 0 in the segmented image of each type of the industrial defect target, and the detection threshold of the segmented image of each type of the industrial defect target in the segmented image data is calculated by adopting the following formula:
Figure 780087DEST_PATH_IMAGE002
wherein the content of the first and second substances,the iis indicative of the detection threshold value or values,n irepresents the total number of type i industrial defect targets,A jithe area of the ith industrial defect target and the jth industrial defect target is shown,
calculating the maximum connected domain pixel number of the segmented image of each type of the industrial defect target in the segmented image data,
determining whether the maximum connected component pixel number is greater than the detection threshold,
if yes, judging that the segmentation image has the detection target, and loading the segmentation image from the GPU to a CPU;
and the loading module is used for loading the segmented image data from the GPU to the CPU when the segmented image data has a detected target so as to perform quality inspection on the workpiece to be detected.
4. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the computer program, carries out the method of industrial quality testing according to any one of claims 1-2.
5. A non-transitory computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing a method of industrial quality testing according to any one of claims 1-2.
CN202210387644.5A 2022-04-14 2022-04-14 Method and device for industrial quality inspection Active CN114494253B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210387644.5A CN114494253B (en) 2022-04-14 2022-04-14 Method and device for industrial quality inspection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210387644.5A CN114494253B (en) 2022-04-14 2022-04-14 Method and device for industrial quality inspection

Publications (2)

Publication Number Publication Date
CN114494253A CN114494253A (en) 2022-05-13
CN114494253B true CN114494253B (en) 2022-07-15

Family

ID=81488548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210387644.5A Active CN114494253B (en) 2022-04-14 2022-04-14 Method and device for industrial quality inspection

Country Status (1)

Country Link
CN (1) CN114494253B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314688B (en) * 2011-09-09 2013-01-23 华中科技大学 Image segmentation method and image set segmentation method
CN108846397B (en) * 2018-05-31 2021-01-15 浙江科技学院 Automatic detection method for cable semi-conducting layer based on image processing
CN113724231B (en) * 2021-09-01 2023-12-29 广东工业大学 Industrial defect detection method based on semantic segmentation and target detection fusion model

Also Published As

Publication number Publication date
CN114494253A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN109948684B (en) Quality inspection method, device and equipment for laser radar point cloud data labeling quality
CN111862228B (en) Occlusion detection method, system, computer device and readable storage medium
CN113724257A (en) Carbon plate gray stain detection method, computer equipment and storage medium
CN103455994A (en) Method and equipment for determining image blurriness
CN112070751A (en) Wood floor defect detection method and device
CN112508950B (en) Anomaly detection method and device
US20170011502A1 (en) Defect inspection apparatus for inspecting sheet-like inspection object, computer-implemented method for inspecting sheet-like inspection object, and defect inspection system for inspecting sheet-like inspection object
CN112669290A (en) Image comparison method and device
CN112070749A (en) Paper defect detection method and device
CN112070750A (en) Leather product defect detection method and device
CN113837204A (en) Hole shape recognition method, computer equipment and storage medium
CN113256608B (en) Workpiece defect detection method and device
CN115861315B (en) Defect detection method and device
CN114494253B (en) Method and device for industrial quality inspection
CN113554645A (en) Industrial anomaly detection method and device based on WGAN
CN112183382A (en) Unmanned traffic light detection and classification method and device
CN109117843B (en) Character occlusion detection method and device
CN115205288B (en) Industrial defect detection method and device
CN114419037B (en) Workpiece defect detection method and device
CN114066881B (en) Nonlinear transformation based detection method, computer equipment and storage medium
CN113256607B (en) Defect detection method and device
CN110634124A (en) Method and equipment for area detection
CN114399669A (en) Target detection method and device
CN113516608B (en) Method and device for detecting defects of tire and tire detecting equipment
CN112700446A (en) Algorithm model training method and device for industrial quality inspection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant