Detection method, detection apparatus, electronic device, storage medium, and program

The detection method automates yarn package inspection on carts by using a target detection model to count packages in entry and exit images, addressing inefficiencies and missed inspections, enhancing inspection efficiency.

JP7763989B1Active Publication Date: 2025-11-04ZHEJIANG HENGYI PETROCHEMICAL CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2025107208
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2024-06-27
Filing Date
2025-06-25
Publication Date
2025-11-04
Estimated Expiration
2045-06-25

AI Technical Summary

Technical Problem

Manual inspection of yarn packages on winding package carts is inefficient and prone to missed inspections, affecting subsequent packaging processes.

Method used

A detection method and apparatus using a target detection model to automatically count yarn packages by acquiring entry and exit images of the cart, identifying packages based on a preset prompt, and generating detection information based on the number difference between these images.

Benefits of technology

Automates the inspection process, significantly improving efficiency by quickly and accurately determining the number of yarn packages without human labor, reducing labor and time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007763989000001_ABST
    Figure 0007763989000001_ABST
Patent Text Reader

Abstract

A detection method, a detection apparatus, a device, and a storage medium are provided. [Solution] The method includes, when detecting that a target winding package cart has exited a target area, acquiring a first entry image and a first exit image, inputting the first entry image into a first target detection model to obtain a first number of winding packages included in the first entry image, inputting the first exit image into the first target detection model to obtain a second number of winding packages included in the first exit image, and generating detection information for the target winding package cart based on the first number of winding packages included in the first entry image and the second number of winding packages included in the first exit image.
Need to check novelty before this filing date? Find Prior Art

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, a storage medium, and a program. [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 a detection method, a detection apparatus, an electronic device, a storage medium, and a program 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; inputting the first entering image into a first target detection model to obtain a first number of winding packages included in the first entering image, and inputting the first exiting image into the first target detection model to obtain a second number of winding packages included in the first exiting image, wherein the first target detection model is used to identify winding packages in the input image based on a preset winding package prompt, and estimate and obtain the actual number of winding packages in the input image based on the identification result; generating detection information for the target wound yarn package cart based on a first number of wound yarn packages included in the first entering image and a second number of wound yarn packages included in the first exiting image.

[0006] According to a second aspect of the present disclosure, there is provided a detection device applied to a cloud terminal, the device comprising: an information acquisition unit for acquiring a first entry image and a first exit image when it is detected that a target wound yarn package cart has exited a target area, wherein the first entry image is obtained by collecting images of the target wound yarn package cart after it has entered the target area, and the first exit image is obtained by collecting images of the target wound yarn package cart after it 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; a detection unit used to input the first entering image into a first target detection model to obtain a first number of wound yarn packages included in the first entering image, and input the first exiting image into the first target detection model to obtain a second number of wound yarn packages included in the first exiting image, wherein the first target detection model is used to identify wound yarn packages in the input image based on a preset wound yarn package prompt and estimate and obtain the actual number of wound yarn packages in the input image based on the identification result; and generate detection information for the target wound yarn package cart based on the first number of wound yarn packages included in the first entering image and the second number of wound yarn packages included in the first exiting 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 yarn packages included in the acquired first entry image and first exit image are counted using a first target detection model to obtain the actual number of yarn packages included in each image (e.g., the first number and the second number), and detection information for the target yarn package can be quickly obtained based on the actual number of yarn packages included in each image. In this way, compared to the conventional manual sampling inspection method, the solution disclosed herein can quickly complete the inspection of the target yarn package without relying on human labor, thereby realizing automation and intelligence of the entire process and significantly improving the inspection efficiency of yarn package carts entering and exiting the target area.

[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 2A] FIG. 1 is a schematic diagram illustrating a target wound yarn package carriage according to one embodiment of the present disclosure. [Figure 2B] FIG. 1 is a schematic diagram illustrating a target wound yarn package carriage according to one embodiment of the present disclosure. [Figure 2C] 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 2D]2D is a schematic diagram illustrating an image obtained by processing the image shown in FIG. 2C using a mask plate according to an embodiment of the present disclosure. [Figure 2E] 2C is a schematic diagram showing an exit image corresponding to a placement area on one side (the same side as FIG. 2C) of a target wound yarn package carriage according to an embodiment of the present disclosure. [Figure 2F] 2E using a mask plate according to an embodiment of the present disclosure. FIG. [Figure 3] 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 4A] FIG. 2 is a schematic diagram illustrating a model structure of a first target detection model according to an embodiment of the present disclosure. [Figure 4B] FIG. 1 is a schematic diagram illustrating segmentation of a halftone dot presentation image according to an embodiment of the present disclosure. [Figure 5A] 2 is a second schematic flowchart of a detection method according to an embodiment of the present disclosure. [Figure 5B] 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 5C] 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 6A] FIG. 10 is a schematic diagram illustrating a model structure of a second target detection model according to an embodiment of the present disclosure. [Figure 6B] FIG. 10 is a schematic diagram illustrating a prior knowledge feature layer included in a second target detection model according to an embodiment of the present disclosure. [Figure 6C] 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 7] 1 is a schematic diagram illustrating a configuration of a detection device according to an embodiment of the present disclosure. [Figure 8] 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.

