Defect detection system, method and device, computer equipment and readable storage medium

By designing a defect detection system for integrated transmission, image collection, control, eliminating and alarm equipment, the problem of insufficient defect detection flexibility in existing technologies has been solved, and the effect of rapid identification and eliminating the timely alarm of defective objects is achieved.

CN119375237AActive Publication Date: 2025-01-28CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411654197.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-01-28
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

The existing defect detection technology has shortcomings in flexibility, especially in large-scale production line production, manual inspection and X-ray non-destructive inspection are difficult to meet the flexibility needs.

Method used

Design a defect detection system that includes transmission equipment, image collection equipment, control equipment, eliminating equipment and alarm equipment. Transfer objects by transmitting equipment, image collection equipment collection objects and transmission to control devices, control equipment for defect detection, and sending instructions to the excluding device to remove the object when detecting the defects. Time alarm.

Benefits of technology

The system can quickly identify and eliminate the defective objects, improve the flexibility and efficiency of defect detection, and timely alarm to ensure product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119375237A_ABST
    Figure CN119375237A_ABST
Patent Text Reader

Abstract

The invention relates to a defect detection system, method and device, computer equipment and a readable storage medium. The system comprises: a transfer device for simultaneously transferring at least one object by movement; the image acquisition equipment is used for performing image acquisition on a target object located in an acquisition range of the image acquisition equipment on the conveying equipment and transmitting an acquired object image to the control equipment; the control equipment is used for performing defect detection on a target object in the object image to obtain a defect detection result of the target object, and sending a rejection instruction to the rejection equipment under the condition that the defect detection result is that a defect exists; the rejecting equipment is used for rejecting the target object from the conveying equipment in response to the rejecting instruction, so that the target object slides into the slide way; and the alarm device is used for updating the number of the defective objects in response to the fact that the target object slides into the slide way, and giving an alarm when the number of the defective objects reaches a number threshold value. By adopting the method, the flexibility of defect detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of defect detection technology, and in particular to a defect detection system, method, apparatus, computer device and readable storage medium. Background Art

[0002] With the development of defect detection technology, defect detection technology has been applied in more and more scenarios. Defect detection technology is a technology used to detect defects in objects.

[0003] Currently, defect detection mainly relies on manual inspection and X-ray nondestructive inspection. Manual inspection is limited by the recognition ability of the human eye and is not flexible enough. X-ray inspection has strict environmental requirements and cannot adapt well to the current large-scale production line, nor is it flexible enough.

[0004] Therefore, there is an urgent need for a defect detection solution that can improve the flexibility of defect detection. Summary of the invention

[0005] Based on this, it is necessary to provide a defect detection system, method, apparatus, computer equipment and readable storage medium that can improve the flexibility of defect detection in response to the above technical problems.

[0006] On the one hand, the present application provides a defect detection system, including: a conveying device, used to simultaneously convey at least one object by movement; an image acquisition device, used to acquire images of a target object on the conveying device that is located within the acquisition range of the image acquisition device, and transmit the acquired object image to a control device; a control device, used to perform defect detection on the target object in the object image, obtain a defect detection result of the target object, and send a rejection instruction to a rejection device if the defect detection result is that a defect exists; a rejection device, used to reject the target object from the conveying device in response to the rejection instruction, so that the target object slides into a slide; an alarm device, used to update the number of defective objects in response to the target object sliding into the slide, and to issue an alarm if the number of defective objects reaches a quantity threshold.

[0007] On the other hand, the present application also provides a defect detection method, which is applied to a control device in a defect detection system. The system also includes a conveying device, an image acquisition device, a rejection device and an alarm device. The conveying device is used to simultaneously convey at least one object by movement. The image acquisition device is used to capture images of target objects on the conveying device that are located within the acquisition range of the image acquisition device, and transmit the captured object images to the control device. The method includes: receiving the captured object image; performing defect detection on the target object in the object image to obtain a defect detection result of the target object; when the defect detection result is that a defect exists, sending a rejection instruction to the rejection device to instruct the rejection device to reject the target object from the conveying device, so that the target object slides into the slide, and the alarm device updates the number of defective objects in response to the target object sliding into the slide, and issues an alarm when the number of defective objects reaches a quantity threshold.

[0008] On the other hand, the present application also provides a defect detection device, which belongs to a control device in a defect detection system. The system also includes a conveying device, an image acquisition device, a rejection device and an alarm device. The conveying device is used to simultaneously convey at least one object by movement. The image acquisition device is used to capture images of target objects on the conveying device that are located within the acquisition range of the image acquisition device, and transmit the captured object images to the control device; the device includes: an image receiving module, used to receive the captured object image; a defect detection module, used to perform defect detection on the target object in the object image to obtain a defect detection result of the target object; an instruction sending module, used to send a rejection instruction to the rejection device when the defect detection result is that there is a defect, so as to instruct the rejection device to reject the target object from the conveying device, so that the target object slides into the slide, and the alarm device updates the number of defective objects in response to the target object sliding into the slide, and issues an alarm when the number of defective objects reaches a quantity threshold.

