Data processing method, device and electronic equipment
By sensing light sources from different directions with less than the number of light sources, and using the image detection model for processing, it solves the problems of high defect detection cost and low efficiency in the existing technology, and achieves efficient defect detection effects.
Patent Information
- Application Number
- CN202110622511.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-03
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-06-03
AI Technical Summary
In the existing technology, the detection cost of target object defects is high and the efficiency is low, and the efficiency problem of defect imaging under multi-directional light sources and camera configurations cannot be effectively solved.
Use fewer cameras than the number of light sources to sense light sources in different directions, and process multiple image data through the image detection model, including RGB color space conversion, feature extraction and data processing, to achieve defect detection.
It reduces the cost of defect detection, improves detection efficiency, can efficiently identify defects in target objects, and is suitable for defect detection applications in many industries.
Smart Images

Figure CN113469946B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a data processing method, device and electronic equipment. Background Art
[0002] In the related art, when performing defect detection and identification on a target object, the target object is generally photographed, and then the photographed image data is processed to obtain the defect detection result. Therefore, defect imaging and intelligent defect detection algorithms are two core modules. Since the defects of the target object may be diverse, it is difficult to clearly capture all defects by lighting and imaging from only one direction. In the related art, the solution to this imaging problem is generally to lay light sources in different directions and equip each group of light sources with a camera to capture defect images under different imaging conditions, and then perform defect detection on these images captured under different conditions. However, when using this solution to detect defects on the target object, there will be problems of high detection cost and low detection efficiency.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a data processing method, device and electronic device to at least solve the technical problems of high detection cost and low detection efficiency when performing defect detection on a target object in the related art.
[0005] According to one aspect of an embodiment of the present invention, there is provided a data processing method, comprising: receiving a plurality of image data, wherein the plurality of image data are obtained by irradiating a target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; performing image detection on the plurality of image data to obtain a defect detection result of the target object.
[0006] Optionally, the predetermined number of cameras is a single camera.
[0007] Optionally, the plurality of image data are obtained by the single camera sensing the target object at corresponding different times after light sources from different directions illuminate the target object at different times.
[0008] Optionally, performing image detection on the multiple image data to obtain a defect detection result of the target object includes: inputting the multiple image data into a first image detection model to obtain a defect detection result of the target object.
[0009] Optionally, the multiple image data are input into a first image detection model to obtain a defect detection result of the target object, including: converting the RGB color space of the multiple image data into a YCbCr color space through a registration module of the first image detection model; obtaining brightness data of the multiple image data after the conversion space, and color difference data of any image data in the multiple image data through a feature extraction module of the first image detection model; processing the brightness data of the multiple image data and the color difference data of any image data in the multiple image data through a data processing module of the first image detection model to obtain the defect detection result of the target object.
[0010] Optionally, the plurality of image data are obtained by irradiating the target object with light sources of different wavelengths from different directions, and then sensing the light of the corresponding different wavelengths by the single camera.
[0011] Optionally, performing image detection on the multiple image data to obtain a defect detection result of the target object includes: inputting the multiple image data into a second image detection model to obtain a defect detection result of the target object.
[0012] Optionally, the light sources with different wavelengths are red light, green light and blue light.
[0013] Optionally, after performing image detection on the multiple image data to obtain the defect detection result of the target object, it also includes: outputting the defect detection result of the target object, wherein the defect detection result includes the category of the defect existing in the target object and the regional location of the defect existing in the target object.
[0014] Optionally, the target object includes: fabric.
[0015] According to another aspect of an embodiment of the present invention, a data processing method is also provided, including: receiving multiple image data in an input area of a display interface, wherein the multiple image data are obtained by irradiating a target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; receiving a defect detection instruction on the display interface; and displaying the defect detection result of the target object on the display interface in response to the defect detection instruction.
[0016] According to another aspect of an embodiment of the present invention, there is also provided a data processing method, comprising: a client device sends a plurality of image data to a server device, wherein the plurality of image data are obtained by irradiating a target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; and the server device performs image detection on the plurality of image data to obtain a defect detection result of the target object.
[0017] According to another aspect of an embodiment of the present invention, there is further provided a data processing device, comprising: a first receiving module, used to receive a plurality of image data, wherein the plurality of image data are obtained by irradiating a target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; and a first detection module, used to perform image detection on the plurality of image data to obtain a defect detection result of the target object.
[0018] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement any one of the data processing methods described.
[0019] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any one of the data processing methods described above.
[0020] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, any one of the data processing methods is implemented.
[0021] In the embodiment of the present invention, a method of using cameras less than the number of light sources to illuminate the target object with light sources in different directions and then detecting the obtained multiple image data is achieved, thereby achieving the purpose of reducing the cost of defect detection, thereby realizing the technical effect of efficiently performing defect detection on the target object, and further solving the technical problems of high detection cost and low detection efficiency when performing defect detection on the target object in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0023] Figure 1 A hardware structure block diagram of a computer terminal for implementing a data processing method is shown;
[0024] Figure 2 is a flow chart of a data processing method 1 according to embodiment 1 of the present invention;
[0025] Figure 3 is a flowchart of a second data processing method according to embodiment 1 of the present invention;
[0026] Figure 4 is a flowchart of a data processing method 3 according to embodiment 1 of the present invention;
[0027] Figure 5 is a schematic diagram of an existing fabric inspection machine imaging and collecting images according to an optional embodiment of the present invention;
[0028] Figure 6 is a schematic diagram of multi-light source imaging and image acquisition according to an optional embodiment of the present invention;
[0029] Figure 7 is a schematic diagram of a multi-wavelength light source imaging and image acquisition according to an optional embodiment of the present invention;
[0030] Figure 8 is an overall flow chart of a data processing method provided according to an optional embodiment of the present invention;
[0031] Fig. 9 is a structural block diagram of a data processing device 1 provided according to Embodiment 2 of the present invention;
[0032] Fig.10 is a structural block diagram of a data processing device 2 provided according to Embodiment 3 of the present invention;
[0033] Fig.11 is a structural block diagram of an image detection system provided according to Embodiment 4 of the present invention;
[0034] Fig.12 is a device block diagram of a terminal according to an embodiment of the present invention;
[0035] Fig.13 is a device block diagram of a server according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0038] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0039] SSD: single shot multibox detection, a single-stage target detection algorithm using candidate boxes.
[0040] FCOS: Fully Convolutional One-Stage Object Detection, a single-stage object detection algorithm that does not use candidate boxes.
[0041] FasterRCNN: A two-stage object detection algorithm using proposal boxes.
[0042] Fabric inspection machine: Fabric inspection machine is a set of necessary special equipment for the garment industry to inspect large-format, double-width and single-width fabrics such as cotton, wool, linen, silk and chemical fiber before production. The fabric inspection machine automatically completes the length recording and roll arrangement work, and is equipped with an electronic defect detection device. The computer performs statistical analysis, assists the fabric inspection operation and prints the output.
[0043] Example 1
[0044] According to an embodiment of the present invention, an embodiment of a data processing method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0045] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing a data processing method. Figure 1As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0046] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0047] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the data processing method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the data processing method of the above-mentioned application program is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0048] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0049] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0050] Under the above operating environment, this application provides Figure 2 The data processing method shown. Figure 2 is a flow chart of a data processing method 1 according to embodiment 1 of the present invention. Figure 2 As shown, the method comprises the following steps:
[0051] Step S202, receiving a plurality of image data, wherein the plurality of image data are obtained by irradiating a target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; wherein the target object may include multiple types, for example, may be a fabric.
[0052] Step S204: performing image detection on the plurality of image data to obtain a defect detection result of the target object.
[0053] The above steps use cameras that are less than the number of light sources to illuminate the target object from different directions for photosensitization, and then detect the obtained multiple image data, thereby achieving the purpose of reducing the cost of defect detection, thereby realizing the technical effect of efficiently performing defect detection on the target object, and further solving the technical problems of high detection cost and low detection efficiency when performing defect detection on the target object in the related technology.
[0054] As an optional embodiment, the target object can be an object of various types, and can be a product of various industry types, wherein the industry type can include various major industries under the primary industry, the secondary industry, and the tertiary industry. For example, industry, agriculture, and so on. Taking the industry in the secondary industry as an example, in the defect detection of the target object, at least a variety of vertical industries under the two major directions of heavy industry and light industry are covered, such as: light textile industry (leather, wood, printing, textile, etc.), resource processing industry (chemical fiber, rubber, plastic, metal, etc.), etc. Therefore, this optional embodiment can be applied to the defect detection application of products in various industries such as industry and agriculture, or the image acquisition of products in different application scenarios, and can effectively detect the defects of target objects in various industries such as industry and agriculture. That is, this optional embodiment has no industry type limitation requirements, effectively realizes the versatility of the data processing method, improves the convenience of users using the method to a certain extent, and enhances the user experience.
[0055] As an optional embodiment, light sources from different directions illuminate the target object, wherein after the light sources from different directions illuminate the target object, different images will be generated when the camera senses the illuminated light. Different light source directions make the defect imaging effect very different. For example, some defects can be photographed from above, while some defects need to be photographed from below or from the side. For example, the same "wave pattern" has different visual states when imaged under two different lighting directions, from above and from the side. When the light is directly above, the "wave pattern" is almost impossible to observe, while under the side lighting, the "wave pattern" can be captured. When the light is from above or below, the imaging difference is large. When the light is from above, the position is difficult to distinguish, while when the light is from below, the defect position presents a longitudinal dark line, which is sharp and easy to observe. When the light is from above and below at the same time, the defect contrast is weakened. For the wave pattern type defect, the better lighting method is to light from below. Among them, when the target object is illuminated by a light source, different light intensities can be used. To distinguish, the images formed after the target object is illuminated by light sources from different directions can be distinguished by light colors of different colors and light colors of different wavelengths. When the target object is photographed by different light intensities, the color depth of the defect image obtained by the shooting can be different, and the target object can be photographed at a predetermined light intensity according to actual needs. When the target object is photographed by light colors of different colors, light sources of different colors can be placed in different positions, and the fabric surface can be illuminated from the top, bottom, and side respectively. After refraction and reflection of the target object, the photosensitive element is sensitive to the corresponding wavelength light, so the different color imaging images reflect the texture information of the target object corresponding to the different color lighting lights from different directions. By selecting a suitable light source for irradiation according to the actual situation and application scenario, the image of the target object obtained by shooting can more realistically and effectively reflect the defects of the target object, which is convenient for detecting the image data to obtain the defect result.
[0056] As an optional embodiment, after acquiring the image, before performing image detection on the image, the acquired image may be preprocessed, for example, the following processing may be included: adjusting the image tone, for example, brightness, contrast, etc.; adjusting the image size, for example, scaling up or down the image proportionally, etc.; adjusting the image range, for example, extracting only the object area in the image that needs to be detected for defects, etc. In order to better detect the image by adjusting the image when the image is blurry or the brightness is dark, etc., on the one hand, it can avoid misdetection of the image, and on the other hand, it can ensure to a certain extent that the subsequent detection is the detection of the defective part of the target object in the image, thereby improving the detection efficiency.
[0057] As an optional embodiment, the predetermined number of cameras may be multiple types, for example, may be a single camera.
[0058] As an optional embodiment, when multiple image data are obtained by a single camera after irradiating a target object with light sources from different directions, multiple methods can be used. For example, the multiple image data can be obtained by a single camera at corresponding different times after irradiating a target object with light sources from different directions at different times. Therefore, light sources corresponding to different directions are distinguished using different times. Therefore, the image data obtained by a single camera at different times correspond to images taken by light sources from different directions or different positions, thereby realizing the detection of images taken in different directions or different positions. When different times are used to distinguish light sources from different directions, it can be realized in multiple methods. For example, it can be realized by controlling the light source signals sent to the light sources in each direction. For example, the light source in that direction is controlled to emit light at a certain time, otherwise it is turned off.
[0059] As an optional embodiment, when performing image detection on multiple image data to obtain defect detection results of the target object, a variety of methods can be used, for example, an artificial intelligence processing method can be used. For example, multiple image data are input into a first image detection model to obtain defect detection results of the target object. Among them, the first image detection model is obtained by machine training based on multiple groups of training samples, and the multiple groups of training samples include: multiple image data obtained after irradiating the target object at different times by light sources in different directions, and defects existing in the target object in the image. Using the above-mentioned artificial intelligence processing method, the defect detection of the target object not only has the advantage of accurate detection, but also high efficiency.
[0060] As an optional embodiment, when multiple image data are input into the first image detection model and the defect detection result of the target object is obtained, multiple methods can be used. For example, the RGB color space of the multiple image data can be converted into the YCbCr color space through the registration module of the first image detection model, where Y represents the brightness of the image, Cb represents the color difference of the image, and Cr represents the color difference of the image. The images collected by different light sources after registration are converted into color space using the conversion formula, and the RGB space is converted into the YCbCr space. After that, the brightness data of the multiple image data after the conversion space and the color difference data of any image in the multiple image data are obtained through the feature extraction module of the first image detection model. It should be noted that different color difference channels can be retained according to the color difference information in defect detection, and the color difference information between different light source images is different. For example, when the target object is fabric, that is, in fabric defect detection, the color difference information of the fabric is not much different in defect detection, so only the color difference channel of one image can be retained. For example, through the feature extraction module of the first image detection model, the brightness data after the conversion space and the color difference data of any image are obtained, that is, when multiple image data are taken as 3 image data, for example, three images Image1Image2Image3 are taken, and the Y1, Cb1, Cr1 channel images of Image1 and the Y2, Y3 channel images of Image2Image3 are retained after conversion, that is, only the Cb1, Cr1 channel images are retained, and the Cb2, Cr2, Cb3, Cr3 channel images are discarded. Afterwards, the brightness data of the multiple image data and the color difference data of any image data in the multiple image data are processed through the data processing module of the first image detection model to obtain the defect detection result of the target object, that is, Y1, Cb1, Cr1, Y2, and Y3 are used as the input of the first image detection model for defect detection. After such processing, the original 9 channels of the three images are reduced to 5 channels, and the subsequent calculation amount is reduced by 44%.
[0061] Through the spatial transformation of the above-mentioned registration module, the feature extraction of the feature extraction module, and the data processing process of the data processing module, artificial intelligence processing of multiple image data is effectively realized, and the defect detection results of the target object are obtained efficiently and accurately.
[0062] As an optional embodiment, when multiple image data are obtained by a single camera after irradiating the target object with light sources from different directions, multiple methods can be used. For example, the multiple image data are obtained by a single camera sensing the corresponding light of different wavelengths after irradiating the target object with light sources of different wavelengths from different directions. In this processing method, light sources in different directions are distinguished by different wavelengths of different light sources. Therefore, the image data obtained by a single camera when sensing different wavelengths is the image captured by light sources in different directions or at different positions, thereby realizing the detection of images captured in different directions or at different positions. When different wavelengths are used to distinguish light sources in different directions, it can be achieved in multiple ways. For example, different wavelengths can correspond to different colors. For example, light sources with different wavelengths can be red light, green light and blue light. It should be noted that it can also be light of other colors, as long as the light corresponding to different wavelengths can distinguish light sources in different directions.
[0063] As an optional embodiment, when different wavelengths are used to distinguish light sources from different directions, multiple image data are subjected to image detection to obtain defect detection results of the target object. For example, multiple image data can be input into a second image detection model to obtain defect detection results of the target object. The second image detection model is obtained by machine training based on multiple sets of training samples. The multiple sets of training samples include: multiple image data obtained by irradiating the target object with different wavelengths from light sources from different directions, and defects existing on the target object in the image. The above-mentioned artificial intelligence processing method is used to detect defects on the target object, which not only has the advantage of accurate detection, but also high efficiency.
[0064] As an optional embodiment, the first image detection model and the second image detection model can be based on a variety of neural network detection algorithms. For example, the neural network detection algorithm can include but is not limited to single target multi-box detection (Single Shot MultiBox Detector, referred to as SSD), first-order full convolution target detection (Fully Convolutional One-Stage Object Detection, FCOS), fast target convolution neural network (Faster Region Convolutional Neural Networks, referred to as Faster RCNN) and other target detection methods. Therefore, the image detection model can be an image detection model based on SSD, an image detection model based on FCOS, an image detection model based on Faster RCNN, and the like. It should be noted that the above-mentioned image detection model based on SSD, the image detection model based on FCOS, and the image detection model based on Faster RCNN are only examples, and image detection models based on other target detection methods that are not listed one by one can also be applied to the present application. Similar to the image detection model based on SSD, the image detection model based on FCOS, and the image detection model based on Faster RCNN, the regional position of the defect in the target object image can be accurately detected through training. Image detection models based on different target detection methods can be selected according to different needs, providing the diversity of selecting different methods, making it more flexible and convenient to use, greatly improving the applicability of defect detection
[0065] As an optional embodiment, after performing image detection on multiple image data and obtaining the defect detection result of the target object, the defect detection result of the target object can also be output, wherein the defect detection result includes the category of the defect existing in the target object and the regional location of the defect existing in the target object. Obtaining the category and location of the defect is conducive to processing the defect. For example, when the target object is fabric, in the defect detection of the fabric, the detection result is that there is a surface defect in a certain area. You can choose to cut off the part of the fabric containing the defect, and the other parts can be used normally. Obtaining the defect detection result by acquiring the image taken of the target object is an extremely important and basic ability in various industries. It is simple and convenient to obtain image detection results, save time and effort, and can enhance the functional application in different scenarios. It can realize multiple uses more flexibly and accurately.
[0066] Figure 3 is a flow chart of a second data processing method according to embodiment 1 of the present invention. Figure 3 As shown, the method comprises the following steps:
[0067] Step S302, receiving a plurality of image data in an input area of a display interface, wherein the plurality of image data is obtained by irradiating a target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources;
[0068] Step S304, receiving a defect detection instruction on the display interface;
[0069] Step S306, responding to the defect detection instruction, displaying the defect detection result of the target object on the display interface.
[0070] Through the above steps, in response to the defect detection instruction, the defect detection result of the image is displayed on the display interface, wherein a camera with a number less than the number of light sources is used to illuminate the target object with light sources in different directions for photosensitization, and then the obtained multiple image data are detected, thereby achieving the purpose of reducing the defect detection cost, thereby achieving the technical effect of efficiently performing defect detection on the target object, thereby solving the technical problems of high detection cost and low detection efficiency when performing defect detection on the target object in the related technology, and achieving the effect of efficiently obtaining the defect detection result by interacting according to the instruction through the display interface.
[0071] Figure 4 is a flow chart of a data processing method 3 according to embodiment 1 of the present invention. Figure 4 As shown, the method comprises the following steps:
[0072] Step S402, the client device sends a plurality of image data to the server device, wherein the plurality of image data is obtained by irradiating a target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources;
[0073] Step S404: the server device performs image detection on the plurality of image data to obtain a defect detection result of the target object.
[0074] Through the above steps, a client device sends multiple image data, a server device receives multiple image data for image detection, and then returns the defect detection result of the target object to the client device. In this way, a camera with a number less than the number of light sources is used to illuminate the target object with light sources in different directions for photosensitization, and then the obtained multiple image data are detected, thereby achieving the purpose of reducing the defect detection cost, thereby achieving the technical effect of efficiently performing defect detection on the target object, thereby solving the technical problems of high detection cost and low detection efficiency when performing defect detection on the target object in the related technology, and achieving the effect of efficiently obtaining defect detection results through the interaction between the client device and the server device in the form of software as a service.
[0075] Based on the above embodiment and optional embodiment, an optional implementation is provided, which is described in detail below. It should be noted that in this optional implementation, the target object is a fabric as an example for description.
[0076] In intelligent fabric inspection machines, the light source direction is generally a single fixed direction. Figure 5 is a schematic diagram of an image collected by a fabric inspection machine according to an optional embodiment of the present invention. Figure 5 As shown, there is only one set of fill lights and they are always on. The camera control signal is periodically collected according to the fabric movement speed, so the collected image has only one light source direction. A single-direction light source cannot meet the needs of various existing fabric defect detection. For example, the same "wave pattern" has different visual states when imaged under two different lighting directions, from the top and from the side. When the "wave pattern" is illuminated directly from the top, it is almost impossible to observe, but when it is illuminated from the side, the "wave pattern" can be captured. When the double warp is illuminated from the top and bottom, the imaging difference is large. When the "double warp" position is difficult to distinguish when it is illuminated from the top, the position of the "double warp" defect presents a longitudinal dark line when it is illuminated from the bottom, which is easy to observe with a clear contrast. When the top and bottom are illuminated at the same time, the defect contrast is weakened. For the "double warp" defect, the best imaging lighting method is to illuminate from the bottom. It can be seen that different light source directions make the imaging effects of different types of defects very different. Some defects can be photographed by lighting from the top, while some defects need to be photographed from the bottom or side.
[0077] From the above examples, it can be seen that a single fixed-direction light source cannot clearly capture all types of defect features on the fabric. Based on the above problem, a solution is provided, that is, to shoot the fabric from different light source lighting directions and to shoot the fabric from multiple dimensions. That is, light sources in different directions are laid out, and a camera is equipped for each group of light sources to shoot fabric defect images under different imaging conditions, and then defect detection is performed on these images shot under different conditions. However, the above solution will cause the following problems: the cost of the camera is high, the cost of multiple groups of cameras is high, and the identification cost is increased; in addition, imaging is performed for each light source direction separately, and the imaged images are independent of each other. Defect detection needs to be performed for different images separately, and the data volume increases exponentially, the calculation speed is slow, and the calculation efficiency is low. Therefore, how to solve the problem of imaging different types of defects using multiple light source directions without greatly increasing the imaging and calculation costs is a difficult problem that the intelligent fabric inspection machine system needs to solve urgently.
[0078] Based on this, in an optional embodiment of the present invention, an intelligent fabric inspection system and related algorithms with a multi-directional light source having an imaging structure 1, as well as an intelligent fabric inspection system and related algorithms with a multi-directional light source having an imaging structure 2 are provided. The optional embodiments of the present invention are described in detail below.
[0079] 1) For imaging structure 1
[0080] Acquire images:
[0081] Figure 6 is a schematic diagram of multi-light source imaging and image acquisition according to an optional embodiment of the present invention, such as Figure 6 As shown. The optional embodiment of the present invention adds more directional light sources, and these light sources are not always on, but switch on and off according to their respective control signals, and the camera also matches the control signal of each light source to collect images. When each directional light source is on, the camera control signal is synchronized with it to collect images, thereby realizing fabric image collection from multiple light source directions.
[0082] Defect Detection:
[0083] Since the imaging structure 1 is an image collected under different light sources at different times during the movement of the fabric, a registration step is required. The images taken at different times are shifted and registered according to the movement speed of the fabric. After registration, the original RGB color space of the image is converted into the YCbCr color space. The conversion formula is as follows:
[0084] Brightness Y = 16 + 0.257*R + 0.504*g + 0.098*b
[0085] Color difference Cb = 128-0.148*R-0.291*g+0.439*b
[0086] Color difference Cr = 128 + 0.439*R-0.368*g-0.071*b
[0087] R=1.164*(Y-16)+1.596*(Cr-128)
[0088] G=1.164*(Y-16)-0.392*(Cb-128)-0.812*(Cr-128)
[0089] B=1.164*(Y-16)+2.016*(Cb-128)
[0090] Using the conversion formula, the images Image1 Image2 Image3 collected by different light sources after registration are converted into color space, and the RGB space is converted into the YCbCr space. After the conversion, the Y1, Cb1, Cr1 channel images of Image1 and the Y2, Y3 channel images of Image2 Image3 are retained. Because the color difference information between images of different light sources is not much different in textile defect detection, only the color difference channel of one image, namely the Cb1, Cr1 channel images, is retained, and the Cb2, Cr2, Cb3, Cr3 channel images are discarded. Y1, Cb1, Cr1, Y2, and Y3 are used as the input of the deep learning model, and the network model obtained through learning is used for defect detection. After such processing, the original 9-channel images of the three images are reduced to 5 channels, and the subsequent calculation amount is reduced by 44%.
[0091] 2) For imaging structure 2
[0092] Acquire images:
[0093] Figure 7 is a schematic diagram of a multi-wavelength light source imaging and collecting images according to an optional embodiment of the present invention, such as Figure 7 As shown. An optional embodiment of the present invention replaces the original white light fill light with a red, green and blue three-color lighting lamp. Since the color imaging CCD in a general camera is composed of three-color photosensitive elements (red, green and blue), each element senses and images light of a specific wavelength. The present invention uses this principle to replace the original single white light source with a three-color light source arranged in multiple directions. Light sources of different colors are placed in different positions to illuminate the fabric surface from above, below and from the side. After refraction and reflection of the fabric, photosensitive elements of different colors are sensitive to light of corresponding wavelengths. Therefore, images of different colors reflect the fabric texture information captured by lighting lamps of different color directions. The advantage of this design is that light of each color wavelength comes from different directions to reflect information of different aspects of the fabric. At the same time, CCD photosensitive elements of corresponding wavelengths receive light of corresponding wavelengths. Therefore, fabric information carried by different wavelengths will not interfere with each other, but will be recorded by different CCD photosensitive elements. Therefore, the present invention realizes the use of a single color imaging CCD camera to simultaneously capture fabric information from three light sources by setting light sources of different wavelengths, and utilizes the characteristics of the CCD photosensitive element to prevent information from different light sources from interfering with each other.
[0094] Defect Detection:
[0095] The algorithm flow is relatively simple, because the R, G, and B channel images of the RGB image collected by the CCD are obtained by R, G, and B three-color lighting lamps respectively, so the R, G, and B channel images of the collected image are used as the input of the deep learning model, and the defect detection is performed through the network model obtained by learning. This method collects fabric images from three directions of light source, but does not increase any computational complexity. Compared with the input of three images with 9 channels of information, this method reduces the computational complexity by 67%.
[0096] Figure 8 is an overall flow chart of a data processing method provided according to an optional embodiment of the present invention, such as Figure 8 As shown, after the above steps are described, each light source can capture an image, pre-process or align the image, and then input the image into an image detection model based on various deep learning algorithms, perform post-processing and output operations on the results, and implement the data processing method provided by the optional implementation method of the present invention. It should be noted that other light source structures and imaging methods can be used in image acquisition in the above optional embodiment of the present invention, and other detection algorithms can be used in defect detection. That is, for the defect detection module, the optional embodiment of the present invention designs corresponding intelligent algorithms for different imaging structures in the above image acquisition. Since the algorithm needs to process multiple images from different light source directions, in order to minimize the computational complexity, the optional embodiment of the present invention has made targeted improvements in the algorithm flow for imaging structures 1 and 2. When performing defect detection, an image detection model that is not limited to target detection methods such as SSD, FCOS, and Faster RCNN can be used to obtain the location of the fabric defect area.
[0097] Through the above optional implementation, the following beneficial effects can be achieved:
[0098] (1) Use a single camera to illuminate the fabric with light from multiple directions to obtain fabric information from different light sources, thereby reducing costs;
[0099] (2) The algorithm is related to the structure of the intelligent fabric inspection system with multi-directional light sources. The algorithm optimizes the calculation method according to the system acquisition characteristics and reduces the amount of calculation.
[0100] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0101] Through the description of the above implementation methods, those skilled in the art can clearly understand that the data processing method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.
[0102] Example 2
[0103] According to an embodiment of the present invention, a device for implementing the above-mentioned data processing method 1 is also provided. Fig. 9 is a structural block diagram of a data processing device 1 provided according to Embodiment 2 of the present invention, such as Fig. 9 As shown, the device includes: a first receiving module 902 and a first detecting module 904. The device is described below.
[0104] The first receiving module 902 is used to receive multiple image data, wherein the multiple image data are obtained by irradiating the target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; the first detection module 904 is connected to the above-mentioned first receiving module 902, and is used to perform image detection on the multiple image data to obtain defect detection results of the target object.
[0105] It should be noted that the first receiving module 902 and the first detecting module 904 correspond to steps S202 to S204 in Example 1, and the examples and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules as part of the device can be run in the computer terminal 10 provided in Example 1.
[0106] Example 3
[0107] According to an embodiment of the present invention, a device for implementing the second data processing method is also provided. Fig.10 is a structural block diagram of a data processing device 2 provided according to Embodiment 3 of the present invention. Fig.10 As shown, the device includes: a second receiving module 1002, a second detecting module 1004 and a display module 1006. The device is described below.
[0108] A second receiving module 1002 is used to receive multiple image data in the input area of the display interface, wherein the multiple image data are obtained by irradiating the target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; a second detection module 1004 is connected to the above-mentioned second receiving module 1002, and is used to receive defect detection instructions on the display interface; a display module 1006 is connected to the above-mentioned second detection module 1004, and is used to respond to defect detection instructions and display defect detection results of the target object on the display interface.
[0109] It should be noted that the second receiving module 1002, the second detection module 1004 and the display module 1006 correspond to steps S302 to S306 in Example 1, and the examples and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules as part of the device can be run in the computer terminal 10 provided in Example 1.
[0110] Example 4
[0111] According to an embodiment of the present invention, a system for implementing the above data processing method 3 is also provided. Fig.11 is a block diagram of an image detection system according to Embodiment 4 of the present invention. Fig.11 As shown, the system includes: a client device 1102 and a server device 1104. The system is described below.
[0112] The client device 1102 is used to send multiple image data to the server device, wherein the multiple image data are obtained by irradiating the target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; the server device 1104 is connected to the above-mentioned client device 1102, and is used to perform image detection on the multiple image data to obtain defect detection results of the target object.
[0113] It should be noted that the client device 1102 and the server device 1104 correspond to steps S402 to S404 in Example 1, and the examples and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules as part of the system can be run in the computer terminal 10 provided in Example 1.
[0114] Example 5
[0115] An embodiment of the present invention may provide an electronic device, which may be a terminal or a server. In this embodiment, the electronic device as a terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the terminal may also be a terminal device such as a mobile terminal.
[0116] Optionally, in this embodiment, the terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0117] Optionally, Fig.12 FIG. 1 is a block diagram of a terminal according to an exemplary embodiment. Fig.12 As shown, the terminal may include: one or more (only one is shown in the figure) processors 121, and a memory 122 for storing processor executable instructions; wherein the processor is configured to execute instructions to implement any of the above data processing methods.
[0118] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the data processing method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned data processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0119] The processor can call the information and application stored in the memory through the transmission device to execute the following steps: receiving multiple image data, wherein the multiple image data are obtained by irradiating the target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; performing image detection on the multiple image data to obtain defect detection results of the target object.
[0120] Optionally, the processor may further execute program code of the following steps: the predetermined number of cameras is a single camera.
[0121] Optionally, the processor may also execute program code of the following steps: after a plurality of image data are illuminated by light sources from different directions at different times on a target object, the image data are sensed by a single camera at corresponding different times.
[0122] Optionally, the processor may also execute program code of the following steps: performing image detection on multiple image data to obtain defect detection results of the target object, including: inputting multiple image data into a first image detection model to obtain defect detection results of the target object.
[0123] Optionally, the processor may also execute the program code of the following steps: inputting multiple image data into the first image detection model to obtain defect detection results of the target object, including: converting the RGB color space of the multiple image data into the YCbCr color space through the registration module of the first image detection model; obtaining the brightness data of the multiple image data after the conversion space and the color difference data of any image data in the multiple image data through the feature extraction module of the first image detection model; processing the brightness data of the multiple image data and the color difference data of any image data in the multiple image data through the data processing module of the first image detection model to obtain the defect detection results of the target object.
[0124] Optionally, the processor may also execute program code of the following steps: after a target object is illuminated by light sources of different wavelengths from different directions, a plurality of image data is obtained by a single camera sensing light corresponding to the different wavelengths.
[0125] Optionally, the processor may also execute program code of the following steps: performing image detection on multiple image data to obtain defect detection results of the target object, including: inputting multiple image data into a second image detection model to obtain defect detection results of the target object.
[0126] Optionally, the processor may also execute program codes of the following steps: the light sources with different wavelengths are red light, green light and blue light.
[0127] Optionally, the processor may also execute the program code of the following steps: after performing image detection on multiple image data and obtaining defect detection results of the target object, it also includes: outputting the defect detection results of the target object, wherein the defect detection results include the category of defects existing in the target object and the regional location of the defects existing in the target object.
[0128] Optionally, the processor may also execute program codes of the following steps: the target object includes: fabric.
[0129] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: receiving multiple image data in the input area of the display interface, wherein the multiple image data are obtained by irradiating the target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; receiving a defect detection instruction on the display interface; and responding to the defect detection instruction to display the defect detection result of the target object on the display interface.
[0130] The processor can call the information and application stored in the memory through the transmission device to execute the following steps: the client device sends multiple image data to the server device, wherein the multiple image data are obtained by irradiating the target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; the server device performs image detection on the multiple image data to obtain defect detection results of the target object.
[0131] In an embodiment of the present invention, the electronic device is used as a server. Fig.13 FIG. 1 is a structural block diagram of a server according to an exemplary embodiment. Fig.13 As shown, the server 130 may include: one or more (only one is shown in the figure) processing components 131, a memory 132 for storing executable instructions of the processing component 131, a power supply component 133 for providing power, a network interface 134 for communicating with an external network, and an I / O input and output interface 135 for data transmission with the outside; wherein the processing component 131 is configured to execute instructions to implement any of the above-mentioned data processing methods.
[0132] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the data processing method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned data processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0133] The processing component can call the information and application stored in the memory through the transmission device to execute the following steps: receiving multiple image data, wherein the multiple image data are obtained by irradiating the target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; performing image detection on the multiple image data to obtain defect detection results of the target object.
[0134] Optionally, the processing component may also execute program code of the following steps: the predetermined number of cameras is a single camera.
[0135] Optionally, the processing component may also execute program code of the following steps: after a plurality of image data are irradiated on a target object by light sources from different directions at different times, the image data are sensed by a single camera at corresponding different times.
[0136] Optionally, the processing component may also execute the following program code: perform image detection on multiple image data to obtain defect detection results of the target object, including: inputting multiple image data into a first image detection model to obtain defect detection results of the target object.
[0137] Optionally, the processing component may also execute the program code of the following steps: inputting multiple image data into the first image detection model to obtain defect detection results of the target object, including: converting the RGB color space of the multiple image data into the YCbCr color space through the registration module of the first image detection model; obtaining the brightness data of the multiple image data after the conversion space and the color difference data of any image data in the multiple image data through the feature extraction module of the first image detection model; processing the brightness data of the multiple image data and the color difference data of any image data in the multiple image data through the data processing module of the first image detection model to obtain the defect detection results of the target object.
[0138] Optionally, the processing component may also execute program code of the following steps: after a plurality of image data are irradiated on a target object by light sources of different wavelengths from different directions, a single camera is used to sense the light corresponding to the different wavelengths to obtain the image data.
[0139] Optionally, the processing component may also execute program code of the following steps: performing image detection on multiple image data to obtain defect detection results of the target object, including: inputting multiple image data into a second image detection model to obtain defect detection results of the target object.
[0140] Optionally, the processing component may also execute program codes of the following steps: the light sources with different wavelengths are red light, green light and blue light.
[0141] Optionally, the above-mentioned processing component can also execute the program code of the following steps: after performing image detection on multiple image data to obtain the defect detection result of the target object, it also includes: outputting the defect detection result of the target object, wherein the defect detection result includes the category of the defect existing in the target object and the regional location of the defect existing in the target object.
[0142] Optionally, the processing component may also execute program codes of the following steps: the target object includes: fabric.
[0143] The processing component can call the information and application stored in the memory through the transmission device to perform the following steps: receiving multiple image data in the input area of the display interface, wherein the multiple image data are obtained by irradiating the target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; receiving a defect detection instruction on the display interface; and responding to the defect detection instruction to display the defect detection result of the target object on the display interface.
[0144] The processing component can call the information and application stored in the memory through the transmission device to perform the following steps: the client device sends multiple image data to the server device, wherein the multiple image data are obtained by irradiating the target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; the server device performs image detection on the multiple image data to obtain defect detection results of the target object.
[0145] It can be understood by those skilled in the art that Fig.12 , Fig.13 The structure shown is for illustration only. For example, the terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (MID), a PAD, or other terminal devices. Fig.12 , Fig.13 It does not limit the structure of the above electronic device. Fig.12 , Fig.13 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.12 , Fig.13 Different configurations are shown.
[0146] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0147] Example 6
[0148] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, and when the instructions in the computer-readable storage medium are executed by a processor of a terminal, the terminal is enabled to perform any of the above data processing methods. Optionally, the computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0149] Optionally, in this embodiment, the computer-readable storage medium may be used to store program codes executed by the data processing method provided in the above embodiment.
[0150] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group.
[0151] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: receiving multiple image data, wherein the multiple image data are obtained by irradiating a target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; performing image detection on the multiple image data to obtain defect detection results of the target object.
[0152] Optionally, in this embodiment, the computer readable storage medium is configured to store program code for executing the following steps: the predetermined number of cameras is a single camera.
[0153] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: multiple image data are obtained by a single camera sensing a target object at corresponding different times after the target object is illuminated by light sources from different directions at different times.
[0154] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: performing image detection on multiple image data to obtain defect detection results of the target object, including: inputting multiple image data into a first image detection model to obtain defect detection results of the target object.
[0155] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: inputting multiple image data into a first image detection model to obtain a defect detection result of a target object, including: converting the RGB color space of the multiple image data into a YCbCr color space through a registration module of the first image detection model; obtaining brightness data of the multiple image data after the conversion space, and color difference data of any image data in the multiple image data through a feature extraction module of the first image detection model; processing the brightness data of the multiple image data and the color difference data of any image data in the multiple image data through a data processing module of the first image detection model to obtain a defect detection result of the target object.
[0156] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: after a plurality of image data are irradiated on a target object by light sources of different wavelengths from different directions, a single camera is used to sense light corresponding to different wavelengths to obtain the image data.
[0157] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: performing image detection on multiple image data to obtain defect detection results of the target object, including: inputting multiple image data into a second image detection model to obtain defect detection results of the target object.
[0158] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: the light sources with different wavelengths are red light, green light and blue light.
[0159] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: after performing image detection on multiple image data to obtain defect detection results of the target object, it also includes: outputting the defect detection results of the target object, wherein the defect detection results include the category of defects existing in the target object and the regional location of the defects existing in the target object.
[0160] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: the target object includes: fabric.
[0161] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: receiving multiple image data in the input area of the display interface, wherein the multiple image data are obtained by irradiating the target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; receiving a defect detection instruction on the display interface; and in response to the defect detection instruction, displaying the defect detection result of the target object on the display interface.
[0162] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: the client device sends multiple image data to the server device, wherein the multiple image data are obtained by irradiating the target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; the server device performs image detection on the multiple image data to obtain defect detection results of the target object.
[0163] In an exemplary embodiment, a computer program product is also provided. When a computer program in the computer program product is executed by a processor of an electronic device, the electronic device is enabled to perform any of the above data processing methods.
[0164] In the several embodiments provided in the present application, it should be understood that the technical content disclosed by the data processing method of the present application can be implemented in other ways. Among them, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0165] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0166] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0167] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0168] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A data processing method, characterized in that: include: Receiving a plurality of image data, wherein the plurality of image data is obtained by irradiating a target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; Performing image detection on the plurality of image data to obtain a defect detection result of the target object; Among them, performing image detection on the multiple image data to obtain the defect detection result of the target object includes: converting the RGB color space of the multiple image data into the YCbCr color space through the alignment module of the first image detection model; obtaining the brightness data of the multiple image data after the conversion space, and the color difference data of any image data in the multiple image data through the feature extraction module of the first image detection model; processing the brightness data of the multiple image data and the color difference data of any image data in the multiple image data through the data processing module of the first image detection model to obtain the defect detection result of the target object.
2. The method according to claim 1, characterized in that: The predetermined number of cameras is a single camera.
3. The method according to claim 2, characterized in that The plurality of image data are obtained by the single camera sensing the target object at corresponding different times after the target object is illuminated by light sources from different directions at different times.
4. The method according to claim 2, characterized in that: The plurality of image data are obtained after the target object is irradiated by light sources of different wavelengths in different directions, and then the single camera senses the light corresponding to the different wavelengths.
5. The method according to claim 4, characterized in that Performing image detection on the plurality of image data to obtain a defect detection result of the target object includes: The plurality of image data are input into a second image detection model to obtain a defect detection result of the target object.
6. The method according to claim 4, characterized in that The light sources with different wavelengths are red light, green light and blue light.
7. The method according to any one of claims 1 to 6, characterized in that After performing image detection on the plurality of image data to obtain a defect detection result of the target object, the method further includes: Outputting a defect detection result of the target object, wherein the defect detection result includes a category of the defect existing on the target object and a regional location of the defect existing on the target object.
8. The method according to claim 7, characterized in that The target object includes: fabric.
9. A data processing method, characterized in that: include: Receiving a plurality of image data in an input area of a display interface, wherein the plurality of image data is obtained by irradiating a target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; receiving a defect detection instruction on the display interface; In response to the defect detection instruction, displaying the defect detection result of the target object on the display interface; Among them, the defect detection result is obtained in the following manner: through the registration module of the first image detection model, the RGB color space of the multiple image data is converted into the YCbCr color space; through the feature extraction module of the first image detection model, the brightness data of the multiple image data after the conversion space and the color difference data of any image data in the multiple image data are obtained; through the data processing module of the first image detection model, the brightness data of the multiple image data and the color difference data of any image data in the multiple image data are processed to obtain the defect detection result of the target object.
10. A data processing method, characterized in that: include: The client device sends a plurality of image data to the server device, wherein the plurality of image data is obtained by irradiating a target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; The server device performs image detection on the plurality of image data to obtain a defect detection result of the target object; Among them, the server-side device performs image detection on the multiple image data to obtain the defect detection result of the target object, including: converting the RGB color space of the multiple image data into the YCbCr color space through the alignment module of the first image detection model; obtaining the brightness data of the multiple image data after the conversion space, and the color difference data of any image data in the multiple image data through the feature extraction module of the first image detection model; processing the brightness data of the multiple image data and the color difference data of any image data in the multiple image data through the data processing module of the first image detection model to obtain the defect detection result of the target object.
11. A data processing device, characterized in that: include: A first receiving module is used to receive a plurality of image data, wherein the plurality of image data are obtained by irradiating a target object with light sources from different directions and then being sensed by a predetermined number of cameras, wherein the predetermined number is less than the number of light sources; A first detection module, configured to perform image detection on the plurality of image data to obtain a defect detection result of the target object; Among them, the first detection module is also used to convert the RGB color space of the multiple image data into the YCbCr color space through the alignment module of the first image detection model; obtain the brightness data of the multiple image data after the conversion space, and the color difference data of any image data among the multiple image data through the feature extraction module of the first image detection model; process the brightness data of the multiple image data and the color difference data of any image data among the multiple image data through the data processing module of the first image detection model to obtain the defect detection result of the target object.
12. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the data processing method according to any one of claims 1 to 10.
Citation Information
Patent Citations
SoC software and hardware collaborative design-based cloth surface blemish detection method
CN105678767A
Visual detection method and detection device for concave-convex defects of object
CN109596637A
Surface defect acquisition system, surface defect detection method and device and storage medium
CN110243831A
Configurable intelligent visual detection system and method based on standard industrial camera
CN111781203A
Surface defect detection method, device and equipment and storage medium
CN112669318A