[0019] 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.

[0020] Here, the first entering image is obtained by collecting images of the target wound yarn package cart after it enters the target area, and the first exiting image is obtained by collecting images of the target wound yarn package cart after it leaves the target area. 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] 2A and 2B, 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 each entry image corresponding to each side includes 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, they are not stitched together, but the entering image of the same side is directly used as the first entering image, and the exiting image of the same side is used as the first exiting image, and a comparison is then made based on the entering image and exiting image of the same side, and once the comparison is completed on both sides, detection information for the target winding 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, the first entering image is input into a first target detection model to obtain a first number of wound yarn packages included in the first entering image, and the first exiting image is input into the first target detection model to obtain a second number of wound yarn packages included in the first exiting image.

[0027] Here, the first target detection model is used to identify yarn packages in the input image based on a preset yarn package prompt, and estimate the actual number of yarn packages in the input image based on the identification result, where the prompt is, for example, an instruction to search for yarn packages.

[0028] In step S103, detection information for the target wound yarn package carriage is generated based on the first number of wound yarn packages included in the first entering image and the second number of wound yarn packages included in the first exiting image.

[0029] In this way, the solution disclosed herein counts the yarn packages contained in the acquired first entering image and first exiting image using a first target detection model to obtain the actual number of yarn packages contained in each image (e.g., a first number and a second number), and can quickly obtain detection information for the target yarn package based on the actual number of yarn packages contained in each image. In this way, compared to the conventional manual sampling inspection method, the solution disclosed herein can quickly complete the inspection of the target yarn package without relying on human labor, thereby realizing automation and intelligence of the entire process and significantly improving the inspection efficiency of yarn package carts entering and exiting the target area.

[0030] Furthermore, in one specific example, to obtain detection information for a target wound yarn package carrier, specifically, generating detection information for the target wound yarn package carrier based on a first number of wound yarn packages included in the first entering image and a second number of wound yarn packages included in the first leaving image (e.g., the above step S103) can be specifically performed by: In step S103-1, it is determined whether the first number of wound yarn packages included in the first exit image is the same as the second number of wound yarn packages included in the first exit image, and if so, proceed to step S103-2; if not, proceed to step S103-3.

[0031] That is, it is determined whether the number of wound yarn packages on the target wound yarn package cart entering and leaving the target area has changed, and based on the difference between the two, detection information of the target wound yarn package cart is quickly obtained.

[0032] In step S103-2, if the first number of wound yarn packages included in the first exit image is the same as the second number of wound yarn packages included in the first exit image, detection information indicating that the detection of the target wound yarn package cart has been passed is obtained.

[0033] 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.

[0034] In step S103-3, if the first number of wound yarn packages included in the first exit image is different from the second number of wound yarn packages included in the first exit image, a target entering mask image of the first entering image and a target exiting mask image of the first exiting image are acquired, and the process proceeds to step S103-4.

[0035] Here, the target approach mask 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.

[0036] Correspondingly, the target exit mask 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.

[0037] In step S103-4, detection information indicating that the target wound yarn package carriage has not passed detection is generated based on difference information between the target approach mask image and the target exit mask image.

[0038] Here, in this example, after generating detection information indicating that the target wound yarn package cart has not passed detection, presentation information can be generated and presented to the operator for further inspection.

[0039] Furthermore, in this example, the difference information can represent the difference in mask version between the target entry mask image and the target exit mask image, and can further represent the difference in the winding package between the target entry mask image and the target exit mask image. In other words, the difference information between the target entry mask image and the target exit mask image can represent the difference in the winding package in the target winding package cart entering and exiting the target area.