[0009] On the other hand, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned defect detection method when executing the computer program.

[0010] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps in the above-mentioned defect detection method when executed by a processor.

[0011] On the other hand, the present application also provides a computer program product, including a computer program, which implements the steps in the above-mentioned defect detection method when executed by a processor.

[0012] The above-mentioned defect detection system, method, device, computer device, computer-readable storage medium and computer program product simultaneously transmit at least one object through a transmission device, perform image acquisition of a target object on the transmission device located within the acquisition range of the image acquisition device through an image acquisition device, and transmit the acquired object image to a control device, perform defect detection on the target object in the object image through a control device, obtain a defect detection result of the target object, and send a rejection instruction to a rejection device when the defect detection result is that a defect exists, and the rejection device responds to the rejection instruction to reject the target object from the transmission device so that the target object slides into the slideway, and responds to the target object sliding into the slideway through an alarm device to update the number of defective objects, and alarm when the number of defective objects reaches a number threshold. Since a rejection instruction is sent to the rejection device when the defect detection result is that a defect exists, the defective object can be quickly rejected from the transmission device, and responds to the target object sliding into the slideway to update the number of defective objects, and alarm when the number of defective objects reaches a number threshold, the alarm can be timely issued, thereby improving the flexibility of defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0014] FIG1 is a framework diagram of a defect detection system in some embodiments;

[0015] FIG2 is a flow chart of updating the number of defective objects in some embodiments;

[0016] FIG3 is a circuit diagram of an alarm device in some embodiments;

[0017] FIG4 is a schematic diagram of components of a defect detection system in some embodiments;

[0018] FIG5 is a structural diagram of a shading device in some embodiments;

[0019] FIG6 is a schematic diagram of the structure of a defect detection system in some embodiments;

[0020] FIG7 is a schematic flow chart of defect detection performed by a defect detection system in some embodiments;

[0021] FIG8 is a diagram showing the working principle of a rejection device in some embodiments;

[0022] FIG9 is a pneumatic schematic diagram of a reject device in some embodiments;

[0023] FIG10 is a flow chart of obtaining a target detection model in some embodiments;

[0024] FIG11 is a flowchart of a trap detection program corresponding to a defect detection system in some embodiments;

[0025] FIG. 12 is a diagram of the internal structure of a computer device in some embodiments. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0027] The present application embodiment provides a defect detection system, as shown in FIG1 , the defect detection system includes: a transmission device 102, an image acquisition device 104, a control device 106, a rejection device 108 and an alarm device 110. Among them:

[0028] The transport device 102 is used to transport at least one object simultaneously by movement.

[0029] The conveying device is in contact with the object and is both a carrying mechanism and a traction mechanism, for example, a conveyor belt.

[0030] The object may be any object such as a device or product. The object may be a device or product used in a vehicle, for example, an upper cover of a generator controller. The vehicle may be any vehicle, such as a passenger car, a bus, a truck or a tractor, a car, a sports utility vehicle, a truck or a bus, a fuel vehicle or a new energy vehicle, an unmanned vehicle, an autonomous vehicle, a semi-autonomous vehicle or a non-autonomous vehicle.

[0031] Specifically, the conveying device is used to transmit the objects placed thereon, and can control the defect detection rate, that is, the rate of defect detection, by controlling the rate of transmitting the objects. The defect detection rate refers to the time required to detect one object.

[0032] The image acquisition device 104 is used to acquire images of target objects on the transmission device that are within the acquisition range of the image acquisition device, and transmit the acquired object images to the control device.

[0033] Specifically, the image acquisition device acquires images facing the transmission device, and the image acquisition device can be any type of camera.

[0034] The control device 106 is used to perform defect detection on the target object in the object image, obtain a defect detection result of the target object, and send a rejection instruction to the rejection device when the defect detection result indicates that there is a defect.

[0035] The control device may be, but is not limited to, a smart phone, a tablet computer, a desktop computer, a laptop computer or a server, etc. Defect detection may be any defect in the detection object, for example, for the upper cover of the generator controller, it may be the detection of multiple defects such as dents, scratches, and stains on the upper cover of the generator controller.

[0036] Specifically, the control device is used to process the object image acquired by the image acquisition device and determine whether the object has defects. If defects are present, a rejection instruction is sent to the rejection device.

[0037] The rejecting device 108 is used to reject the target object from the conveying device in response to the rejecting instruction, so that the target object slides into the slide.

[0038] The function of the reject device is to reject the target object from the assembly line, i.e. the conveying device, after receiving the reject instruction, so as to ensure the product quality. The slide is used for the object to slide down from the conveying device, for example, it can be a slope beside the conveying device.

[0039] The alarm device 110 is used to update the number of defective objects in response to the target object sliding into the slideway, and to issue an alarm when the number of defective objects reaches a threshold value.

