A method, device, electronic equipment and program product for identifying hook unhooking
By identifying and segmenting the hook in the image of the hook usage site, cropping and identifying the relative position of the anti-decoupling baffle, the problem of inaccurate recognition of the hook anti-decoupling baffle in the existing technology is solved, and the risk identification of the hook decoupling is improved. accuracy and reliability.
Patent Information
- Application Number
- CN202410910138.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-09
AI Technical Summary
The existing technology is difficult to accurately and reliably identify the existence and effective status of the hook anti-decoupling baffle, resulting in inaccurate identification of the risk of hook decoupling, high labor costs, and difficulty in real-time monitoring.
By obtaining the image of the hook usage site, identify and segment the hook, crop the hook image, and then identify the anti-decoupling baffle in the hook image, determine its segmented area and relative position, and determine whether the hook has a risk of decoupling.
The success rate of hook decoupling identification is improved and the false alarm rate is reduced, the risk of hook decoupling is accurately identified, and the problem of difficulty in practical application of the existing technology is solved.
Smart Images

Figure CN118470648B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a method, a device, an electronic device and a program product for identifying hook and unhook. Background Art
[0002] In various engineering scenarios, such as construction scenarios, cranes are widely used to lift various heavy objects. In order to improve the safety of the lifting process and avoid accidents caused by the heavy objects on the hook being unhooked, the hook of the crane is usually provided with an anti-unhooking baffle.
[0003] However, these anti-unhooking baffles may fail due to aging or malfunction, causing the hook to unhook, thus causing safety accidents. The current solution is to ensure the normal operation of the anti-unhooking device through regular manual inspections, but this method has problems such as high labor costs and difficulty in real-time monitoring, and cannot effectively prevent safety accidents caused by hook unhooking.
[0004] CN117670755A discloses a method for detecting a hook anti-dropping device, which uses a trained hook anti-dropping device detection model to detect whether there is an anti-dropping device in a hook input image and whether the anti-dropping device is invalid.
[0005] However, since the hook is already a small target in the site image of the crane's operating site, and the anti-unhooking baffle is smaller than the hook, and the position of the hook in the crane's operating site is not fixed, existing detection methods are difficult to accurately and reliably identify the existence and effective status of the anti-unhooking baffle, and the practicality of such detection methods is questionable.
[0006] The content of this background technology description is only for facilitating understanding of the relevant technology in this field and is not regarded as an admission of the prior art. Summary of the invention
[0007] Therefore, the present invention provides a hook unhooking identification method, device, electronic equipment and program product, which can effectively determine whether an anti-unhooking baffle exists and whether it is invalid, thereby identifying the risk of hook unhooking.
[0008] In a first aspect, a method for identifying a hook being unhooked is provided, the method comprising:
[0009] Get images of the site using the hook;
[0010] Identifying a hook in the site image and determining a hook segmentation area;
[0011] According to the identified hook, cropping the site image to obtain a hook image;
[0012] identifying an anti-unhooking baffle in the hook image, and determining an anti-unhooking baffle segmentation area when the anti-unhooking baffle exists;
[0013] Determining the relative position of the anti-unhooking baffle relative to the hook according to the hook segmentation area and the anti-unhooking baffle segmentation area;
[0014] Whether the hook is at risk of being unhooked is identified based on whether the anti-unhooking baffle is present and / or based on the relative position.
[0015] Optionally, determining the relative position of the anti-unhooking baffle relative to the hook according to the hook segmentation area and the anti-unhooking baffle segmentation area includes:
[0016] The angle of the anti-hook-off baffle relative to the hook is determined according to the hook segmentation area and the anti-hook-off baffle segmentation area.
[0017] Optionally, determining the relative position of the anti-unhooking baffle relative to the hook according to the hook segmentation area and the anti-unhooking baffle segmentation area includes:
[0018] According to the hook segmentation area and the anti-hook-off baffle segmentation area, an intersection state between the end of the anti-hook-off baffle and the hook is determined.
[0019] Optionally, determining the intersection state of the end of the anti-unhooking baffle with the hook according to the hook segmentation area and the anti-unhooking baffle segmentation area includes:
[0020] Determine the overlapping area between the hook segmentation area and the anti-unhooking baffle segmentation area;
[0021] According to the number of the overlapping areas, the intersection state of the end of the anti-unhooking baffle and the hook is determined.
[0022] Optionally, identifying the hook in the site image includes:
[0023] generating a hook identification frame surrounding the hook in the site image, wherein the hook identification frame represents the identified hook;
[0024] Determining the aspect ratio of the hook identification frame;
[0025] The hooks corresponding to the hook identification frames whose aspect ratios do not meet the preset aspect ratio standard are filtered out.
[0026] Optionally, when or after identifying the hook in the site image, the hook-off identification method further includes:
[0027] The hook size in the site image or the hook image is corrected according to the identified offset of the hook in the site image.
[0028] Optionally, the correcting the hook size in the site image or the hook image according to the identified offset of the hook in the site image includes:
[0029] Determining a vertical offset of the hook relative to a center of the site image;
[0030] According to the vertical offset, stretching the hook in the hook height direction;
[0031] Determining a horizontal offset of the hook relative to a center of the site image;
[0032] The hook is stretched in the hook width direction according to the horizontal offset.
[0033] In a second aspect, a hook-off identification device is provided, the hook-off identification device comprising:
[0034] an acquisition unit configured to acquire an image of the site using the hook;
[0035] A first recognition unit configured to recognize a hook in the site image and determine a hook segmentation area;
[0036] A cropping unit, configured to crop the site image to obtain a hook image according to the identified hook;
[0037] A second recognition unit is configured to recognize an anti-unhooking baffle in the hook image and determine an anti-unhooking baffle segmentation area when the anti-unhooking baffle exists;
[0038] a determination unit configured to determine a relative position of the anti-unhooking baffle relative to the hook according to the hook segmentation area and the anti-unhooking baffle segmentation area;
[0039] The risk identification unit is configured to identify whether the hook has a risk of unhooking based on whether the anti-unhooking baffle exists and / or based on the relative position.
[0040] In a third aspect, an electronic device is provided, comprising a processor and a memory storing a computer program, wherein the processor is configured to implement the method described in the embodiment of the present invention when running the computer program.
[0041] In a fourth aspect, a program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method described in the embodiment of the present invention is implemented.
[0042] In the hook unhooking identification scheme provided in the embodiment of the present invention, the hook is first identified and segmented in the site image, and then the hook image is cropped based on the identified hook, and then the anti-unhooking baffle is identified and segmented in the hook image, and then the relative position of the anti-unhooking baffle relative to the hook is determined by whether the anti-unhooking baffle exists and / or the hook segmentation area and the anti-unhooking baffle segmentation area, so as to identify whether the hook has a risk of unhooking. Compared with the existing scheme that directly determines whether the anti-unhooking device of the hook exists and whether it is invalid through image recognition, the hook unhooking identification scheme of the embodiment of the present invention has a high recognition success rate and a low false alarm rate, which solves the technical problem that the existing scheme is difficult to put into practical use.
[0043] Other optional features and technical effects of the embodiments of the present invention are partially described below, and partially can be understood by reading this document. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The elements shown are not limited to the proportions shown in the accompanying drawings. The same or similar reference numerals in the accompanying drawings represent the same or similar elements, wherein:
[0045] Figure 1 An example flow chart showing a method for identifying a hook unhooking according to an embodiment of the present invention;
[0046] Figure 2 A schematic diagram showing a site image using a hook according to an embodiment of the present invention;
[0047] Figure 3 A first schematic diagram showing a hook image cropped by the hook-off recognition method according to an embodiment of the present invention;
[0048] Figure 4 A second schematic diagram showing a hook image cropped by the hook-off recognition method according to an embodiment of the present invention;
[0049] Figure 5 A schematic diagram showing the segmentation area of the anti-unhooking baffle determined by the hook unhooking identification method according to an embodiment of the present invention;
[0050] Figure 6 A first schematic diagram showing a method for identifying hook unhooking according to an embodiment of the present invention for determining an angle between an anti-unhooking baffle and a hook;
[0051] Figure 7 A second schematic diagram showing the method for identifying hook unhooking according to an embodiment of the present invention for determining the angle between the anti-unhooking baffle and the hook;
[0052] Figure 8 A first schematic diagram showing a method for identifying hook unhooking according to an embodiment of the present invention for determining an intersection state between the end of an anti-unhooking baffle and a hook;
[0053] Fig. 9 A second schematic diagram showing the method for identifying hook unhooking according to an embodiment of the present invention for determining the intersection state between the end of the anti-unhooking baffle and the hook;
[0054] Fig.10 An exemplary structural diagram of a hook-off identification device according to an embodiment of the present invention is shown;
[0055] Fig.11 A schematic diagram showing an exemplary structure of an electronic device capable of implementing a method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific implementation methods and drawings. Here, the exemplary implementation methods of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0057] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0058] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0059] refer to Figure 1 , shows a method for identifying hook unhooking according to an embodiment of the present invention. In the embodiment of the present invention, hook unhooking identification is interpreted in a broad sense, covering the early warning of the hook's tendency to unhook and the alarm of the hook having been unhooked, and the early warning or alarm signal can be used only as a reminder signal, or as an indication signal to trigger related operations.
[0060] The hook unhooking identification method of the embodiment of the present invention can be implemented in any suitable engineering site using a crane / hook. In some exemplary embodiments, the hook unhooking identification method can be implemented in a road reconstruction and expansion scenario. It will be understood that the hook is usually provided with an anti-unhooking baffle pivotally connected thereto. However, these anti-unhooking baffles may fail due to aging or failure, causing the hook to unhook, thereby causing a safety accident. In this regard, the embodiment of the present invention provides a hook unhooking identification scheme that can accurately and reliably identify the presence and effective state of the anti-unhooking baffle.
[0061] like Figure 1 As shown, the hook unhooking identification method may include:
[0062] S110: Acquire a site image where the hook is used.
[0063] As mentioned above, the hook unhooking identification method of the embodiment of the present invention can be implemented in any suitable engineering site where a crane / hook is used. The site image is a site where a hook is used, such as a road reconstruction site. In this embodiment, the site image can be acquired by any suitable image acquisition device. In some embodiments, such as in a road reconstruction scenario, the site image can be acquired by a camera of a patrol robot, especially a camera of a patrol robot moving along a guardrail. In a specific example, the camera can be connected to a telescopic device installed on the top of the patrol robot to be able to acquire the appearance of the site, such as a road reconstruction site. Reference Figure 2 A schematic diagram of a road reconstruction and extension site image using a hook is shown. In the embodiment of the present invention, the site image is generally a side view, which can also be called a site side view image.
[0064] S120: Identify the hook in the site image and determine the hook segmentation area.
[0065] S130: According to the identified hook, the site image is cropped to obtain a hook image.
[0066] In the embodiment of the present invention, a hook recognition model based on an image segmentation algorithm may be used to recognize hooks in the site image and determine a hook segmentation area.
[0067] In an embodiment of the present invention, the image segmentation algorithm includes an image segmentation algorithm based on deep learning, including but not limited to the YOLO algorithm. The YOLO (You Only Look Once) algorithm is an image segmentation algorithm widely used in real-time detection and image segmentation. It combines convolutional neural networks (CNNs) and feature pyramid structures, can accurately identify and segment target objects of different scales, and adopts a lightweight design, so that the model has a faster reasoning speed while maintaining high accuracy.
[0068] In a specific embodiment of the present invention, Figure 2For example, in the above step 120, the acquired site image is processed using the YOLO algorithm / model. Specifically, the site image, especially the feature layer at different scales, i.e., different resolutions, is extracted from the site image; a bounding box is generated for target recognition. After a given target is recognized, the bounding box around the target predicts the category (category label) and the confidence score (category probability), wherein the confidence score (category probability) represents the probability that the object belongs to a certain category (for example, determined by the classification loss cls_loss). Thus, when the hook 201 is recognized in the site image, a bounding box surrounding the hook 201 is generated, which is here a recognition box P1 (also referred to as a prediction box) that characterizes the recognition of the hook. The recognition box may be combined with further features in some preferred embodiments of the present invention. In the case of target recognition or in a separate process after target recognition is completed, the fine-grained segmentation technique may be used and the difference between the bounding box predicted by the model and the true bounding box may be measured by, for example, calculating the bounding box loss (box_loss), so as to adjust and accurately segment the boundary of the hook and generate the corresponding hook segmentation area S1. Furthermore, in step S130, based on the identification of the hook, more specifically based on the identification frame P1 of the hook, the site image may be cropped to obtain a hook image 200, which may also be called a hook foreground image. Figure 3 and Figure 4 FIG. 2 is a schematic diagram showing a hook image 200 obtained by cropping a hook-off recognition method according to an embodiment of the present invention, wherein Figure 4 The anti-unhooking flap 202 is schematically shown in different pivot positions.
[0069] In a preferred embodiment of the present invention, Figure 2 As shown, regardless of whether the hook 201 is provided with the anti-unhooking baffle 202, the hook segmentation area S1 is a segmentation area that substantially does not include the anti-unhooking baffle 202. It will be understood here that the segmentation area that substantially does not include the anti-unhooking baffle 202 means that the image area corresponding to the anti-unhooking baffle 202 is not intentionally covered during segmentation, but it is not excluded that the hook segmentation area S1 slightly covers part of the image area of the anti-unhooking baffle 202 due to the physical intersection of the hook 201 and the anti-unhooking baffle 202, and this situation may be advantageous in some preferred embodiments of the present invention.
[0070] Accordingly, the hook unhooking identification method of the embodiment of the present invention may further include a hook identification model training step. In the training step, the hook identification model may be trained using a site training image with hooks marked. The hook segmentation area marked in the site training image also generally does not include an anti-unhooking baffle, regardless of whether the anti-unhooking baffle exists.
[0071] It is to be understood that the above description of the specific steps of the specific segmentation algorithm is only an example and is not to be regarded as limiting the present invention. Those skilled in the art can identify the hook and segment the hook segmentation area according to the segmentation algorithm suitable for the needs.
[0072] In some optional embodiments, screening that is beneficial to the identification of the risk of hook unhooking may be performed during the hook identification process.
[0073] In an optional embodiment, in step S120, identifying the hook in the site image includes: A11, generating a hook identification frame surrounding the hook in the site image; A12, determining the aspect ratio of the hook prediction frame; A13, filtering out the hooks corresponding to the hook prediction frames whose aspect ratios do not meet the preset aspect ratio standard.
[0074] In this embodiment, the hook recognition frame P1 described in step A11 is, for example, obtained by a hook recognition model based on an image segmentation algorithm, as described above. In a further embodiment, for example, a preset aspect ratio lower limit standard can be set to filter out the hooks corresponding to the hook prediction frames that are lower than the aspect ratio lower limit standard. In other embodiments, for example, a preset aspect ratio upper limit standard can be set to filter out the hooks corresponding to the hook prediction frames that exceed the aspect ratio (upper limit) standard. In other embodiments, the preset aspect ratio upper limit standard and the aspect ratio lower limit standard can be set at the same time to filter out the hooks corresponding to the hook prediction frames that are outside the aspect ratio upper and lower limit standards. In some embodiments, filtering out the hooks corresponding to the hook prediction frames may include treating the hooks as unrecognized even though there are hooks in the hook prediction frame, and optionally, hook image segmentation may not be performed.
[0075] As an explanation but not limitation, the inventors have found that in the use scenario of the hook, the hook is often not facing the image acquisition device (such as the camera of the inspection robot) due to the rotation of the rope or the blowing of the wind. In addition, the hook sometimes deviates from the image acquisition device (such as the camera of the inspection robot) far in the lateral direction, which may cause the hook to be excessively narrowed in the site image (the aspect ratio is too small), thereby affecting the correct identification of the risk of the hook being unhooked; or, in the use scenario of the hook, the hook can reach a position much higher than the image acquisition device (such as the camera of the inspection robot), which may cause the hook to be excessively flattened in the site image, thereby affecting the correct identification of the risk of the hook being unhooked. By implementing aspect ratio screening, the accuracy of correctly identifying the risk of the hook being unhooked can be greatly improved.
[0076] In another optional embodiment, hook offset screening may be introduced to screen out hooks whose image positions of the hooks in the site image do not meet a preset offset standard (range).
[0077] In a further preferred embodiment, when or after the hook is identified in the site image, a correction that is beneficial to the identification of the risk of hook unhooking can be performed.
[0078] In a preferred embodiment, the method for identifying hook detachment further comprises: B1, correcting the hook size in the site image or the hook image according to the offset degree of the identified hook in the site image.
[0079] In a more specific embodiment, step B1 may include: B11, determining the vertical offset of the hook compared to the center of the site image; B12, stretching the hook in the hook height direction according to the vertical offset; B13, determining the horizontal offset of the hook compared to the center of the site image; B14, stretching the hook in the hook width direction according to the horizontal offset.
[0080] In this embodiment, the offset, such as the vertical or horizontal offset, can be determined based on the hook identification frame P1 (such as the center of the hook identification frame P1) and a reference point of the field image, such as the center of the field image. In a specific embodiment, the above-mentioned offset can be more specifically characterized by the number of pixels.
[0081] As an explanation but not limitation, the inventors have found that due to the size of the hook and the position and orientation of the hook in the image, the current detection method based on image recognition to determine whether the hook is unhooked is difficult to detect effectively. In contrast, the embodiments of the present invention help identify the risk of hook unhooking through the relative position of the hook segmentation area and the anti-unhooking baffle segmentation area, especially in some preferred embodiments, the angle between the hook segmentation area and the anti-unhooking baffle segmentation area is used to help identify the risk of hook unhooking, which can greatly improve the accuracy of identifying the risk of hook unhooking. The inventors further improved the accuracy of identifying the risk of hook unhooking through the angle by stretching and correcting the hook image based on the hook bias, and can save the above-mentioned bias screening or at least greatly expand the bias standard (range) while ensuring the accuracy.
[0082] In this embodiment, the stretching amplitude in steps B12 and B14 may be determined based on the bias degree, for example, the greater the bias degree, the greater the stretching amplitude.
[0083] In a further embodiment, the stretching of various parts of the hook in B12 and B14 above can be equal in amplitude, or can be stretched according to a weight ratio (weight curve) determined according to the bias degree (for example, when the bias position has an upper bias, the upper part of the hook has a greater stretching amplitude; when the bias position has a lower bias, the lower part of the hook has a greater stretching amplitude).
[0084] In this embodiment, the size of the hook in the site image or the hook image can be corrected as needed. In other words, the site image can be corrected (such as stretching) before cropping and then the hook in the site image can be corrected (such as stretching), and cropping can be performed after stretching; or the hook image can be corrected (such as stretching) after cropping.
[0085] In an embodiment of the present invention, the identification and segmentation described in step S120 can be completed by a single process or two independent processes; in some embodiments, when completed by two independent processes, the same or different algorithms or models can be used to complete, which all fall within the scope of the present invention. As an example, in some embodiments, for example, the hook can be identified and the hook area can be segmented in one step by a model based on the YOLO algorithm. In another example, for example, the hook can be first identified by a model based on the YOLO algorithm, and then the above-mentioned screening and / or correction can be performed, and then the screened and / or corrected hook segmentation area can be segmented based on the model of the YOLO algorithm (optionally accompanied by hook identification at this time).
[0086] S140: Identify an anti-unhooking baffle in the hook image, and determine an anti-unhooking baffle segmentation area when the anti-unhooking baffle exists.
[0087] Similar to step S120, in step S140, the anti-unhooking baffle can be identified in the hook image using a baffle recognition model based on an image segmentation algorithm, and when the anti-unhooking baffle exists, the anti-unhooking baffle segmentation area is determined. Similarly, in this embodiment, the image segmentation algorithm includes an image segmentation algorithm based on deep learning, including but not limited to the YOLO algorithm. In addition, it will be understood that the algorithm used to identify and segment the hook may be the same as or different from the algorithm used to identify and segment the anti-unhooking baffle, which all fall within the scope of the present invention. Further, when identifying the anti-unhooking baffle, an anti-unhooking baffle recognition frame (prediction frame) can also be generated, and its generation method is not repeated here.
[0088] Figure 5 The identification frame P2 of the anti-unhooking baffle 202 and the anti-unhooking baffle segmentation area S2 in the hook image 200 are schematically shown. Figure 5 As shown, due to the physical intersection between the hook 201 and the anti-unhooking baffle 202, when the anti-unhooking baffle segmentation area S2 is segmented, it similarly causes the anti-unhooking baffle segmentation area S2 to slightly cover part of the image area of the hook 201. This situation may be advantageous in some preferred embodiments of the present invention.
[0089] Accordingly, the hook unhooking identification method of the embodiment of the present invention may further include a baffle recognition model training step. In the training step, the baffle recognition model may be trained using a hook training image with baffles marked. The hook training image includes but is not limited to a hook foreground image cropped from a site image or a hook image obtained by direct image acquisition.
[0090] S150: Determine the relative position of the anti-hook-off baffle relative to the hook according to the hook segmentation area and the anti-hook-off baffle segmentation area.
[0091] S160: Identify whether the hook is at risk of unhooking based on whether an anti-unhooking baffle is present and / or based on the relative position.
[0092] In the embodiments of the present invention, the relative position is interpreted broadly and may include any one or more of any suitable position parameters.
[0093] In a further embodiment, step S150 may include: C1. determining an angle of the anti-unhooking baffle relative to the hook according to the hook segmentation area and the anti-unhooking baffle segmentation area.
[0094] In some embodiments of the present invention, the angle α between the anti-unhooking baffle and the hook can be determined to help determine whether there is a risk of unhooking.
[0095] In some embodiments, a hook characterization line (such as a center line) can be generated according to the hook segmentation area, and a hook-proof baffle characterization line (such as a center line) can be generated according to the hook-proof baffle segmentation area, and the angle between the characterization lines can be determined accordingly. In a simplified embodiment, for example, the hook is regarded as vertical, that is, the vertical direction in the image, and the angle α can be directly determined according to the inclination angle of the hook-proof baffle characterization line generated by the hook-proof baffle segmentation area, which falls within the scope of the present invention.
[0096] In a specific embodiment, for example, a threshold range of an angle may be set, and it may be determined whether the angle falls within the threshold range to help determine whether there is a risk of hook unhooking. For example, in some embodiments, an upper threshold of an angle may be set, and an angle less than or equal to the upper threshold of the angle may be identified as (helping to identify as) having no risk of unhooking, such as Figure 6 As shown; Angles greater than the upper threshold of the angle can be identified as (help to identify as) having a decoupling risk, such as Figure 7 In some other embodiments, an upper and lower angle threshold may be set, and an angle that is less than or equal to the upper angle threshold and greater than or equal to the lower angle threshold may be identified as (helping to identify as) having no decoupling risk, such as Figure 6 As shown; Angles greater than the upper threshold of the angle can be identified as (help to identify as) having a decoupling risk, such as Figure 7As shown, an angle less than the lower limit of the angle threshold can also be identified as (helping to identify as) a risk of decoupling (not shown). The identification or help in identifying whether there is a risk of decoupling described in this article will be interpreted broadly. Unless otherwise specified, as long as one of the identification conditions is met, it also covers the formation of a single identification condition.
[0097] In an alternative or additional embodiment, step S150 may include: D1. Determining an intersection state between the end of the anti-unhooking baffle and the hook according to the hook segmentation area and the anti-unhooking baffle segmentation area.
[0098] As mentioned above, if Figure 2 As shown, the hook segmentation area S1 slightly covers part of the image area of the anti-unhooking baffle 202, such as Figure 5 As shown, the unhooking baffle segmentation area S2 slightly covers a portion of the image area of the hook 201. Therefore, in this embodiment, the intersection state of the end of the anti-unhooking baffle and the hook can be simply determined by judging the number of overlapping areas of the hook segmentation area and the unhooking baffle segmentation area.
[0099] In a further embodiment, step D1 may include: D11, determining the overlapping area between the hook segmentation area and the anti-unhooking baffle segmentation area; D12, determining the intersection state of the end of the anti-unhooking baffle and the hook according to the number of the overlapping areas.
[0100] In an exemplary embodiment, in step D11, overlapping pixels may be determined based on the pixel intersection of the hook segmentation area and the unhooking baffle segmentation area, and the overlapping pixels may be clustered to determine the overlapping area and further determine the number of overlapping areas.
[0101] In this embodiment, when there are two overlapping regions R1 and R2, it is determined that the end of the anti-unhooking baffle intersects with the hook, such as Figure 8 When there is only one overlapping region R1, it is determined that the end of the anti-unhooking baffle does not intersect with the hook, as shown in FIG. Fig. 9 shown.
[0102] In step S160, the intersection of the end of the anti-unhooking baffle and the hook can be used to help determine whether there is a risk of hook unhooking. For example, if the end of the anti-unhooking baffle intersects with the hook, it can be identified as (helped to identify as) no risk of unhooking, such as Figure 8 As shown; if the end of the anti-unhooking baffle does not intersect with the hook, it can be identified as (helps to identify as) a risk of unhooking, such as Fig. 9 shown.
[0103] As mentioned above, the identification or assistance in identifying whether there is a risk of unhooking as described herein will be interpreted broadly. Therefore, different identification conditions or combinations of identification conditions can be set according to whether an anti-unhooking baffle exists or not, and the relative position (angle, intersection state). For example, if there is no anti-unhooking baffle, it is directly identified as the risk of unhooking. If there is an anti-unhooking baffle, it is further determined whether the relative position meets the preset standard. If not, it is determined that there is a risk of unhooking. In a specific embodiment of this further judgment, the angle and the intersection state can be intersection conditions. For example, when the angle does not fall within the angle threshold range and the end of the anti-unhooking baffle does not intersect with the hook, it is identified as a risk, but the present invention is not limited to this.
[0104] In the embodiment of the present invention, Fig.10 As shown, a hook-off identification device 1000 is shown. Fig.10 In the embodiment of the present invention, the hook unhooking identification device 1000 includes an acquisition unit 1010, a first identification unit 1020, a cutting unit 1030, a second identification unit 1040, a determination unit 1050, and a risk identification unit 1060, wherein:
[0105] The acquisition unit 1010 is configured to acquire a site image using a hook.
[0106] The first recognition unit 1020 is configured to recognize a hook in the site image and determine a hook segmentation area.
[0107] The cropping unit 1030 is configured to crop the site image to obtain a hook image according to the identified hook.
[0108] The second recognition unit 1040 is configured to recognize an anti-unhooking baffle in the hook image, and determine an anti-unhooking baffle segmentation area when the anti-unhooking baffle exists.
[0109] The determining unit 1050 is configured to determine a relative position of the anti-unhooking baffle relative to the hook according to the hook segmentation area and the anti-unhooking baffle segmentation area.
[0110] The risk identification unit 1060 is configured to identify whether the hook has a risk of unhooking based on whether the anti-unhooking baffle exists and / or based on the relative position.
[0111] Fig.10 The figure only schematically shows some components of the device 1000, which does not mean that the hook unhooking identification device 1000 only includes Fig.10 Unit shown.
[0112] In embodiments of the present invention, method features may be combined with apparatus to obtain new embodiments, and vice versa.
[0113] In some embodiments of the present invention, an electronic device is provided, which includes a processor and a memory storing a computer program, wherein the processor is configured to implement a method of any embodiment of the present invention when running the computer program.
[0114] Fig.11 A schematic diagram of an electronic device 1100 that can be used to implement a method or implement an embodiment of the present invention is shown. In some embodiments, the number of electronic devices may be more or less than the number shown. In some embodiments, a single or multiple electronic devices may be used for implementation. In some embodiments, cloud or distributed electronic devices may also be used for implementation.
[0115] like Fig.11 As shown, the electronic device 1100 includes a processor 1101 and a memory 1102. The processor is used to execute programs stored in the memory, and these programs can implement the methods, steps or functions described in the above embodiments when executed by the computer. The processor 1101 may include various types of processors, such as a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), a digital signal processor (DSP), etc. The processor 1101 and the memory 1102 are interconnected through a bus 1103. The bus 1103 can also be connected to an input / output (I / O) interface, etc.
[0116] Although not shown, an embodiment of the present invention further provides a storage medium storing computer programs, which are configured to execute a method related to any embodiment when running.
[0117] Although not shown, in an embodiment of the present invention, a program product is provided. The program product includes a computer program. When the computer program is executed by a processor, the method of any embodiment of the present invention is implemented.
[0118] The methods, programs, systems, devices, etc. of the embodiments of the present invention may be executed or implemented in a single or multiple networked computers, or may be practiced in a distributed computing environment. In the embodiments of this specification, in these distributed computing environments, tasks may be performed by remote processing devices connected via a communication network.
[0119] Those skilled in the art should understand that the embodiments of the present specification may be provided as methods, systems or computer program products. Therefore, those skilled in the art may imagine that the functional modules / units or controllers and related method steps described in the above embodiments may be implemented in software, hardware or a combination of software / hardware.
[0120] Unless explicitly stated, the actions or steps of the methods, programs, and embodiments of the present invention do not have to be performed in a specific order and can still achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.
[0121] In this article, multiple embodiments of the present invention are described, but for the sake of brevity, the description of each embodiment is not exhaustive, and the same or similar features or parts between the embodiments may be omitted. In this article, "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" are meant to be applicable to at least one embodiment or example according to the present invention, but not all embodiments. The above terms do not necessarily mean to refer to the same embodiment or example. In the absence of contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples.
[0122] The exemplary systems and methods of the present invention have been specifically shown and described with reference to the above embodiments, which are merely examples of the best modes for implementing the present systems and methods. It will be appreciated by those skilled in the art that various changes may be made to the embodiments of the systems and methods described herein when implementing the present systems and / or methods without departing from the spirit and scope of the present invention as defined in the appended claims.
Claims
1. A method for identifying hook unhooking, characterized in that: The hook unhooking identification method comprises: Get images of the site using the hook; Identifying a hook in the site image and determining a hook segmentation area; According to the identified hook, cropping the site image to obtain a hook image; identifying an anti-unhooking baffle in the hook image, and determining an anti-unhooking baffle segmentation area when the anti-unhooking baffle exists; Determining the relative position of the anti-unhooking baffle relative to the hook according to the hook segmentation area and the anti-unhooking baffle segmentation area; Identify whether the hook has a risk of unhooking according to whether the anti-unhooking baffle exists and / or according to the relative position; Wherein, when or after the hook is identified in the site image, the hook unhooking identification method further includes: According to the identified bias degrees of the hooks in the site image, the hooks whose bias degrees do not meet the preset bias degree standard are screened out; and According to the identified offset of the hook in the site image, the hook size in the site image or the hook image is corrected, including: determining the vertical offset of the hook relative to the center of the site image; stretching the hook in the hook height direction according to the vertical offset; determining the horizontal offset of the hook relative to the center of the site image; and stretching the hook in the hook width direction according to the horizontal offset.
2. The hook-off identification method according to claim 1, characterized in that: Determining the relative position of the anti-unhooking baffle relative to the hook according to the hook segmentation area and the anti-unhooking baffle segmentation area includes: The angle of the anti-hook-off baffle relative to the hook is determined according to the hook segmentation area and the anti-hook-off baffle segmentation area.
3. The hook-off identification method according to claim 1, characterized in that: Determining the relative position of the anti-unhooking baffle relative to the hook according to the hook segmentation area and the anti-unhooking baffle segmentation area includes: According to the hook segmentation area and the anti-hook-off baffle segmentation area, an intersection state between the end of the anti-hook-off baffle and the hook is determined.
4. The hook-off identification method according to claim 3 is characterized in that: The step of determining the intersection state between the end of the anti-unhooking baffle and the hook according to the hook segmentation area and the anti-unhooking baffle segmentation area includes: Determine the overlapping area between the hook segmentation area and the anti-unhooking baffle segmentation area; According to the number of the overlapping areas, the intersection state of the end of the anti-unhooking baffle and the hook is determined.
5. The hook-off identification method according to claim 1, characterized in that: The identifying the hook in the site image comprises: generating a hook identification frame surrounding the hook in the site image, wherein the hook identification frame represents the identified hook; Determining the aspect ratio of the hook identification frame; The hooks corresponding to the hook identification frames whose aspect ratios do not meet the preset aspect ratio standard are filtered out.
6. A hook unhooking identification device, characterized in that: The hook unhooking identification device comprises: an acquisition unit configured to acquire an image of the site using the hook; A first recognition unit configured to recognize a hook in the site image and determine a hook segmentation area; A cropping unit, configured to crop the site image to obtain a hook image according to the identified hook; A second recognition unit is configured to recognize an anti-unhooking baffle in the hook image and determine an anti-unhooking baffle segmentation area when the anti-unhooking baffle exists; a determination unit configured to determine a relative position of the anti-unhooking baffle relative to the hook according to the hook segmentation area and the anti-unhooking baffle segmentation area; A risk identification unit is configured to identify whether the hook has a risk of unhooking according to whether the anti-unhooking baffle exists and / or according to the relative position; and further includes: a filtering unit configured to filter out the hooks whose offset does not meet a preset offset standard according to the identified offset of the hooks in the site image; and A correction unit is configured to correct the hook size in the site image or the hook image according to the identified offset of the hook in the site image, including: determining the vertical offset of the hook relative to the center of the site image; stretching the hook in the hook height direction according to the vertical offset; determining the horizontal offset of the hook relative to the center of the site image; and stretching the hook in the hook width direction according to the horizontal offset.
7. An electronic device, characterized in that: The invention comprises a processor and a memory storing a computer program, wherein the processor is configured to implement the method according to any one of claims 1 to 5 when running the computer program.
8. A program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