[0040] For example, Fig. 2C is a schematic diagram showing a first entering image acquired 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 where each wound yarn package is located in the first entering image, the target entering mask image shown in Fig. 2D is obtained. Correspondingly, Fig. 2E is a schematic diagram showing a first exiting image acquired by collecting images of a mounting area on one side (the same side as Fig. 2C) 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 where each wound yarn package is located in the first exiting image, the target exiting mask image shown in Fig. 2F is obtained.

[0041] Note that one wound yarn package is missing from the first exit image shown in Figure 2E. In this case, the area where the wound yarn package is missing is not recognized as an area requiring masking. In other words, the placement position where the wound yarn package is missing is not masked, which is useful for subsequent detection.

[0042] 2E and 2F, based on the mask difference between the target entry mask image and the target exit mask image, detection information indicating that the target wound yarn package cart has not passed detection can be obtained. Here, the detection information indicating that the target wound yarn package cart has not passed detection can include specific information about the missing wound yarn package, such as the yarn package's label or its location. This can facilitate quick manual further detection of the target wound yarn package cart.

[0043] In one specific example, the image collection may include the following: Specifically, when it is detected that the target wound yarn package carriage has exited the target area, before acquiring the first entry image and the first exit image (e.g., before the above step S101):

[0044] 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.

[0045] 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.

[0046] 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.

[0047] Here, the image collecting device in this example (e.g., image collecting device 1 or image collecting device 2) may specifically include a camera. For example, the first entering 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 entering the target area. For example, the first entering 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 entering 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 entering image. Correspondingly, the method of obtaining the first exiting image is the same as the method described above, and will not be described again here.

[0048] 3, a sensing component 1 and an image collecting device 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 device 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 device 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 device 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 device 1, causing the image collection device 1 to collect images of the wound yarn package placement area of ​​the target wound yarn package cart. Finally, after receiving the entry images collected by the image collection device 1, the cloud performs detection on the entry images to obtain a first number of wound yarn packages contained in the entry images. Correspondingly, the cloud can obtain a second number of wound yarn packages contained in the exit images. At this time, the cloud can obtain detection information of the target wound yarn package cart entering and exiting the target area based on the obtained first and second numbers.

[0049] 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.

[0050] In one specific example, the first target detection model may be an untrained counting model based on a Segment Anything Model (SAM), or may be other segmentation models with target counting capabilities, although the present disclosure is not limited thereto.

[0051] Furthermore, in one example, as shown in FIG. 4A, the first target detection model includes at least a similarity map feature layer, a halftone dot segmentation layer, a first image segmentation layer, and a data statistics layer.

[0052] Specifically, in one example, the similarity map feature layer is used to estimate the location of each winding package in the input image based on the similarity between the winding package features corresponding to a preset winding package prompt and the image features of the input image, thereby obtaining a first target similarity map, which can then be used to establish a basis for counting the winding packages included in the subsequent input image.

[0053] In yet another example, the halftone dot segmentation layer is used to segment 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 an input image using halftone dots. For example, as shown in FIG. 4B, an input image, such as the first entry image shown in FIG. 2C, is first processed using halftone dots to obtain a halftone dot presentation image corresponding to the first entry image. The resulting halftone dot presentation image is then segmented, 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.

[0054] Furthermore, in a further example, the first image division layer is used to identify a thread package in each sub-image to be processed based on a preset thread package prompt, mask the area in the sub-image to be processed where each thread package is located using a mask plate to obtain a sub-mask image of each sub-image to be processed, and then, after obtaining the sub-mask image of each sub-image to be processed, 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 a mask image of the input image.

[0055] Furthermore, in yet another example, the data statistics layer is used to estimate the actual number of wound yarn packages in the input image based on the first target similarity map and a mask image of the input image.

[0056] Furthermore, in one specific example, the data statistics layer specifically calculates the similarity between image features corresponding to a mask region in a mask image of the input image and image features of a region corresponding to the mask region in the first target similarity map to obtain the similarity corresponding to the mask region, where the mask region is a region in the mask image of the input image where a mask plate is located, and estimates and obtains the actual number of wound yarn packages in the input image based on the similarity corresponding to the mask region. For example, statistics are collected for mask regions with a similarity greater than a predetermined threshold (e.g., 0.8), and the actual number of mask regions with a similarity greater than the predetermined threshold is determined as the actual number of wound yarn packages in the input image. In this way, it is useful for quickly estimating the actual number of wound yarn packages in the input image and automatically and intelligently obtaining detection information of the target wound yarn package carrier.