[0040] The quantity threshold can be set as needed, and can be, but is not limited to, 2, 4, or 10. There are two situations in which a certain number of defective objects appear continuously. One is that there is a problem with the upstream equipment of the defect detection system, causing multiple objects to have defects. The other is that there is a problem with the defect detection system itself, mistaking non-defective objects for defects. Timely alarms can remind relevant personnel to conduct inspections. The number of defective objects can refer to the number of objects with defects in consecutive defect detection results, or the total number of defective objects detected up to the current time.

[0041] In some embodiments, the alarm device includes an alarm, which is used to sound an alarm when the number of defective objects reaches a threshold value to remind relevant staff to conduct inspections. The alarm may be, but is not limited to, an audible and visual alarm, such as a buzzer.

[0042] In some embodiments, the alarm device is also used to display the number of defective objects so as to have a clear understanding of the number of defective objects. For example, the alarm device also includes a display. The display is used to display the number of defective objects. The display can be, but is not limited to, a display screen such as an LED (Light Emitting Diode) display screen or an LCD (Liquid Crystal Display) display screen.

[0043] In the above defect detection system, at least one object is simultaneously transmitted by a conveying device, an image acquisition device is used to acquire an image of a target object on the conveying device that is located within the acquisition range of the image acquisition device, and the acquired object image is transmitted to a control device, a defect detection is performed on the target object in the object image by the control device, and a defect detection result of the target object is obtained, and when the defect detection result is that a defect exists, a rejection instruction is sent to a rejection device, and the rejection device responds to the rejection instruction to reject the target object from the conveying device so that the target object slides into the slideway, and the alarm device responds to the target object sliding into the slideway to update the number of defective objects, and when the number of defective objects reaches a quantity threshold, an alarm is issued. Since a rejection instruction is sent to the rejection device when the defect detection result is that a defect exists, the defective object can be quickly rejected from the conveying device, and the number of defective objects is updated in response to the target object sliding into the slideway, and an alarm is issued when the number of defective objects reaches a quantity threshold, an alarm can be issued in time, thereby improving the flexibility of defect detection.

[0044] In some embodiments, the alarm device includes an infrared sensor and a microcontroller; the infrared sensor is used to emit infrared rays facing the slide, and when the target object slides on the slide, the infrared rays are blocked by the target object and then reflected; the infrared sensor is also used to receive reflected light, modulate the reflected light and generate a modulation signal; the microcontroller is used to record the number of defective objects and update the number of defective objects upon receiving the modulation signal sent by the infrared sensor.

[0045] Among them, the object with defects can be called a defective object, so if the target object has defects, the target object is a defective object. Reflected light is the light reflected when the infrared ray hits the target object. The microcontroller can be but is not limited to a single chip microcomputer. The microcontroller is connected to the infrared sensor to process the signal from the infrared sensor, and is also used to count and display the defective objects on the display, so as to have a clear understanding of the number of defective objects, and control the alarm to sound an alarm when a certain number of defective objects are continuously detected.

[0046] In some embodiments, the infrared sensor is connected to a microcontroller, and the rejected objects will slide down the slope. In the process of the objects sliding down the slope, the infrared rays emitted by the transmitter of the infrared sensor will be blocked, and the infrared rays will be reflected. The reflected light is received by the photoelectric tube in the infrared sensor and then modulated to obtain a modulation signal. The modulation signal is input into the microcontroller for counting and alarming of defective objects.

[0047] In this embodiment, the number of defective objects can be conveniently and accurately recorded through the infrared sensor and the microcontroller, and the number of defective objects can be efficiently updated.

[0048] In some embodiments, the defect detection system performs defect detection according to a preset defect detection cycle, and the mediation signal is the current mediation signal, and the number of defect objects is updated, including: obtaining the first moment when the mediation signal was last received, and determining the second moment when the current mediation signal was received; determining the time interval between the first moment and the second moment; when the time interval is greater than the duration of the defect detection cycle, updating the number of defect objects to a preset number; when the time interval is less than or equal to the duration of the defect detection cycle, incrementing the number of defect objects.

[0049] The preset number is 1. The defect detection cycle is determined by the defect detection rate. The defect detection rate refers to the time required to detect one object. For example, if the defect detection rate is X seconds / object, the defect detection cycle is X seconds, and X seconds is, for example, 1.5 seconds (s). If the time interval between two consecutive received modulation signals is less than or equal to X seconds, it means that two defective objects are detected continuously. Otherwise, it means that the two defective objects are not detected continuously. Increasing the number of defective objects means adding 1 to the number of defective objects.

