DETECTION METHOD, DETECTION APPARATUS, ELECTRONIC DEVICE, AND STORAGE MEDIUM
The detection method automates yarn package inspection by comparing entry and exit images using mask plates, addressing inefficiencies and missed inspections in manual processes.
Patent Information
- Application Number
- JP2025108353
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2024-06-27
- Filing Date
- 2025-06-26
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-06-26
AI Technical Summary
Manual inspection of yarn packages on winding package carts is inefficient and prone to high rates of missed inspections during transportation and storage.
A detection method and apparatus that utilizes image acquisition and processing to compare entry and exit images of yarn packages on carts, using mask plates to identify differences and obtain detection information, thereby automating the inspection process.
Reduces the rate of missed inspections by automating the detection of yarn packages entering and exiting designated areas, enhancing efficiency and reducing labor reliance.
Smart Images

Figure 0007781332000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to the field of data processing technology, and in particular to a detection method, a detection apparatus, an electronic device, and a storage medium. [Background technology]
[0002] In the yarn package manufacturing industry, before packaging, the produced yarn packages are usually transported to a designated area (e.g., a warehouse) by a yarn package cart and stored there. After being stored for a certain period of time, the yarn package cart carrying the yarn packages is removed from the designated area to carry out subsequent processes such as packaging. During storage, it is necessary to ensure that the yarn packages on the yarn package cart are not removed so as not to affect the subsequent packaging process. Summary of the Invention [Problem to be solved by the invention]
[0003] In this way, when a winding package cart carrying a winding package leaves this designated area, the winding package cart may be manually inspected, and this manual inspection method is clearly inefficient and has a high rate of missed inspections. [Means for solving the problem]
[0004] The present disclosure provides detection methods, detection apparatus, electronic devices, and storage media to solve or alleviate one or more technical problems in the prior art.
[0005] According to a first aspect of the present disclosure, there is provided a detection method applied to a cloud terminal, the method comprising: When detecting that the target wound yarn package cart has exited the target area, a first entry image and a first exit image are acquired, wherein the first entry image is acquired by collecting images of the target wound yarn package cart after the target wound yarn package cart has entered the target area, and the first exit image is acquired by collecting images of the target wound yarn package cart after the target wound yarn package cart has left the target area, and both the first entry image and the first exit image include all wound yarn packages placed on the target wound yarn package cart; acquiring a target approach mask image of the first approach image and a target exit mask image of the first exit image, wherein the target approach mask image of the first approach image is an image obtained by masking an area in the first approach image where each winding package is located using at least a mask plate, and the target exit mask image of the first exit image is an image obtained by masking an area in the first exit image where each winding package is located using at least a mask plate; and obtaining detection information of the target wound yarn package carriage based on difference information between the target approach mask image and the target exit mask image.
[0006] According to a second aspect of the present disclosure, there is provided a detection device applicable to a cloud terminal, the device comprising: an information acquisition unit; and a detection unit; the information acquisition unit is used for: acquiring a first entry image and a first exit image when detecting that a target wound thread package cart has exited a target area, wherein the first entry image is obtained by collecting images of the target wound thread package cart after it has entered the target area, and the first exit image is obtained by collecting images of the target wound thread package cart after it has left the target area, and both the first entry image and the first exit image include all wound thread packages placed on the target wound thread package cart; acquiring a target entry mask image of the first entry image and acquiring a target exit mask image of the first exit image, wherein the target entry mask image of the first entry image is an image obtained by masking areas in the first entry image where each wound thread package is located using at least a mask plate, and the target exit mask image of the first exit image is an image obtained by masking areas in the first exit image where each wound thread package is located using at least a mask plate; The detection unit is used to obtain detection information of the target wound yarn package carriage based on difference information between the target approach mask image and the target exit mask image.
[0007] According to a third aspect of the present disclosure, there is provided an electronic device, the device comprising: at least one processor; a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, cause the implementation of any one of the methods in the embodiments of the present disclosure.
[0008] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform any one of the methods in the embodiments of the present disclosure.
[0009] According to a fifth aspect of the present disclosure, there is provided a program, which, when executed by a processor, implements any one of the methods in the embodiments of the present disclosure.
[0010] According to the solution disclosed herein, the target entering mask image of the acquired first entering image and the target exiting mask image of the acquired first exiting image are used to obtain difference information between the two (for example, this difference information may represent the difference between the wound yarn package in the first exiting image and the first entering image), and detection information for the target wound yarn package can be obtained based on the difference information.In this way, compared to the conventional manual sampling inspection method, the solution disclosed herein can complete the inspection of the wound yarn package on the target wound yarn package cart without relying on human labor, thereby realizing automation and intelligence of the entire process.The solution disclosed herein can perform complete detection of wound yarn package carts entering and exiting the target area, effectively reducing the rate of missed inspections.
[0011] It should be understood that the contents described herein are not intended to describe key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will be better understood through the following specification. [Brief explanation of the drawings]
[0012] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the accompanying drawings indicate the same or similar components or elements. The accompanying drawings are not necessarily drawn to scale. It should be understood that the drawings illustrate only some examples provided by the present disclosure and should not be considered as limiting the scope of the present disclosure.
[0013] [Figure 1] 1 is a schematic flowchart of a detection method according to an embodiment of the present disclosure. [Figure 2] FIG. 1 is a front view of a target wound yarn package carriage according to one embodiment of the present disclosure. [Figure 3]FIG. 1 is a side view of a target wound yarn package carriage according to one embodiment of the present disclosure. [Figure 4] 10 is a schematic diagram illustrating an approach image corresponding to a placement area on one side of a target wound yarn package carriage according to an embodiment of the present disclosure. FIG. [Figure 5] 5 is a schematic diagram illustrating an image obtained by processing the image shown in FIG. 4 using a mask plate according to an embodiment of the present disclosure. [Figure 6] 5 is a schematic diagram showing an exit image corresponding to a placement area on one side (the same side as in FIG. 4) of a target wound yarn package carriage according to an embodiment of the present disclosure. FIG. [Figure 7] 7 is a schematic diagram illustrating an image obtained by processing the image shown in FIG. 6 using a mask plate according to an embodiment of the present disclosure. [Figure 8] FIG. 1 is a schematic diagram illustrating an application scenario of an example of a detection method according to an embodiment of the present disclosure. [Figure 9] 2 is a second schematic flowchart of a detection method according to an embodiment of the present disclosure. [Figure 10] 1 is a schematic flow chart for obtaining a target approach mask image with landmark information according to one embodiment of the present disclosure. [Figure 11] 1 is a schematic flow chart for obtaining a target exit mask image with landmark information according to an embodiment of the present disclosure. [Figure 12] FIG. 2 is a schematic diagram illustrating a model structure of a target detection model according to an embodiment of the present disclosure. [Figure 13] FIG. 1 is a schematic diagram illustrating segmentation of a halftone dot presentation image according to an embodiment of the present disclosure. [Figure 14] FIG. 2 is a schematic diagram illustrating a prior knowledge feature layer included in a target detection model according to one embodiment of the present disclosure. [Figure 15] FIG. 2 is a schematic diagram illustrating a similarity map prior knowledge layer included in a semantics prior knowledge layer according to one embodiment of the present disclosure. [Figure 16] 1 is a schematic diagram illustrating a configuration of a detection device according to an embodiment of the present disclosure. [Figure 17] FIG. 1 is a block diagram of an electronic device for implementing a detection method according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0014] The present disclosure will now be described in more detail with reference to the accompanying drawings, in which like reference numerals represent like or similar elements and in which various aspects of the embodiments are shown, and which, unless otherwise noted, are not necessarily drawn to scale.
[0015] Furthermore, in order to better explain the present disclosure, many specific details are described in the following specific examples. Those skilled in the art should understand that the present disclosure can be similarly implemented without some details. In some examples, methods, means, components, circuits, etc. that are well known to those skilled in the art are not described in detail so that the gist of the present disclosure is clear.
[0016] The solution of the present disclosure proposes a detection method to reduce the rate of missed inspection of wound yarn packages.
[0017] 1 is a schematic flow chart of a detection method according to an embodiment of the present disclosure, which can be selectively applied to electronic devices such as personal computers, servers, server clusters, etc.
[0018] Furthermore, the method includes at least part of the following: As shown in FIG. In step S101, when it is detected that the target wound yarn package carriage has left the target area, a first entering image and a first exiting image are acquired.
[0019] Here, the first entry image is obtained by collecting images of the target wound yarn package cart after it enters the target area, and the first exit image is obtained by collecting images of the target wound yarn package cart after it leaves the target area.
[0020] Furthermore, both the first entering image and the first exiting image include all wound yarn packages placed on the target wound yarn package cart.
[0021] 2 and 3, both sides of the target wound yarn package cart are provided with placement areas for placing several wound yarn packages. In this case, after the target wound yarn package cart enters the target area, images can be collected from the placement areas on both sides of the target wound yarn package cart to obtain entry images corresponding to each side, where the entry images corresponding to each side include all of the wound yarn packages placed in the placement areas on that side. Furthermore, the images of the placement areas on both sides can be stitched together to obtain a first entry image including all of the wound yarn packages placed on the target wound yarn package cart.
[0022] Correspondingly, in another example, after the target wound yarn package cart leaves the target area, images are similarly collected for the loading areas on both sides of the target wound yarn package cart, and exit images corresponding to each side are again obtained, and then the exit images of the loading areas on both sides are stitched together to obtain a first exit image including all wound yarn packages placed on the target wound yarn package cart.
[0023] Furthermore, the joining rules for the first entering image and the first exiting image are similar, which makes it easier to compare the two images in the future and obtain detection information for the target wound yarn package cart.
[0024] It should also be understood that after obtaining the images of each side, the images are not stitched together, but the entering image of the same side is directly set as the first entering image, and the exiting image of the same side is set as the first exiting image, and the entering image and exiting image of the same side are compared, and once the comparison is completed on both sides, detection information for the target wound yarn package cart can be obtained.
[0025] In one example, the target area may be a placement area in a specific wound yarn package production workshop, or may be an area where a warehouse is located that is used to temporarily store the target wound yarn package, and the present disclosure is not limited thereto.
[0026] In step S102, a target entry mask image of the first entry image is obtained, and a target exit mask image of the first exit image is obtained.
[0027] Here, the target approach mask image of the first approach image is obtained by masking the area in the first approach image where the winding packages are located using at least a mask plate. Furthermore, the number of mask plates in the target approach mask image of the first approach image correlates with the number of winding packages in the first approach image and also correlates with the number of winding packages on the target winding package cart. For example, in one example, the number of mask plates in the target approach mask image of the first approach image, the number of winding packages in the first approach image, and the number of winding packages on the target winding package cart are all the same.
[0028] Correspondingly, the target exit mask image of the first exit image is an image in which at least the area in the first exit image where each winding package is located is masked using a mask plate. Furthermore, the number of mask plates in the target exit mask image of the first exit image correlates with the number of winding packages in the first exit image and also correlates with the number of target winding packages. In one example, the number of mask plates in the target exit mask image of the first exit image, the number of winding packages in the first exit image, and the number of winding packages on the target winding package cart are all the same.
[0029] In step S103-4, detection information of the target wound yarn package carriage is obtained based on difference information between the target approach mask image and the target exit mask image.
[0030] For example, Fig. 4 is a schematic diagram showing a first entering image obtained by collecting images of a mounting area on one side of a target wound yarn package carriage. The first entering image includes nine wound yarn packages. After a mask plate is used to mask the areas in the first entering image where each wound yarn package is located, the target entering mask image shown in Fig. 5 is obtained. Correspondingly, Fig. 6 is a schematic diagram showing a first exiting image obtained by collecting images of a mounting area on one side (the same side as Fig. 4) of a target wound yarn package carriage. The first exiting image includes eight wound yarn packages. After a mask plate is used to mask the areas in the first exiting image where each wound yarn package is located, the target exiting mask image shown in Fig. 7 is obtained.
[0031] Note that one wound yarn package is missing from the first exit image shown in Figure 6. In this case, the area where the wound yarn package is missing is not recognized as an area that requires masking. In other words, the placement position where the wound yarn package is missing is not masked, which is useful for subsequent detection.
[0032] Furthermore, based on the difference information between the obtained target entry mask image and the target exit mask image, detection information of the target winding package cart is obtained, for example, based on the difference in the number of winding packages between the target entry mask image and the target exit mask image, detection information of the target winding package cart is obtained, for example, if the number of winding packages on both sides is the same, it is considered that the current side has passed the detection and detection of the next side continues; otherwise, it is considered that the detection has not passed and presentation information can be generated to present manual detection.
[0033] In this way, the solution disclosed herein uses the acquired target entering mask image of the first entering image and the target exiting mask image of the first exiting image to obtain difference information between the two (for example, this difference information may represent the difference between the wound yarn package in the first exiting image and the first entering image), and then obtains detection information for the target wound yarn package based on the difference information. Thus, compared to the conventional manual sampling inspection method, the solution disclosed herein can complete the inspection of the wound yarn package on the target wound yarn package carrier without relying on human labor, thereby realizing automation and intelligence of the entire process. According to the solution disclosed herein, complete detection of wound yarn package carriers entering and exiting the target area can be performed, effectively reducing the rate of missed inspections.
[0034] In one specific example of the solution of the present disclosure, image collection may include the following: Specifically, when it is detected that the above-mentioned target wound yarn package carriage has exited the target area, before acquiring the first entering image and the first exiting image (e.g., before the above step S101):
[0035] In method 1, when it is detected that the target wound yarn package cart has entered the start position of the target area, an image collection device located at the start position of the target area is activated and images are collected of the wound yarn package placement area of the target wound yarn package cart.
[0036] In method 2, when it is detected that the target wound yarn package cart has left the target area, an image collection device located at the end position of the target area is activated and images are collected of the wound yarn package placement area on the target wound yarn package cart.
[0037] In method 3, when it is detected that the target wound yarn package cart has entered the start position of the target area, an image collecting device located at the start position of the target area is activated to collect images of the wound yarn package placement area on the target wound yarn package cart, and when it is detected that the target wound yarn package cart has left the target area, an image collecting device located at the end position of the target area is activated to collect images of the wound yarn package placement area on the target wound yarn package cart.
[0038] Here, the image collection component (e.g., image collection component 1 or image collection component 2) in this example may specifically include a camera. For example, the first entry image is obtained by using a camera to collect images of a wound yarn package placement area of a target wound yarn package cart that is about to enter the target area. For example, the first entry image is obtained by using a camera to photograph the wound yarn package placement area of the target wound yarn package cart. Alternatively, video is collected for a predetermined length of time of the wound yarn package placement area of the target wound yarn package cart that is about to enter the target area to obtain multiple consecutive video frames, and one image is selected from the consecutive video frames to be used as the first entry image. Correspondingly, the method of obtaining the first exit image is the same as the method described above, and will not be described again here.
[0039] 8, a sensing component 1 and an image collecting component 1 are provided at the start position (e.g., entrance) of the target area, the sensing component 1 is used to detect whether the target wound yarn package cart has reached the start position, and the image collecting component 1 is used to collect images of the wound yarn package placement area of the target wound yarn package cart that has reached the start position. Similarly, a sensing component 2 and an image collecting component 2 are provided at the end position (e.g., exit) of the target area, the sensing component 2 is used to detect whether the target wound yarn package cart has left the target area, and the image collecting component 2 is used to collect images of the wound yarn package placement area of the target wound yarn package cart that has left the target area. For example, in one example, first, when the sensing component 1 detects that the target wound yarn package cart has reached the start position of the target area, it transmits a first detection signal to the cloud (or server). Next, the cloud generates a first collection signal in response to the first detection signal and transmits it to the image collection component 1, causing the image collection component 1 to collect images of the wound yarn package placement area of the target wound yarn package cart. Finally, after receiving the entry image collected by the image collection component 1, the cloud performs detection on the entry image to obtain a target entry mask image of the entry image. Correspondingly, a target exit mask image of the exit image can be obtained. At this time, the cloud can obtain detection information after the target wound yarn package cart has passed the target area based on difference information between the obtained target entry mask image and the target exit mask image.
[0040] In this way, the present disclosure enables timely acquisition of relevant images of the wound yarn package placement area on the target wound yarn package cart when the target wound yarn package cart reaches a specified position (e.g., the entrance or exit of the target area), thus laying the foundation for subsequently quickly acquiring detection information of the target wound yarn package cart based on image detection.
[0041] 9 is a second schematic flowchart of a detection method according to an embodiment of the present disclosure. This method can be selectively applied to electronic devices such as personal computers, servers, and server clusters. The relevant content of the methods shown in FIGS. 1 to 8 above can also be applied to this embodiment and will not be repeated in this embodiment.
[0042] Furthermore, the method includes at least part of the following content: As shown in FIG. In step S901, when it is detected that the target wound yarn package carriage has left the target area, a first entering image and a first exiting image are acquired.
[0043] Here, the first entry image is obtained by collecting images of the target wound yarn package cart after it enters the target area, and the first exit image is obtained by collecting images of the target wound yarn package cart after it leaves the target area, and both the first entry image and the first exit image include all wound yarn packages placed on the target wound yarn package cart.
[0044] In step S902, the first approach image is input into a target detection model to obtain an initial approach mask image of the first approach image.
[0045] Here, the target detection model identifies the area in the input image where each winding package is located based on a preset winding package prompt, and masks the area in the image where each winding package is located using a mask plate to obtain a masked image.
[0046] Furthermore, in this example, the number of mask plates included in the initial entry mask image of the first entry image is the same as the number of winding packages actually included in the first entry image, which is useful for subsequently comparing the differences using the mask image, thereby improving the reliability and accuracy of the detection results of the target winding package cart.
[0047] In step S903, based on the label information of the target wound yarn package carriage, label information of the wound yarn packages to be placed at each placement position of the target wound yarn package carriage is obtained.
[0048] In this example, the winding yarn packages to be placed by each placement position in the target area of the target winding yarn package carrier may refer to the winding yarn packages that are placed by each placement position according to a predetermined placement rule (or order), i.e., the winding yarn packages that should theoretically be placed by each placement position. Based on this, after obtaining the identification information of the target winding yarn package carrier, the identification information of the winding yarn packages that are theoretically placed by each placement position on the target winding yarn package carrier can be obtained, thus laying the foundation for subsequent rapid detection or rapid targeting of specific problems.
[0049] Here, the execution order of step S902 and step S903 can be reversed or can be executed synchronously, and the present disclosure is not limited thereto.
[0050] In step S904, the label information of the wound yarn package to be placed at each placement position of the target wound yarn package cart is mapped to a mask plate at a different position in the initial entry mask image to obtain a target entry mask image with label information of the wound yarn package corresponding to the first entry image.
[0051] Here, the target approach mask image with label information of the winding packages corresponding to the first approach image can represent the label information of each winding package actually included in the first approach image.
[0052] In step S905, the first exit image is input into a second target detection model to obtain an initial exit mask image of the first exit image. Here, the number of mask plates included in the initial exit mask image of the first exit image is the same as the number of wound yarn packages actually included in the first exit image.
[0053] In step S906, the label information of the wound yarn package to be placed at each placement position of the target wound yarn package cart is mapped to each mask plate at a different position in the initial exit mask image to obtain a target exit mask image with label information of the wound yarn package corresponding to the first exit image.
[0054] Here, the target exit mask image with label information of the wound yarn packages corresponding to the first exit image can represent the label information of each wound yarn package actually included in the first exit image.
[0055] The above-mentioned "mapping" can refer to adding the label information of the wound yarn package to the placement position where the wound yarn package should theoretically be located based on a predetermined placement rule. Furthermore, since each wound yarn package in the mask image is masked by a mask plate, the above-mentioned "mapping" can further refer to adding the label information of the wound yarn package to the mask plate on the placement position where the wound yarn package should theoretically be located based on a predetermined placement rule.
[0056] For example, as shown in Figure 10, using a target detection model, an initial entry mask image is obtained by masking the area in the first entry image where each wound yarn package is located using a mask plate, and then, after obtaining the label information of the wound yarn package that will theoretically be placed at each placement position of the target wound yarn package cart, the label information of the wound yarn package is added to the mask plate of the placement position in the initial entry mask image where the wound yarn package should theoretically be located based on a predetermined placement rule, thereby obtaining a target entry mask image with the label information of the wound yarn package.
[0057] Furthermore, as shown in Figure 11, using a target detection model, an initial exit mask image is obtained in which the area in the first exit image where each wound yarn package is located is masked using a mask plate, and after obtaining the label information of the wound yarn package that will theoretically be placed at each placement position of the target wound yarn package cart, the label information of the wound yarn package is added to the mask plate of the placement position in the initial exit mask image where the wound yarn package should theoretically be located based on a predetermined placement rule, thereby obtaining a target exit mask image with label information of the wound yarn package.
[0058] 11, since there is a missing winding package, there is no corresponding mask at the placement position where the missing winding package is located in the initial exit mask image. In this case, the mark information of the missing winding package can be added to the placement position where the missing winding package should theoretically be located in the initial exit mask image, thus laying the foundation for quick targeting of subsequent specific problems.
[0059] In this example, the execution steps of acquiring a target exit mask image and acquiring a target entry mask image can be interchanged or executed synchronously, and the present disclosure is not particularly limited to this execution order.
[0060] In step S907, detection information of the target wound yarn package carriage is obtained based on difference information between the target approach mask image and the target exit mask image.
[0061] In this way, the solution disclosed herein first uses a model to detect collected images (e.g., a first entry image and a first exit image) to obtain an initial entry mask image and an initial exit mask image, then maps the yarn package label information to the initial entry mask image and the initial exit mask image to obtain a target entry mask image with the yarn package label information and a target exit mask image with the yarn package label information, and finally obtains detection information for the target yarn package carrier based on the difference information between the two. The above process can quickly complete the detection without relying on human labor, making the entire process automated and intelligent, thereby significantly reducing labor and time costs and reducing the rate of missed inspections.
[0062] Furthermore, in one specific example, the detection information of the target winding package cart can be obtained as follows, and thus the detection information can be quickly obtained to ensure the normal operation of the subsequent winding package. Specifically, obtaining the detection information for the target winding package cart based on the difference information between the target entering mask image and the target exiting mask image (for example, step S907) specifically includes the following steps:
[0063] In step S907-1, a target exit mask image with label information of the wound yarn package corresponding to the first exit image is compared with a target entry mask image with label information of the wound yarn package corresponding to the first entry image to obtain a comparison result.
[0064] In step S907-2, it is determined based on the comparison result whether there is a missing wound yarn package on the target wound yarn package carriage, and if so, step S907-3 is executed, while if not, step S907-4 is executed.
[0065] In step S907-3, if there is a missing wound yarn package on the target wound yarn package cart, detection information is obtained that the target wound yarn package cart has not passed detection, and notification information can also be generated to prompt an operator for further inspection.
[0066] In step S907-4, if there is no missing wound yarn package on the target wound yarn package carriage, detection information indicating that the detection of the target wound yarn package carriage has been passed is obtained.
[0067] Furthermore, for a target winding package cart that has a winding package placement area on both sides and has a winding package placed on both sides, detection information indicating that the target winding package cart has passed detection can be generated only if it is determined that both sides have passed detection.
[0068] In this way, the solution disclosed herein can quickly obtain the detection information of the target wound yarn package carriage based on the comparison result between the target exit mask image and the target entry mask image, and this process can be completed quickly without relying on human labor, realizing automation and intelligence of the entire process, thereby significantly reducing labor costs and time costs and reducing the rate of missed inspections.
[0069] Furthermore, in one example, the target detection model may be a Segment Anything Model (SAM) based on prior knowledge information, or may be any other model capable of generating a mask image, and the present disclosure is not limited thereto.
[0070] Furthermore, in one example, as shown in FIG. 12, the target detection model includes at least a prior knowledge feature layer, a halftone dot segmentation layer, and an image segmentation layer.
[0071] Specifically, in one example, the prior knowledge feature layer is used to obtain target prior information based on a preset yarn package prompt and an input target image, where the target image is the first entering image or the first exiting image, where the target prior knowledge information can be used to guide the image segmentation layer to identify the yarn package and segment and cut out the area where the yarn package is located, thereby enhancing the identification and segmentation capabilities of the image segmentation layer and ultimately generating a mask.
[0072] In yet another example, the halftone dot division layer is used to divide a halftone dot presentation image to obtain a plurality of target sub-images, each having a designated halftone dot position, where the halftone dot positions in different target sub-images do not overlap. The halftone dot presentation image is obtained by processing a target image input using halftone dots. For example, as shown in FIG. 13, a target image input using halftone dots, such as the first approach image shown in FIG. 4, is first processed to obtain a halftone dot presentation image corresponding to the first approach image. The resulting halftone dot presentation image is then divided, for example, by rows, to obtain a plurality of target sub-images, with the halftone dots between each target sub-image not overlapping. This facilitates batch image processing of each target sub-image, effectively avoiding repeated recognition, and laying the foundation for further improving identification efficiency.
[0073] Furthermore, in a further example, the image segmentation layer identifies thread packages in each sub-image to be processed based on the target prior knowledge information and segments the area where each thread package is located, and then masks the area where each thread package is located in the sub-image to be processed using a mask plate to obtain a sub-mask image of each sub-image to be processed.After obtaining the sub-mask image of each sub-image to be processed, the image segmentation layer is used to, for example, connect the sub-mask images of each sub-image to be processed based on the sub-mask image of each sub-image to be processed to obtain an initial mask image of the target image.Here, when the target image is a first entry image, an initial entry mask image can be obtained by the above-mentioned processing, and similarly, when the target image is a first exit image, an initial exit mask image can be obtained by the above-mentioned processing.
[0074] As a result, the solution disclosed herein can utilize target prior knowledge information to enhance the identification and segmentation capabilities of the image segmentation layer, and can realize batch image processing based on halftone dot presentation images, thereby improving segmentation efficiency, thereby laying the foundation for automatically and intelligently obtaining detection information for the target wound yarn package cart and laying the foundation for improving inspection efficiency.
[0075] In one specific example of the present disclosure, the prior knowledge feature layer includes at least a semantics prior knowledge layer and a similarity map prior knowledge layer.
[0076] Here, in one example, the semantic prior knowledge layer is used to obtain semantic prior knowledge features based on at least a winding package feature corresponding to a preset winding package prompt, for example, in one example, a winding package feature corresponding to a preset winding package prompt can be directly used as a semantic prior knowledge feature.
[0077] In addition, in another example, the semantic prior knowledge layer can also obtain semantic prior knowledge features as follows: Specifically, as shown in Fig. 14, the semantic prior knowledge layer is used to perform feature fusion between the yarn package features corresponding to the preset yarn package prompt and the image features of the target image (e.g., the global feature map of the target image) to obtain a feature map representing semantic prior knowledge (i.e., semantic prior knowledge features), for example, by element-wise multiplying the yarn package features corresponding to the preset yarn package prompt and the image features of the target image to obtain a feature map for representing semantic prior knowledge features.
[0078] In this example, if the dimension of the yarn package feature corresponding to the preset yarn package prompt does not match the dimension of the image feature of the target image, the yarn package feature corresponding to the preset yarn package prompt needs to be upsampled (e.g., bilinear interpolated) and then feature-fused so that the dimension of the processed yarn package feature matches the dimension of the image feature of the target image. In this way, the feature information of the obtained semantic prior knowledge feature is enriched, laying the foundation for further strengthening the identification and segmentation capabilities of the image segmentation layer.
[0079] Furthermore, in a further example, the similarity map prior knowledge layer is used to estimate the area in the target image where each winding package is located based on the similarity between the winding package features corresponding to a predetermined winding package prompt and the image features of the target image, thereby obtaining a target similarity map.
[0080] It should be noted that the above target prior knowledge information includes the semantic prior knowledge features and the target similarity map.
[0081] Furthermore, in one example, the similarity map prior knowledge layer can determine the second target similarity map as follows. Specifically, the similarity map prior knowledge layer is specifically used to estimate the area in the target image where each winding yarn package exists based on the similarity between the obtained semantic prior knowledge features and the image features of the target image, to obtain the target similarity map, for example, as shown in Figs. 14 and 15 : The obtained semantic prior knowledge features are subjected to an aggregation process to obtain semantic prior knowledge features after the aggregation process, for example, pixel values are added (or averaged, etc.) for each column of the feature vector representing the semantic prior knowledge features to obtain the feature vector after the aggregation process, and multiple sub-feature vectors of the global feature map of the target image are obtained, for example, in one example, the feature vector representing the global feature map is divided, for example, by each row to obtain multiple sub-feature vectors, and the dimension of each obtained sub-feature vector is the same as the dimension of the feature vector after the aggregation process, which is useful for calculating the similarity between the two, and the similarity between each sub-feature vector in the multiple sub-feature vectors and the feature vector after the aggregation process is obtained, and is used to obtain a target similarity map based on the similarity.
[0082] This allows for precise identification of the area in the target image where the yarn package is located, and then lays the foundation for accurately identifying and isolating the yarn package in the image and obtaining a mask image.
[0083] Furthermore, in one example, the prior knowledge feature layer may include a feature enhancement layer, for example, to perform feature enhancement on the target similarity map, the obtained target similarity map may be input into the feature enhancement layer to obtain a feature-enhanced target similarity map, in which case the image segmentation layer may specifically perform classification and segmentation based on the semantic prior knowledge features and the feature-enhanced target similarity map, thereby further improving the accuracy of image classification and segmentation.
[0084] Alternatively, in another example, the prior knowledge feature layer can include a labeling layer. For example, as shown in FIG. 14, the obtained target similarity map (or the feature-enhanced target similarity map) is input into the labeling layer, and a labeling process is performed on the input target similarity map to obtain a label feature map. In this case, the target prior knowledge information specifically includes the semantic prior knowledge features and the label feature map.
[0085] Here, in the label feature map (e.g., labeled with "0" and "1"), if the value of a certain region is 1, it indicates that the region is a positive region, i.e., that a yarn package or a part of a yarn package is present; otherwise, it indicates that the region is a negative region, which helps the image segmentation layer to ignore the negative region and focus on segmenting the positive region, thereby further enhancing the ability to identify and segment the yarn package, which in turn helps to more accurately identify and separate the yarn package in the image, and can effectively improve the efficiency of identification and segmentation.
[0086] It should be noted that the above-mentioned prior knowledge feature layer may include a feature enhancement layer or a labeling layer, or may include a feature enhancement layer and a labeling layer, or may include other processing layers that enhance the discrimination and segmentation capabilities, and may be configured according to the actual needs in actual applications, and the solution of the present disclosure is not limited thereto.
[0087] In this way, the solution of the present disclosure utilizes the semantic prior knowledge features and the target similarity map in the target prior knowledge information to enhance the image identification and segmentation ability of the image segmentation layer, so that the image segmentation layer can focus more on identifying and segmenting the wound yarn packages in the image, thereby effectively improving the identification accuracy and identification efficiency.
[0088] The solution of the present disclosure also provides a detection device applied to a cloud, as shown in FIG. 16 , the detection device includes: an information acquiring unit 1601; and a detecting unit 1602; the information acquisition unit 1601 is used for: acquiring a first entry image and a first exit image when detecting that a target wound thread package cart has exited a target area, the first entry image being obtained by collecting images of the target wound thread package cart after it has entered the target area, and the first exit image being obtained by collecting images of the target wound thread package cart after it has left the target area, and both the first entry image and the first exit image including all wound thread packages placed on the target wound thread package cart; acquiring a target entry mask image of the first entry image and a target exit mask image of the first exit image, the target entry mask image of the first entry image being an image obtained by masking areas in the first entry image where each wound thread package is located using at least a mask plate, and the target exit mask image of the first exit image being an image obtained by masking areas in the first exit image where each wound thread package is located using at least a mask plate; The detection unit 1602 is used for obtaining detection information of the target wound yarn package carriage based on difference information between the target entering mask image and the target exiting mask image.
[0089] In one specific example of the solution of the present disclosure, the information acquiring unit 1601 further comprises: when it is detected that the target wound yarn package carriage has entered the start position of the target area, activating an image collecting device located at the start position of the target area to collect images of an area on the target wound yarn package carriage where the wound yarn package is placed; and / or When it is detected that the target wound yarn package cart has left the target area, an image collection device located at the end position of the target area is activated to collect images of the area on the target wound yarn package cart where the wound yarn package is placed.
[0090] In one specific example of the solution of the present disclosure, the information acquiring unit 1601 specifically comprises: Inputting the first approach image into a target detection model to obtain an initial approach mask image of the first approach image, wherein the target detection model identifies an area in the input image where each winding package is located based on a preset winding package prompt, and masks the area in the image where each winding package is located using a mask plate to obtain a masked image, and the number of mask plates included in the initial approach mask image of the first approach image is the same as the number of winding packages actually included in the first approach image; obtaining, based on the mark information of the target wound yarn package carriage, mark information of the wound yarn package to be placed at each placement position of the target wound yarn package carriage; The target approach mask image with the label information of the winding package corresponding to the first approach image is obtained by mapping the label information of the winding package to be placed at each placement position of the target winding package cart onto a mask plate at a different position in the initial approach mask image, and the target approach mask image with the label information of the winding package corresponding to the first approach image can represent the label information of each winding package actually included in the first approach image.
[0091] In one specific example of the solution of the present disclosure, the information acquiring unit 1601 specifically comprises: inputting the first exit image into the target detection model to obtain an initial exit mask image of the first exit image, wherein the number of mask plates included in the initial exit mask image of the first exit image is the same as the number of wound yarn packages actually included in the first exit image; The target exit mask image with the mark information of the winding package corresponding to the first exit image is obtained by mapping the mark information of the winding package to be placed at each placement position of the target winding package cart to each mask plate at a different position in the initial exit mask image, and the target exit mask image with the mark information of the winding package corresponding to the first exit image can represent the mark information of each winding package actually included in the first exit image.
[0092] In one specific example of the solution of the present disclosure, the detection unit 1602 specifically includes: comparing a target entry mask image with label information of the winding package corresponding to the first entry image with a target exit mask image with label information of the winding package corresponding to the first exit image to determine whether a missing winding package exists; and obtaining detection information of the target wound yarn package carriage based on the comparison result.
[0093] In one specific example of the solution of the present disclosure, the target detection model includes at least a prior knowledge feature layer, a halftone dot segmentation layer, and an image segmentation layer; The prior knowledge feature layer is used to obtain target prior knowledge information according to a preset winding package prompt and an input target image, and the target image is the first entering image or the first exiting image; the halftone dot division layer is used to divide the halftone dot presentation image to obtain a plurality of sub-images to be processed, each sub-image having a designated halftone dot position, wherein the halftone dot positions in different sub-images to be processed among the plurality of sub-images to be processed do not overlap, and the halftone dot presentation image is obtained by processing an input target image using halftone dots; The image segmentation layer is used to identify a yarn package in each sub-image to be processed based on the target prior knowledge information, mask the area where each yarn package is located in the sub-image to be processed using a mask plate to obtain a sub-mask image of each sub-image to be processed, and obtain an initial mask image of the target image based on the sub-mask image of each sub-image to be processed, where the initial mask image is an initial entry mask image or an initial exit mask image.
[0094] In one specific example of the solution of the present disclosure, the prior knowledge feature layer includes at least a semantics prior knowledge layer and a similarity map prior knowledge layer; The semantic prior knowledge layer is used to obtain semantic prior knowledge features based on at least a winding package feature corresponding to a preset winding package prompt; The similarity map prior knowledge layer is used to estimate an area where each winding package is located in the target image based on a similarity between a winding package feature corresponding to a preset winding package prompt and an image feature of the target image, thereby obtaining a target similarity map; The target prior knowledge information includes the semantic prior knowledge features and the target similarity map.
[0095] In one specific example of the solution of the present disclosure, the semantics prior knowledge layer specifically includes: The yarn package features corresponding to the preset yarn package prompt and the image features of the target image are used to perform feature fusion to obtain semantic prior knowledge features.
[0096] In one specific example of the solution of the present disclosure, the similarity map prior knowledge layer specifically includes: Based on the similarity between the obtained semantic prior knowledge features and the image features of the target image, the area where each wound yarn package is located in the target image is estimated to obtain a target similarity map.
[0097] For the specific functions and exemplary descriptions of each module of the apparatus according to the embodiments of the present disclosure, please refer to the relevant descriptions of the corresponding steps in the above-mentioned method embodiments, and they will not be repeated here.
[0098] In the technical solution of the present disclosure, the acquisition, storage, and application of users' personal information comply with the provisions of relevant laws and regulations and do not violate public order and morals.
[0099] FIG. 17 is a structural block diagram of an electronic device according to an embodiment of the present disclosure. As shown in FIG. 17, the electronic device includes a memory 1710 and a processor 1720, and the memory 1710 stores a computer program executable by the processor 1720. The number of memories 1710 and processors 1720 may be one or more. The memory 1710 may store one or more computer programs, which, when executed by the electronic device, cause the electronic device to perform the method provided by the above method embodiments. The electronic device may further include: a communication interface 1730 for communicating with external devices and for data interaction and transmission;
[0100] When the memory 1710, the processor 1720, and the communication interface 1730 are implemented independently, the memory 1710, the processor 1720, and the communication interface 1730 are connected to each other via a bus to enable communication between them. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be classified into an address bus, a data bus, a control bus, and the like. For ease of explanation, only one bold line is shown in FIG. 17, but this does not represent only one bus or only one type of bus.
[0101] Optionally, in a specific implementation, when the memory 1710, the processor 1720, and the communication interface 1730 are integrated on one chip, the memory 1710, the processor 1720, and the communication interface 1730 can communicate with each other via an internal interface.
[0102] It should be understood that the processor may be a Central Processing Unit (CPU), or may be other general-purpose processors, Digital Signal Processing (DSP), Application Specific Integrated Circuits (ASIC), Field Programmable Gate Arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware assemblies, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor may be a processor supporting the Advanced RISC Machines (ARM) architecture.
[0103] Additionally, the memory may optionally include read-only memory and random access memory, or may further include non-volatile random access memory. The memory may be either volatile or non-volatile memory, or may include both volatile and non-volatile memory. Here, non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which acts as an external cache. By way of example and not limitation, many forms of RAM are available. For example, static random access memory (Static RAM, SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct RAMBUS RAM (DR RAM).
[0104] The above-described embodiments may be implemented, in whole or in part, in software, hardware, firmware, or any combination thereof. When implemented in software, they may be implemented, in whole or in part, in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, a process or function according to an embodiment of the present disclosure is generated, in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, Bluetooth, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device including a server, a data center, etc. integrated with one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a Digital Versatile Disc (DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)). Note that the computer-readable storage medium referred to in this disclosure may be a non-volatile storage medium, in other words, a non-transitory storage medium.
[0105] Those skilled in the art can understand that all or part of the steps for realizing the above embodiments may be implemented by hardware, or may be implemented by instructing relevant hardware by a program, and the program may be stored in a computer-readable storage medium, and the storage medium may be a read-only memory, a magnetic disk, an optical disk, etc.
[0106] In describing embodiments of the present disclosure, the references "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present disclosure. Furthermore, the described specific features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, a person skilled in the art may combine different embodiments or examples and features of different embodiments or examples described in the present disclosure to the extent that they are not inconsistent with each other.
[0107] In the description of the embodiments of the present disclosure, unless otherwise specified, " / " means "or," for example, A / B can mean either A or B. In the present disclosure, "and / or" merely describes the related relationship of related objects and indicates that three types of relationships may exist, for example, A and / or B can indicate the following three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0108] In describing the embodiments of the present disclosure, the terms "first" and "second" are used for descriptive purposes only and should not be interpreted as indicating or implying relative importance, nor should they be interpreted as implying the number of technical features shown. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of such features. In describing the embodiments of the present disclosure, "plurality" means two or more, unless otherwise specified.
[0109] The above are merely illustrative examples of the present disclosure, and do not limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.
Claims
1. A detection method applied to a cloud terminal, comprising: When detecting that the target wound yarn package cart has exited the target area, a first entry image and a first exit image are acquired, the first entry image being acquired by collecting images of the target wound yarn package cart after the target wound yarn package cart has entered the target area, and the first exit image being acquired by collecting images of the target wound yarn package cart after the target wound yarn package cart has left the target area, and both the first entry image and the first exit image include all wound yarn packages placed on the target wound yarn package cart; obtaining a target approach mask image of the first approach image and a target exit mask image of the first exit image, wherein the target approach mask image of the first approach image is an image that includes label information of the winding packages and can represent label information of each winding package actually included in the first approach image, obtained by using at least a target detection model and a mask plate to mask areas in the first approach image where each winding package is located; and the target exit mask image of the first exit image is an image that includes label information of the winding packages and can represent label information of each winding package actually included in the first exit image, obtained by using at least a target detection model and a mask plate to mask areas in the first exit image where each winding package is located; obtaining detection information of the target wound yarn package carriage based on difference information between the target approach mask image and the target exit mask image. Detection method.
2. The detection method includes: when it is detected that the target wound yarn package carriage has entered the start position of the target area, activating an image collecting device located at the start position of the target area to collect images of an area on the target wound yarn package carriage where the wound yarn package is placed; and / or and when it is detected that the target wound yarn package carriage has left the target area, activating an image collecting device located at an end position of the target area to collect images of an area on the target wound yarn package carriage where the wound yarn package is placed. The detection method according to claim 1 .
3. Obtaining a target approach mask image of the first approach image includes: Inputting the first approach image into a target detection model, identifying areas in the input first approach image where each winding package is located based on a winding package prompt preset by the target detection model, and masking the areas in the first approach image where each winding package is located using mask plates to obtain an initial approach mask image of the first approach image, wherein the number of mask plates included in the initial approach mask image of the first approach image is the same as the number of winding packages actually included in the first approach image; obtaining, based on the mark information of the target wound yarn package carriage, mark information of the wound yarn package to be placed at each placement position of the target wound yarn package carriage; and adding, based on a preset arrangement rule, mark information of a winding package to be placed at each placement position of the target winding package carriage to a mask plate at a placement position where the winding package should theoretically be located in the initial approach mask image, to obtain a target approach mask image with mark information of the winding package corresponding to the first approach image. The detection method according to claim 1 .
4. Obtaining a target exit mask image of the first exit image includes: Inputting the first exit image into the target detection model, identifying areas in the input first exit image where each winding package is located based on a winding package prompt preset by the target detection model, and masking the areas in the first exit image where each winding package is located using mask plates to obtain an initial exit mask image of the first exit image, wherein the number of mask plates included in the initial exit mask image of the first exit image is the same as the number of winding packages actually included in the first exit image; and adding, based on a preset arrangement rule, mark information of a wound yarn package to be placed at each placement position of the target wound yarn package carriage to each mask plate at a placement position where the wound yarn package should theoretically be located in the initial exit mask image, thereby obtaining a target exit mask image with mark information of the wound yarn package corresponding to the first exit image. The detection method according to claim 3 .
5. Obtaining detection information of the target wound yarn package carriage based on difference information between the target approach mask image and the target exit mask image includes: comparing a target entry mask image with label information of the winding package corresponding to the first entry image with a target exit mask image with label information of the winding package corresponding to the first exit image to determine whether a missing winding package exists; and obtaining detection information of the target wound yarn package carriage based on a comparison result. The detection method according to claim 4.
6. A detection device applied to a cloud terminal, comprising: an information acquisition unit; and a detection unit; the information acquisition unit acquires a first entry image and a first exit image when detecting that the target wound yarn package cart has exited the target area, the first entry image being obtained by collecting images of the target wound yarn package cart after the target wound yarn package cart has entered the target area, and the first exit image being obtained by collecting images of the target wound yarn package cart after the target wound yarn package cart has left the target area, and both the first entry image and the first exit image include all wound yarn packages placed on the target wound yarn package cart; and acquiring a target entry mask image of the first entry image and a target exit mask image of the first exit image. the target entering mask image of the first entering image is an image that includes label information of the winding packages and can represent label information of each winding package actually included in the first entering image, obtained by using at least a target detection model and a mask plate to mask the area in the first entering image where each winding package is located; and the target exiting mask image of the first exiting image is an image that includes label information of the winding packages and can represent label information of each winding package actually included in the first exiting image, obtained by using at least a target detection model and a mask plate to mask the area in the first exiting image where each winding package is located; the detection unit is used for obtaining detection information of the target wound yarn package carriage based on difference information between the target approach mask image and the target exit mask image. Detection device.
7. at least one processor; a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, the instructions, when executed by the at least one processor, causing the at least one processor to perform the method of any one of claims 1 to 5. Electronic devices.
8. A non-transitory computer readable storage medium for storing instructions that cause a computer to perform the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Spool recognition and transfer method and spool recognition and transfer device
CN110950181A
Image change detection method and device, storage medium and unmanned aerial vehicle system
CN115601665A
Apparatus for treating yarn package, for quality control and searching for shipping
JP1995292529A