[0057] In one example, a feature enhancement layer can be added after the similarity map feature layer. For example, a first target similarity map obtained using the similarity map feature layer can be input to the feature enhancement layer to perform feature enhancement on the first target similarity map, thereby obtaining a feature-enhanced first target similarity map. In this case, the data statistics layer can specifically count based on the feature-enhanced first target similarity map and a mask image of the input image, thereby further improving the accuracy of the number of wound yarn packages in the image.

[0058] Thus, the solution of the present disclosure provides a model capable of counting and statistically calculating the wound yarn packages contained in the input image, which model can efficiently perform technical statistics, thereby laying the foundation for automatically and intelligently obtaining detection information of the target wound yarn package carriage and for improving detection efficiency.

[0059] 5A 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 4 above can also be applied to this embodiment and will not be repeated in this embodiment.

[0060] Furthermore, the method includes at least some of the following content: As shown in FIG.

[0061] In step S501, 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.

[0062] 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.

[0063] In step S502, the first entering image is input into a first target detection model to obtain a first number of wound yarn packages included in the first entering image, and the first exiting image is input into the first target detection model to obtain a second number of wound yarn packages included in the first exiting image.

[0064] Here, the first target detection model is used to identify the yarn packages in the input image based on a preset yarn package prompt, and estimate the actual number of yarn packages in the input image based on the identification result.

[0065] In step S503, it is determined whether the first number of wound yarn packages included in the first entering image and the second number of wound yarn packages included in the first exiting image are the same. If they are the same, the process proceeds to step S510. If not, that is, if the first number of wound yarn packages included in the first entering image and the second number of wound yarn packages included in the first exiting image are not the same, the process proceeds to step S504.

[0066] In step S504, the first approach image is input into a second target detection model to obtain an initial approach mask image of the first approach image.

[0067] Here, the second 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.

[0068] 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 helps to compare differences using subsequently obtained mask images and can improve the reliability and accuracy of the detection results of the target winding package cart.

[0069] In step S505, based on the label information of the target wound yarn package carriage, label information of the wound yarn package to be placed at each placement position of the target wound yarn package carriage is obtained.

[0070] 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.

[0071] Here, the execution order of step S504 and step S505 can be reversed or can be executed synchronously, and the present disclosure is not limited thereto.

[0072] In step S506, 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.

[0073] 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.

[0074] In step S507, the first exit image is input into the second target detection model to obtain an initial exit mask image of the first exit image.

[0075] 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.

[0076] In step S508, 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.

[0077] Here, the target exit mask image with label information of the wound yarn package corresponding to the first exit image can represent the label information of each wound yarn package actually included in the first exit image.

[0078] 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.

[0079] 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.

[0080] For example, as shown in Figure 5B, using the second target detection model, an initial entry mask image is obtained in which the area in the first entry image where each wound yarn package is located is masked using a mask plate, and then the label information of the wound yarn package that is theoretically placed at each placement position of the target wound yarn package cart is obtained.After that, based on a predetermined placement rule, 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, thereby obtaining a target entry mask image with the label information of the wound yarn package.

[0081] Furthermore, as shown in Figure 5C, using the second 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.

[0082] 5C, due to the presence of a missing yarn package, there is no mask at the placement position of the missing yarn package in the initial exit mask image. In this case, the mark information of the missing yarn package can be added to the placement position of the missing yarn package in the initial exit mask image where the missing yarn package should be located, thus laying the foundation for quick targeting of specific problems later.

[0083] In step S509, detection information for the target wound yarn package carriage is generated based on difference information between the target approach mask image and the target exit mask image.

[0084] In step S510, if the first number of wound yarn packages included in the first entering image is the same as the second number of wound yarn packages included in the first exiting image, detection information indicating that the detection of the target wound yarn package has been passed is obtained.