[0050] In some embodiments, a first mode and a second mode may be set in the microcontroller. The first mode does not distinguish whether the defective objects are continuously detected, but increments the number of defective objects by 1 as long as the mediation information is received; the second mode increments the number of defective objects by 1 only when the defective objects are continuously detected, and an alarm is issued when the number of defective objects is greater than the quantity threshold. In the second mode, the microcontroller can determine whether to issue an alarm according to the set mode. As shown in FIG2 , a flowchart for determining the number of defective objects is provided, where mode 0 is the first mode, mode 1 is the second mode, n represents the number of defective objects in mode 0, m represents the number of defective objects in mode 1, 1.5s is the duration of the defect detection cycle, signal refers to the mediation signal, and num represents the quantity threshold. The alarm device provides buttons for selecting a mode, setting a threshold, and eliminating an alarm. After the alarm, the alarm can be eliminated by pressing the button to eliminate the alarm.

[0051] In some embodiments, as shown in FIG3 , a circuit schematic diagram of an alarm device is shown, which includes a power supply circuit, a single-chip minimum system circuit, an infrared sensing module circuit, a liquid crystal display circuit, a key module circuit, and a buzzer alarm circuit. In the power supply circuit, R1 represents a resistor, 1K represents R1 is 1KΩ (kilo-ohm), and LED1 RED represents a red LED light-emitting diode. DC1 represents a direct current power supply, a DC interface represents a direct current power interface, SW represents a switch (Switch), and SW-DPDT refers to a double pole double throw switch (Double Pole Double Throw Switch, DPDT). In the minimum system circuit of the microcontroller, U1 represents the microcontroller itself, numbers 1 to 40 represent that U1 has 40 pins, P followed by a number such as P10 represents the type of pin, VCC is the voltage pin or the connected voltage, RST (Reset) represents the reset signal input terminal, VPD (Vcc Power Down) represents the backup power input terminal, EA (Enable Address) represents the external program memory access enable control terminal, Vpp represents the on-chip EPROM programming power supply, ALE (Address Latch Enable) represents the address latch enable signal output terminal, PROG (Program) represents the programming pulse input terminal, TXD (Transmit Data) represents the transmit data pin, INT1 and INT0 are external interrupt pins, T0 and T1 are timer / counter pins, WR (Write) represents the write operation control pin, RD (Read) represents the read operation control pin, XTAL1 and XTAL2 represent the inverting input and output terminals of the crystal oscillator circuit, PSEN (ProgramStore Enable) represents the external ROM read select signal, and GND (Ground) represents the ground pin. S1 represents the button, Y1 represents the crystal oscillator, C1 is the capacitor, and 30P is the capacitance value of capacitor C1. EC1 is a capacitor. In the infrared sensor circuit, OUT represents the output end of the infrared sensor. In the button module, S2~S6 are buttons, in the buzzer alarm circuit, Buzzer represents the buzzer, and PNP is a transistor. In the LCD display circuit, LCD1602 is a character-type LCD display module based on LCD display technology, VO is V0, and is the contrast adjustment end of the LCD display. VL is the contrast adjustment end of the LCD display, RS is the register selection pin, RW is the read-write signal line, EN is the enable end, D0~D7 are 8-bit bidirectional data lines, BL+ is the positive pole of the backlight, and BL- is the negative pole of the backlight.

[0052] In this embodiment, when the time interval is greater than the duration of the defect detection cycle, the number of defective objects is updated to a preset number so that the counting can be restarted. When the time interval is less than or equal to the duration of the defect detection cycle, the number of defective objects is incremented so that the number of defective objects can be correctly counted.

[0053] In some embodiments, the system also includes a lighting device and a shading device located below the image acquisition device, wherein the shading device surrounds the target object: the shading device is used to block ambient light for the target object within the acquisition range transmitted to the image acquisition device, and the ambient light is light other than the light emitted by the lighting device; the lighting device is used to illuminate the inside of the shading device to illuminate the target object surrounded by the shading device.

[0054] Among them, the lighting device is a light source, which is used to illuminate the inside of the shading device to reduce the interference of ambient light on the image captured by the image acquisition device and improve the accuracy and precision of the detection. The shading device can also be called a darkroom. There can be one or more lighting devices, and multiple means at least two. Ambient light is light other than the light emitted by each lighting device. The lighting device can be installed inside the shading device, such as on the side wall of the shading device.

[0055] When the ambient light is complex, the illumination of the object is the superposition of the ambient light and the light emitted by the lighting device. The ambient light can easily interfere with the image. The shading device can reduce the ambient light received by the object, thereby reducing the interference of the ambient light on the image.

[0056] In some embodiments, as shown in FIG4 , the defect detection system can be divided into a mechanical part, an electrical part, and an image detection part. The mechanical part includes a conveying device and a rejection device, and the rejection device includes a relay, a solenoid valve, a cylinder, and an air compressor. The electrical part includes a power supply and an alarm device, and the power supply is used to power the alarm device. The alarm device includes a microcontroller, an infrared sensor, an alarm, and a display. The image detection part includes an image acquisition device, a lighting part, and a control device, and the lighting part includes a lighting device and a shading device.