[0085] In this way, the solution disclosed herein can detect collected images (e.g., the first entry image and the first exit image) using the second target detection model, and obtain the label information of the yarn package theoretically placed at each placement position of the target wound yarn package carrier. Then, a target entry mask image with the label information of the yarn package and a target exit mask image with the label information of the yarn package are obtained, and detection information for the target wound yarn package carrier is obtained 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. This greatly improves the inspection efficiency of yarn wound package carriers entering and exiting the target area, thereby significantly reducing labor and time costs.

[0086] Furthermore, in one specific example, the detection information for the target winding yarn package cart can be obtained as follows. Specifically, obtaining the detection information for the target winding yarn package cart based on the difference information between the target entering mask image and the target exiting mask image (for example, step S509) specifically includes the following steps:

[0087] In step S509-1, the missing winding package is determined by 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.

[0088] In step S509-2, based on the comparison result, detection information of the target wound yarn package carriage is obtained, for example, detection information of the target wound yarn package carriage that has not passed detection is obtained, and further, the detection information of the target wound yarn package carriage that has not passed detection also includes the identification information of the missing wound yarn package.

[0089] In this way, the solution disclosed herein can quickly obtain specific information (e.g., label information) of the missing yarn package on the target yarn package carrier based on the comparison result between the target exit mask image and the target entry mask image. This process can be completed quickly without relying on human labor, making the entire process automated and intelligent. In this way, the inspection efficiency of yarn package carriers entering and leaving the target area can be greatly improved, and significant labor and time costs can be reduced.

[0090] Furthermore, in one example, the second target detection model may be a segment-anything model 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.

[0091] Furthermore, in one example, as shown in FIG. 6A, the second target detection model includes at least a prior knowledge feature layer, a second image segmentation layer, and a halftone dot segmentation layer.

[0092] 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 image, where the input image is the first entering image or the first exiting image, where the target prior knowledge information can be used to guide the second 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 second image segmentation layer and ultimately generating a mask.

[0093] Furthermore, in another example, the halftone dot division layer is used to obtain a plurality of sub-images to be processed of a halftone dot presentation image, the halftone dot presentation image being obtained by processing an input image using halftone dots.

[0094] Here, the relevant content of the halftone dot division layer can be referred to the description of the example shown in FIG. 4B, and will not be described again here.

[0095] Furthermore, in a further example, the second image segmentation layer identifies a yarn package in each sub-image to be processed based on the target prior knowledge information, masks the area in the sub-image to be processed where each yarn package is located using a mask plate to obtain a sub-mask image of each sub-image to be processed, and after obtaining the sub-mask image of each sub-image to be processed, for example, connects 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 input image, whereby when the input image is a first entry image, an initial entry mask image can be obtained by the above-mentioned processing, and similarly, when the input image is a first exit image, an initial exit mask image can be obtained by the above-mentioned processing.

[0096] As a result, the solution disclosed herein provides a specific model for obtaining a mask image, which can utilize target prior knowledge information to enhance the identification and segmentation capabilities of the second image segmentation layer, and can realize batch image processing based on halftone dot presentation images, thereby improving segmentation efficiency. This lays the foundation for automatically and intelligently obtaining detection information for the target wound yarn package cart, and also lays the foundation for improving inspection efficiency.

[0097] 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.

[0098] 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.