[0057] In some embodiments, the shading device is fixed directly below the image acquisition device, and the shading device and the image acquisition device remain relatively stationary. The shading device does not affect the transmission of the object by the conveying device. When the object moves below the image acquisition device, the shading device can block at least part of the ambient light for the object. For example, when the object moves directly below the image acquisition device, the shading device can completely surround the surroundings of the object. As shown in FIG5 , a structural diagram of a shading device is provided. The shading device is composed of two rectangular parallelepipeds, and there is a through hole at the connection between the two rectangular parallelepipeds. The length and width of the upper rectangular parallelepiped can be designed according to the image acquisition device. For example, the upper rectangular parallelepiped can completely surround the image acquisition device. The lower rectangular parallelepiped has two through holes, one horizontal and one vertical. The horizontal through hole is used to ensure that the conveyor belt and the object pass normally. The width of the horizontal through hole should be greater than the width of the conveying device, such as the conveyor belt, and the height should be greater than the height of the object. The longitudinal through hole is used to install the cylinder piston rod. The size of the longitudinal through hole is determined according to the specific installation environment. The shading device should minimize the entry of external light while meeting the requirements to avoid interference of external light on imaging, thereby affecting the accuracy of detection.

[0058] In some embodiments, the defect detection system includes some or all of the structures in FIG. 6, and may also include structures not shown in FIG. 6, such as a rejection device. The ellipse represents an object, the text "no defect" in the ellipse represents that the defect detection result of the object is no defect, the text "defective" in the ellipse represents that the defect detection result of the object is defective, and the text "unknown" in the ellipse represents that the defect detection result has not been obtained, that is, the defect detection has not been performed or the defect detection is in progress. As shown in FIG. 7, a workflow diagram corresponding to FIG. 6 is shown. Specifically, the conveying device conveys the object to the shading device under the image acquisition device, and the lighting device provides illumination. The image acquisition device captures the image of the object and uploads it to the control device. After the control device detects the defect, the defective object is rejected, and the defective object is counted by the infrared sensor and the microcontroller. When a certain number of end caps are passed continuously, an alarm is triggered and the defect detection system is triggered to stop urgently, reminding the staff to check whether the defect detection system is faulty. Objects without defects continue to be conveyed to the next process of the production line.

[0059] In this embodiment, since the shading device can block ambient light for the object transmitted under the image acquisition device, the object is mainly affected by the light emitted by the lighting device, thereby reducing the complexity of the light received by the object, reducing the interference of light on the image captured by the image acquisition device, and improving the quality of the captured image.

[0060] In some embodiments, the rejection device includes a relay, a solenoid valve and a cylinder; the relay controls the solenoid valve to open or close based on the rejection instruction to drive the piston rod of the cylinder to move; rejecting the target object from the conveying device includes: rejecting the target object from the conveying device through the movement of the piston rod.

[0061] Specifically, the rejection device may also include an air compressor, which is connected to the solenoid valve to provide power for the cylinder piston rod. The cylinder is located next to the conveying device and is connected to the solenoid valve. The defective objects are rejected from the conveying device through the movement of the piston rod, thereby achieving the purpose of automatically rejecting defective objects.

[0062] In some embodiments, the relay receives the rejection instruction sent by the control device, the relay is activated, and the solenoid valve is controlled to be turned on and off through the circuit. The solenoid valve is connected to the relay, and the solenoid valve controls the flow direction of the gas based on the electromagnetic control principle, so as to realize the reciprocating motion of the cylinder piston rod.

[0063] As shown in FIG8 , a schematic diagram of rejecting defective objects is provided. The rejection device mainly consists of two parts: the circuit and the gas circuit. The working principle is: the air compressor is turned on to compress the air to generate high-pressure gas as the power source. The high-pressure gas flows to the solenoid valve after being filtered and processed by the air source processor. When the object is detected to have defects such as defective products (image processing part), the control device sends a rejection instruction to the relay connected to the control device, and the relay is jogged. The relay controls the on and off of the solenoid valve through the circuit, and the on and off of the solenoid valve controls the flow of high-pressure gas, thereby controlling the movement of the cylinder piston rod. When the solenoid valve is energized, the valve moves, and the high-pressure gas enters the cylinder to push the cylinder piston rod to move, and the piston rod pushes the object out of the conveying device such as a conveyor belt; when the solenoid valve is de-energized, the valve is closed, and the high-pressure gas flows out in the opposite direction to reset the cylinder rod. The pneumatic principle is shown in FIG9 , where 1 is an air compressor, 2 is a filter, 3 is a relief valve, 4 is a pressure gauge, 5 is an oil mist device, 6 is a throttle valve, 7 is a solenoid valve, 8 is a cylinder, and 1YA and 2YA represent the numbers of the electromagnets, which are used to distinguish different electromagnets.

[0064] In this embodiment, the objects can be accurately removed from the conveying device through the relay, the solenoid valve and the cylinder, thereby improving the efficiency and accuracy of removing the objects.