[0099] In addition, in another example, the semantic prior knowledge layer can also obtain semantic prior knowledge features as follows: Specifically, as shown in Fig. 6B , 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 input image (e.g., the global feature map of the input 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 input image to obtain a feature map for representing the semantic prior knowledge features.

[0100] 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 input image, the yarn package feature corresponding to the preset yarn package prompt needs to be upsampled (e.g., bilinear interpolated) and then feature-fused to make the dimension of the processed yarn package feature the same as the dimension of the image feature of the input 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 second image segmentation layer.

[0101] Furthermore, in a further example, the similarity map prior knowledge layer is used to estimate the area in the input 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 input image, thereby obtaining a second target similarity map.

[0102] It should be noted that the above target prior knowledge information includes the semantic prior knowledge features and the second target similarity map.

[0103] 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 input image where each winding yarn package exists based on the similarity between the obtained semantic prior knowledge features and the image features of the input image, to obtain the second target similarity map, for example, as shown in FIGS. 6B and 6C : First, an aggregation process is performed on the obtained semantic prior knowledge features 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; next, multiple sub-feature vectors of the global feature map of the input 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; finally, the similarity between each sub-feature vector in the multiple sub-feature vectors and the feature vector after the aggregation process is obtained, and this similarity is used to obtain a second target similarity map.

[0104] This allows for precise identification of areas in the input image where the yarn packages are located, which then forms the basis for accurately identifying and separating the yarn packages in the image and obtaining a mask image.

[0105] Furthermore, in one example, the prior knowledge feature layer may include a feature enhancement layer, for example, the obtained second target similarity map may be input into the feature enhancement layer to obtain a feature-enhanced second target similarity map in order to perform feature enhancement on the second target similarity map. In this case, the second image segmentation layer may specifically perform classification and segmentation based on the semantic prior knowledge features and the feature-enhanced second target similarity map, thereby further improving the accuracy of image classification and segmentation.

[0106] Alternatively, in another example, the prior knowledge feature layer may include a labeling layer. For example, as shown in FIG. 6B , the obtained second target similarity map (or the feature-enhanced second target similarity map) may be input to the labeling layer, and a labeling process may be performed on the input second target similarity map to obtain a label feature map. In this case, the target prior knowledge information may specifically include the semantic prior knowledge features and the label feature map.

[0107] Here, in the label feature map (e.g., labeled with "0" and "1"), if the value of a certain area is 1, it indicates that the area is a positive area, i.e., that a yarn package or a part of a yarn package is present; otherwise, it indicates that the area is a negative area, which helps the second image segmentation layer to ignore the negative areas and focus on segmenting the positive areas, 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.

[0108] The solution of the present disclosure also provides a detection device applied to the cloud, as shown in FIG. 7, which includes: an information acquisition unit 701 for acquiring a first entry image and a first exit image when it is detected that a target wound yarn package cart has exited a target area, the first entry image being obtained by collecting images of the target wound yarn package cart after it has entered the target area, and the first exit image being obtained by collecting images of the target wound yarn package cart after it has left the target area, and both the first entry image and the first exit image including all wound yarn packages placed on the target wound yarn package cart; The detection unit 702 is used to: input the first entering image into a first target detection model to obtain a first number of wound yarn packages included in the first entering image; input the first exiting image into the first target detection model to obtain a second number of wound yarn packages included in the first exiting image; the first target detection model is used to identify wound yarn packages in the input image based on a preset wound yarn package prompt; and estimate and obtain the actual number of wound yarn packages in the input image based on the identification result; and generate detection information for the target wound yarn package cart based on the first number of wound yarn packages included in the first entering image and the second number of wound yarn packages included in the first exiting image.

[0109] In one specific example of the solution of the present disclosure, the first target detection model includes at least a similarity map feature layer, a halftone dot segmentation layer, a first image segmentation layer and a data statistics layer; The similarity map feature layer is used to estimate the location of each winding package in the input image based on the similarity between a winding package feature corresponding to a preset winding package prompt and an image feature of the input image, thereby obtaining a first target similarity map; the halftone dot division layer is used to divide a 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 image using halftone dots; The first image segmentation layer is used to identify a yarn package in each of the target sub-images based on a preset yarn package prompt, mask an area in each of the target sub-images where each yarn package is located using a mask, obtain a sub-mask image for each of the target sub-images, and obtain a mask image of the input image based on the sub-mask image for each of the target sub-images; The data statistics layer is used to estimate and obtain the actual number of wound yarn packages in the input image based on the first target similarity map and a mask image of the input image.

[0110] In one specific example of the solution of the present disclosure, the data statistics layer specifically includes: Calculating a similarity between an image feature corresponding to a mask area in a mask image of the input image and an image feature of a region in the first target similarity map corresponding to the mask area to obtain a similarity corresponding to the mask area, wherein the mask area is a region in the mask image of the input image where a mask version is located; and estimating the actual number of wound yarn packages in the input image based on the similarity corresponding to the mask region.

[0111] In one specific example of the solution of the present disclosure, the detection unit specifically comprises: When a first number of winding packages included in the first entering image and a second number of winding packages included in the first exiting image are different, a target entering mask image of the first entering image is acquired and a target exiting mask image of the first exiting image is acquired, wherein the target entering mask image is an image obtained by masking at least the area in the first entering image where each winding package is located using a mask plate, and the target exiting mask image is an image obtained by masking at least the area in the first exiting image where each winding package is located using a mask plate; and generating detection information for the target wound yarn package cart based on difference information between the target approach mask image and the target exit mask image.

[0112] In one specific example of the solution of the present disclosure, the detection unit specifically comprises: Inputting the first approach image into a second target detection model to obtain an initial approach mask image of the first approach image, wherein the second 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.

[0113] In one specific example of the solution of the present disclosure, the detection unit specifically comprises: inputting the first exit image into the second 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.

[0114] In one specific example of the solution of the present disclosure, the detection unit specifically comprises: determining a missing winding package by comparing a target entering mask image with label information of the winding package corresponding to the first entering image and a target exiting mask image with label information of the winding package corresponding to the first exiting image; and generating detection information of the target wound yarn package carriage based on the comparison result.

[0115] In one specific example of the solution of the present disclosure, the second target detection model includes at least a prior knowledge feature layer, a second image segmentation layer, and the halftone dot 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 image; The second 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 input 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.

[0116] 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 input image based on the similarity between a winding package feature corresponding to a preset winding package prompt and an image feature of the input image, thereby obtaining a second target similarity map; The target prior knowledge information includes the semantic prior knowledge features and the second target similarity map.

[0117] 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 input image are used to perform feature fusion to obtain semantic prior knowledge features.

[0118] 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 input image, the area in the input image where each wound yarn package is located is estimated, and a second target similarity map is obtained.

[0119] 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.

[0120] 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.

[0121] FIG. 8 is a structural block diagram of an electronic device according to an embodiment of the present disclosure. As shown in FIG. 8, the electronic device includes a memory 810 and a processor 820, and the memory 810 stores a computer program executable by the processor 820. The number of memories 810 and processors 820 may be one or more. The memory 810 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 830 for communicating with external devices and for data interaction and transmission;

[0122] When the memory 810, the processor 820, and the communication interface 830 are implemented independently, the memory 810, the processor 820, and the communication interface 830 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. 8, but this does not represent only one bus or only one type of bus.

[0123] Optionally, in a specific implementation, when the memory 810, the processor 820, and the communication interface 830 are integrated on one chip, the memory 810, the processor 820, and the communication interface 830 can communicate with each other via an internal interface.

[0124] 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.

[0125] 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).

[0126] 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.

[0127] 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.

[0128] 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.

[0129] 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.

[0130] 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.

[0131] 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 scope of protection 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; inputting the first entering image into a first target detection model to obtain a first number, which is the actual number of wound yarn packages included in the first entering image; inputting the first exiting image into the first target detection model to obtain a second number, which is the actual number of wound yarn packages included in the first exiting image; the first target detection model is used to identify the wound yarn packages in the inputted first entering image or first exiting image based on a preset wound yarn package prompt, and to estimate and obtain the first number or the second number, which is the actual number of wound yarn packages in the inputted first entering image or first exiting image, based on the identification result; generating detection information for the target wound yarn package carriage based on the first number of wound yarn packages included in the first entering image and the second number of wound yarn packages included in the first exiting image. Detection method.

2. the first target detection model includes at least a similarity map feature layer, a halftone dot segmentation layer, a first image segmentation layer, and a data statistics layer; The similarity map feature layer is used to estimate the location of each winding package in the input image based on the similarity between a winding package feature corresponding to a preset winding package prompt and an image feature of the input image, thereby obtaining a first target similarity map; the halftone dot division layer is used to divide a 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 of different sub-images to be processed in the plurality of sub-images to be processed do not overlap, and the halftone dot presentation image is obtained by processing an input image using halftone dots; the first image segmentation layer is used to identify a yarn package in each of the target sub-images based on a preset yarn package prompt, mask an area in each of the target sub-images where each yarn package is located using a mask, obtain a sub-mask image for each of the target sub-images, and obtain a mask image of the input image based on the sub-mask image for each of the target sub-images; The data statistics layer is used to estimate and obtain an actual number of wound yarn packages in the input image based on the first target similarity map and a mask image of the input image. The detection method according to claim 1 .

3. The data statistics layer specifically includes: calculating a similarity between an image feature corresponding to a mask area in a mask image of the input image and an image feature of a region in the first target similarity map corresponding to the mask area, and obtaining a similarity corresponding to the mask area, wherein the mask area is a region in the mask image of the input image where a mask version is located; and estimating the actual number of wound yarn packages in the input image based on the similarity corresponding to the mask region. The detection method according to claim 2 .