[0065] In some embodiments, defect detection is performed on a target object in an object image to obtain a defect detection result of the target object, including: acquiring an image area where the target object is located from the object image to obtain a target object image; performing defect detection on the target object in the target object image to obtain a defect detection result; the control device is also used to: when the defect detection result shows that a defect exists, obtain location information of the defect area from the defect detection result, and mark the defect area in the object image.

[0066] The defective area refers to the image area with defects. The defective area can be marked by using a border to circle the defective area in the image. The border can be represented by the position information of the border in the image. The position information of the border includes the coordinates of the center position of the border, the length and height of the border. The coordinates of the center position of the border are represented by (bx, by), the length of the border is represented by bh, and the height of the border is represented by bw.

[0067] Specifically, the control device may display the object image and display the frame of the defective area in the object image. The control device may also mark the defective area in the target object image, display the target object image, and display the frame of the defective area in the target object image.

[0068] In some embodiments, the control device may input the target object image into the target detection model to obtain a defect detection result. The defect detection result output by the target detection model is in the form of a vector y:

[0069]

[0070] Among them, c1, c2, c3, ... cn are classification labels, and n corresponds to the actual number of classification labels. At most one of c1, c2, c3, ... cn is 1. If Pc = 1, it means that a defect has been detected, and if Pc = 0, it means that no defect has been detected. If there is one of c1, c2, c3, ... cn that is 1, then Pc = 1; if c1, c2, c3, ... cn are all 0, then Pc = 0.

[0071] In some embodiments, the target detection model may be a model trained by a detection model to be trained using a sample image. The detection model to be trained may be a model implemented by the YOLOv5 algorithm. YOLOv5 (You Only Look Once version 5) is a real-time target detection algorithm based on deep learning. There is a detection object in the sample image. The detection object in the sample image may occupy part or all of the sample image, for example, occupying the entire sample image. The detection object in the sample image may be located at any position in the sample image, for example, in the middle of the sample image. The sample image may be an image obtained by cutting an image obtained by shooting in which the detection object exists, so the sample image may also be a cut sample image.

[0072] In some embodiments, the process of training a target detection model is shown in FIG10 , including: acquiring images: photographing an object with defects to obtain an image of the defective object. The object with defects may be photographed multiple times to obtain multiple images of the defective object; selecting and cropping: selecting a cleaned defective object image with obvious defective features from the multiple defective object images, and then cropping the selected defective object image to obtain a sample image, and during cropping, the object is made to occupy the entire sample image and be located in the sample image as much as possible; preprocessing and labeling: preprocessing the sample image, such as performing image enhancement preprocessing using grayscale transformation, image sharpening, image filtering, etc. In an actual inspection production line, the inspected object is moving, and metal objects such as end caps (aluminum metal objects) are prone to reflective light. In addition, the captured image may be blurred, have unclear edge boundaries, and cannot truly reflect the characteristics of the inspected object, which is not conducive to subsequent image detection. Therefore, by using grayscale transformation, image sharpening, image filtering and other methods to perform image enhancement preprocessing on the sample image, the detection accuracy can be improved, subsequent detection can be facilitated, and image quality can be improved; then, a border (which should be as small as possible) is used to circle or mark the defect area in the preprocessed sample image, and the position information of the border in the sample image and the sample image constitute a training sample. Objects with defects can be called defective objects. The same sampling method can be used to obtain training samples determined according to different defective objects, and multiple training samples can constitute a data set. Verification and image testing: The detection model to be trained is trained through the data set to obtain a trained detection model, and then the trained detection model is verified. For example, the trained detection model is verified through a target image of a defective object. If the verification passes, the trained detection model is used as the target detection model.

[0073] In some embodiments, the control device can perform defect detection based on python + OpenCV + yolov5 algorithm. As shown in FIG11, a program flow chart for defect detection is provided, including: ① Import module: including importing the environment configuration for processing and running, referencing the OpenCV library, calling functions and calling serial port modules, etc. ② Set serial port: use the serial port to send instructions to the relay, mainly setting the baud rate and the instructions sent, etc. ③ Configure parameters: set thresholds, build parameter parsers, configure nms (Network Management System), configure interface parameters, etc. ④ Load model: load the trained yolov5 model. ⑤ Set device interface: set the device display interface to facilitate operator operation, and name the device interface "target detection program". ⑥ Process input: set three detection forms: image detection, camera detection and video detection; image detection will read images stored in files for detection, video detection will read videos stored in files, and detect specified objects in the video; camera detection calls the camera to detect specified objects in the shooting picture, and when the "close camera" button is pressed in the interface, the camera is closed and the detection is stopped. ⑦ Display output: After pressing any test button in the interface, if a defect is detected, it will be circled with a minimum border. The function can be called to set the border color and thickness, etc. The detection time is displayed above the border, and the function is called to make the set text appear above the border.

[0074] In this embodiment, the position information of the defect area is obtained from the defect detection result, and the defect area is marked in the object image, so that the specific position of the defect can be intuitively understood.

[0075] In some embodiments, a defect detection method is provided, which is applied to a control device in the above-mentioned defect detection system, and the system also includes a conveying device, an image acquisition device, a rejection device and an alarm device. The conveying device is used to simultaneously convey at least one object by movement, and the image acquisition device is used to capture images of target objects on the conveying device that are located within the acquisition range of the image acquisition device, and transmit the captured object images to the control device; the method includes: 1. Receiving the captured object image; 2. Performing defect detection on the target object in the object image to obtain a defect detection result of the target object; 3. When the defect detection result is that there is a defect, sending a rejection instruction to the rejection device to instruct the rejection device to reject the target object from the conveying device, so that the target object slides into the slide, and the alarm device updates the number of defective objects in response to the target object sliding into the slide, and issues an alarm when the number of defective objects reaches a threshold value.

[0076] Among them, defect detection can be based on python and OpenCV, and use the yolov5 algorithm to perform intelligent defect detection in multiple ways. The degree of defects can be customized to avoid the one-size-fits-all situation of the traditional model. When the defect detection results indicate the existence of defects, the defective objects are eliminated and the number of defective objects is counted. When a certain number of defective objects appear continuously, an alarm is issued. The process is perfected, saving time for multiple processes. The equipment used in the defect detection system is cheap, which can save the cost of the enterprise. In general, the defect detection system and method have good effects in improving the accuracy, efficiency, convenience and cost reduction of defect detection.

[0077] The yolov5 algorithm usually involves IOU (Intersection over Union) and non-maximum suppression (NMS). Intersection over Union: As the name suggests, it is the overlap rate between the generated candidate bound and the original marked bound, that is, the ratio of their intersection to their union. The ideal situation is complete overlap, that is, the ratio is 1. The calculation formula is:

[0078]

[0079] in, is the area of ​​the candidate box, is the area of ​​the original marked box. When the IOU is greater than a certain threshold (such as 0.5), the candidate box is usually considered correct. During the operation of the YOLO algorithm, there may be multiple grids that predict the same target object, resulting in multiple labeled borders. At this time, the non-maximum suppression ratio needs to be used to solve this situation. The specific usage is: first remove the borders whose IOU does not reach the threshold, select the border with the largest IOU value, and then calculate the IOU with other borders. If the IOU is less than a certain threshold, such as 0.5, remove this border.

[0080] In the above defect detection method, at least one object is simultaneously transmitted by a conveying device, an image acquisition device is used to acquire an image of a target object on the conveying device that is located within the acquisition range of the image acquisition device, and the acquired object image is transmitted to a control device, a defect detection is performed on the target object in the object image by the control device, and a defect detection result of the target object is obtained, and when the defect detection result is that a defect exists, a rejection instruction is sent to a rejection device, and the rejection device responds to the rejection instruction to reject the target object from the conveying device so that the target object slides into the slideway, and the alarm device responds to the target object sliding into the slideway to update the number of defective objects, and when the number of defective objects reaches a quantity threshold, an alarm is issued. Since a rejection instruction is sent to the rejection device when the defect detection result is that a defect exists, the defective object can be quickly rejected from the conveying device, and the number of defective objects is updated in response to the target object sliding into the slideway, and an alarm is issued when the number of defective objects reaches a quantity threshold, an alarm can be issued in time, thereby improving the flexibility of defect detection.

[0081] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0082] Based on the same inventive concept, the embodiment of the present application also provides a defect detection device for implementing the defect detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more defect detection device embodiments provided below can refer to the limitations on the defect detection method above, and will not be repeated here.

[0083] In some embodiments, a defect detection device is provided. The device belongs to a control device in a defect detection system. The system also includes a transmission device, an image acquisition device, a rejection device and an alarm device. The transmission device is used to simultaneously transmit at least one object by movement. The image acquisition device is used to capture an image of a target object on the transmission device that is within a capture range of the image acquisition device, and transmit the captured object image to the control device. The device includes:

[0084] The image receiving module is used to receive the collected object image.

[0085] The defect detection module is used to perform defect detection on the target object in the object image to obtain the defect detection result of the target object.

[0086] The instruction sending module is used to send a rejection instruction to the rejection device when the defect detection result is that there is a defect, so as to instruct the rejection device to reject the target object from the conveying device so that the target object slides into the slide, and the alarm device responds to the target object sliding into the slide, updates the number of defective objects, and issues an alarm when the number of defective objects reaches a quantity threshold.

[0087] Each module in the above defect detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0088] In some embodiments, a computer device is provided, which may be a control device, and its internal structure diagram may be shown in FIG12. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a defect detection method is implemented.

[0089] Those skilled in the art will understand that the structure shown in FIG. 12 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0090] In some embodiments, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0091] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0092] In some embodiments, a computer program product is provided, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.