4. generating detection information for the target wound yarn package carriage based on a first number of wound yarn packages included in the first entering image and a second number of wound yarn packages included in the first exiting image; When a first number of winding packages included in the first entering image and a second number of winding packages included in the first exiting image are different, a target entering mask image of the first entering image is acquired and a target exiting mask image of the first exiting image is acquired, wherein the target entering mask image is an image obtained by masking at least the area in the first entering image where each winding package is located using a mask plate, and the target exiting mask image is an image obtained by masking at least the area in the first exiting image where each winding package is located using a mask plate; generating detection information for the target wound yarn package cart based on difference information between the target approach mask image and the target exit mask image. The detection method according to claim 2 .

5. Obtaining a target approach mask image of the first approach image includes: inputting the first approach image into a second target detection model to obtain an initial approach mask image of the first approach image, wherein the second 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; and adding, based on a preset arrangement rule, the mark information of the winding package to be placed by each placement position of the target winding package carriage to a mask plate at the 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, wherein the target approach mask image with mark information of the winding package corresponding to the first approach image can represent the mark information of each winding package actually included in the first approach image. The detection method according to claim 4.

6. Obtaining a target exit mask image of the first exit image includes: inputting the first exit image into the second 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; and adding, based on a preset arrangement rule, the mark information of the winding package to be placed by each placement position of the target winding package carriage to each mask plate at the placement position where the winding package should theoretically be located in the initial exit mask image, to obtain a target exit mask image with mark information of the winding package corresponding to the first exit image, wherein the target exit mask image with 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. The detection method according to claim 5 .

7. generating detection information for the target wound yarn package cart based on difference information between the target approach mask image and the target exit mask image; determining a missing winding package by comparing a target entering mask image with label information of the winding package corresponding to the first entering image and a target exiting mask image with label information of the winding package corresponding to the first exiting image; generating detection information of the target wound yarn package carriage based on a comparison result; The detection method according to claim 6.

8. the second target detection model includes at least a prior knowledge feature layer, a second image segmentation layer, and the halftone dot 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 image; the second image segmentation layer is used to identify a yarn package in each of the target sub-images based on the target prior knowledge information, mask the area where each yarn package is located in each of the target sub-images using a mask, obtain a sub-mask image of each of the target sub-images, and obtain an initial mask image of the input image based on the sub-mask image of each of the target sub-images, where the initial mask image is an initial entry mask image or an initial exit mask image; The detection method according to claim 5 .

9. 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 input image based on a similarity between a winding package feature corresponding to a preset winding package prompt and an image feature of the input image, thereby obtaining a second target similarity map; the target prior knowledge information includes the semantic prior knowledge features and the second target similarity map; The detection method according to claim 8.

10. Specifically, the semantics prior knowledge layer: The yarn package features corresponding to the preset yarn package prompt and the image features of the input image are used to perform feature fusion to obtain semantic prior knowledge features. The detection method according to claim 9.

11. Specifically, the similarity map prior knowledge layer includes: Based on the similarity between the obtained semantic prior knowledge features and the image features of the input image, an area in the input image where each wound yarn package is located is estimated, and a second target similarity map is obtained. The detection method according to claim 9.

12. A detection device applied to a cloud terminal, an information acquisition unit for acquiring a first entry image and a first exit image when it is detected that a target wound yarn package cart has exited a target area, the first entry image being obtained by collecting images of the target wound yarn package cart after it has entered the target area, and the first exit image being obtained by collecting images of the target wound yarn package cart after it has left the target area, and both the first entry image and the first exit image including all wound yarn packages placed on the target wound yarn package cart; a detection unit for inputting the first entering image into a first target detection model to obtain a first number, which is the actual number of wound yarn packages included in the first entering image, and inputting the first exiting image into the first target detection model to obtain a second number, which is the actual number of wound yarn packages included in the first exiting image, wherein the first target detection model is used to identify wound yarn packages in the input first entering image or the first exiting image based on a preset wound yarn package prompt, and to estimate and obtain the first number or the second number, which is the actual number of wound yarn packages in the input first entering image or the first exiting image, based on the identification result; and generating detection information for the target wound yarn package carriage based on the first number of wound yarn packages included in the first entering image and the second number of wound yarn packages included in the first exiting image. Detection device.

13. 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 11. Electronic devices.

14. 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 11.

15. A program for implementing the method of any one of claims 1 to 11 when executed by a processor in a computer.

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