[0093] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0094] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0095] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0096] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A defect detection system, characterized in that: The system comprises: a transport device for transporting at least one object simultaneously by movement; An image acquisition device, used to acquire an image of a target object on the transmission device that is within the acquisition range of the image acquisition device, and transmit the acquired object image to the control device; A control device, configured to perform defect detection on the target object in the object image, obtain a defect detection result of the target object, and send a rejection instruction to a rejection device when the defect detection result indicates that a defect exists; a rejecting device, configured to reject the target object from the conveying device in response to the rejecting instruction, so that the target object slides into the slideway; The alarm device is used for updating the number of defective objects in response to the target object sliding into the slideway, and giving an alarm when the number of defective objects reaches a number threshold.

2. The system according to claim 1, characterized in that The alarm device includes an infrared sensor and a microcontroller; The infrared sensor is used to emit infrared rays facing the slide, and when the target object slides on the slide, the infrared rays are blocked by the target object and then reflected; The infrared sensor is further used to receive reflected light and modulate the reflected light to generate a modulation signal; The microcontroller is used to record the number of defective objects and update the number of defective objects when receiving the mediation signal sent by the infrared sensor.

3. The system according to claim 2, characterized in that The defect detection system performs defect detection according to a preset defect detection cycle, the mediation signal is a current mediation signal, and the updating of the number of defective objects includes: Obtaining the first time when the last mediation signal was received, and determining the second time when the current mediation signal was received; determining a time interval between the first moment and the second moment; When the time interval is greater than the duration of the defect detection cycle, updating the number of defective objects to a preset number; When the time interval is less than or equal to the duration of the defect detection cycle, the number of defective objects is incremented.

4. The system according to any one of claims 1 to 3, characterized in that: The system further comprises an illumination device and a shading device located below the image acquisition device, wherein the shading device surrounds the target object: The shading device is used to shield the target object within the acquisition range of the image acquisition device from ambient light, wherein the ambient light is light other than the light emitted by the lighting device; The lighting device is used to illuminate the interior of the shading device to illuminate the target object surrounded by the shading device.

5. The system according to any one of claims 1 to 3, characterized in that: The rejection device includes a relay, a solenoid valve and a cylinder; The relay controls the electromagnetic valve to open or close based on the rejection instruction to drive the piston rod of the cylinder to move; The removing the target object from the transmission device comprises: The target object is removed from the conveying device by the movement of the piston rod.

6. The system according to any one of claims 1 to 3, characterized in that: The performing defect detection on the target object in the object image to obtain a defect detection result of the target object includes: Acquire the image region where the target object is located from the object image to obtain the target object image; Performing defect detection on the target object in the target object image to obtain a defect detection result; The control device is also used for: When the defect detection result indicates that a defect exists, position information of a defect area is obtained from the defect detection result, and the defect area is marked in the object image.

7. A defect detection method, characterized in that: Applicable to a control device in a defect detection system, the system further comprising a conveying device, an image acquisition device, a rejection device and an alarm device, the conveying device being used to simultaneously convey at least one object by movement, the image acquisition device being used to acquire an image of a target object on the conveying device that is within the acquisition range of the image acquisition device, and transmitting the acquired object image to the control device; The method comprises: Receiving the collected image of the object; Performing defect detection on the target object in the object image to obtain a defect detection result of the target object; When the defect detection result is that there is a defect, a rejection instruction is sent to the rejection device to instruct the rejection device to reject the target object from the conveying device so that the target object slides into the slide, and the alarm device updates the number of defective objects in response to the target object sliding into the slide, and issues an alarm when the number of defective objects reaches a quantity threshold.

8. A defect detection device, characterized in that: The device belongs to a control device in a defect detection system. The system also includes a conveying device, an image acquisition device, a rejection device and an alarm device. The conveying device is used to simultaneously convey at least one object by movement. The image acquisition device is used to acquire an image of a target object on the conveying device that is within the acquisition range of the image acquisition device, and transmit the acquired object image to the control device. The device includes: An image receiving module, used for receiving the collected image of the object; A defect detection module, used to perform defect detection on the target object in the object image to obtain a defect detection result of the target object; An instruction sending module is used to send a rejection instruction to the rejection device when the defect detection result is that a defect exists, so as to instruct the rejection device to reject the target object from the conveying device so that the target object slides into the slide, and the alarm device updates the number of defective objects in response to the target object sliding into the slide, and issues an alarm when the number of defective objects reaches a quantity threshold.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method described in claim 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method described in claim 7 are implemented.

Citation Information

Patent Citations

  • Detection system and method for product surface defects

    CN109406533A

  • Glass bottle inspection device

    CN110431405A

  • Cigarette packet appearance defect online detection method, device, electronic equipment and storage medium

    CN113781460A

  • Pole piece rubberizing detection method and device, electronic equipment and winding equipment

    CN118464904A

  • Object removing method, system and device, control equipment and storage medium

    CN118491904A