Method and apparatus for determining tightness state of line, device, and storage medium
Through the cable recognition model and Hough transformation algorithm, the cable tightness state is automatically calculated, which solves the stability and efficiency problems of manual judgment in the prior art, and achieves efficient and accurate cable status monitoring.
Patent Information
- Application Number
- PCT/CN2024/106874
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-25
- Filing Date
- 2024-07-23
- Publication Date
- 2025-07-03
AI Technical Summary
In the prior art, the judgment of the tightness of the cable depends on manual experience, has poor stability and low efficiency, cannot operate all day, and is highly dependent on manual operation.
Through the cable recognition model, semantic segmentation model and cable state calculation formula, combined with the Hough transformation algorithm, the cable distribution data is automatically identified and the elastic state is calculated to achieve automated judgment.
It realizes efficient and accurate judgment of the tightness status of the cable, solves the problems of poor stability and low efficiency of manual judgment, and achieves the effect of automatic operation all-weather.
Smart Images

Figure CN2024106874_03072025_PF_FP_ABST
Abstract
Description
Method, device, equipment and storage medium for determining the tightness of a cable
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] The present disclosure claims priority to Chinese patent application CN202311799607.6, filed on December 25, 2023, entitled “Method, device, apparatus and storage medium for determining the tightness of a cable,” the entire contents of which are incorporated by reference into the present disclosure. Technical Field
[0003] The present disclosure relates to the field of rail transportation, and in particular to a method, device, equipment and storage medium for determining the tightness of a cable. Background Art
[0004] A mooring system typically consists of cables, cable tensioning devices, and cable adjusters, ensuring a stable mooring condition for the ship. The tension of the cables changes as the ship loads and unloads cargo. During unloading, the draft decreases, keeping the cables straight; during loading, the draft increases, causing the cables to bend. Maintaining the proper cable tension effectively prevents accidents and ensures the safety of berthed vessels. Currently, cable tension is typically determined manually, with port and ship staff constantly observing and incorporating extensive experience. However, this method suffers from technical issues such as poor stability, high expertise requirements, low timeliness, heavy reliance on manual labor, and the inability to operate 24 / 7.
[0005] Summary of the Invention
[0006] The embodiments of the present disclosure provide a method, apparatus, device, and storage medium for determining the tightness of a cable, which can determine cable distribution data through network model recognition, and then automatically calculate the tightness of the cable in combination with a designed cable state calculation formula, thereby solving the problem of poor stability and low efficiency of human judgment in actual engineering, and achieving the technical effect of efficient and accurate operation.
[0007] In a first aspect, an embodiment of the present disclosure provides a method for determining the tightness of a cable, the method comprising: obtaining a target detection image, a cable recognition model, a semantic segmentation model, and a cable state calculation formula; wherein the cable recognition model is obtained through training, and the cable state calculation formula comprises three constants and point coordinate parameters; determining cable distribution data based on the target detection image and the cable recognition model; processing the cable distribution data based on the semantic segmentation model in combination with the Hough transform algorithm to determine the Hough transform result; determining the tightness of the cable in the target detection image based on the Hough transform result and the cable state calculation formula.
[0008] In a second aspect, an embodiment of the present disclosure further provides a device for determining the tightness of a cable, the device comprising: an acquisition module configured to acquire a target detection image, a cable recognition model, a semantic segmentation model and a cable state calculation formula; wherein the cable recognition model is obtained through training, and the cable state calculation formula comprises three constants and point coordinate parameters; a first determination module configured to determine the cable distribution data based on the target detection image and the cable recognition model; a second determination module configured to process the cable distribution data based on the semantic segmentation model combined with the Hough transform algorithm to determine the Hough transform result; a third determination module configured to determine the tightness of the cable in the target detection image based on the Hough transform result and the cable state calculation formula.
[0009] In a third aspect, an embodiment of the present disclosure further provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for determining the tightness of a cable as provided in any embodiment of the present disclosure is implemented.
[0010] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, a method for determining the tightness of a cable as provided in any embodiment of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] FIG1 is a flow chart of a method for determining the tightness of a cable provided by an embodiment of the present disclosure;
[0012] FIG2 is a flow chart of a method for training a cable recognition model provided by an embodiment of the present disclosure;
[0013] FIG3 is a flow chart of a method for processing an image before determining cable distribution data, provided by an embodiment of the present disclosure;
[0014] FIG4 is a schematic diagram of a midpoint of a cable bending point set and a line connecting breakpoints provided by an embodiment of the present disclosure;
[0015] FIG5 is a schematic structural diagram of a device for determining the tightness of a cable provided by an embodiment of the present disclosure;
[0016] FIG6 is a schematic structural diagram of another device for determining the tightness of a cable provided by an embodiment of the present disclosure;
[0017] FIG7 is a schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0018] The present disclosure will be further described below with reference to the embodiments shown in the accompanying drawings. It should be understood that the specific embodiments described herein are intended only to illustrate the present disclosure and are not intended to limit the present disclosure. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present disclosure, rather than all structures.
[0019] Additionally, in the embodiments of the present disclosure, words such as "optionally" or "exemplarily" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "optionally" or "exemplarily" in the embodiments of the present disclosure should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "optionally" or "exemplarily" is intended to present the relevant concepts in a concrete manner.
[0020] An embodiment of the present disclosure provides a flow chart of a method for determining the tightness of a cable, as shown in FIG1 . The method may include but is not limited to the following steps S101 to S104 .
[0021] S101. Obtain a target detection image, a cable recognition model, a semantic segmentation model, and a cable state calculation formula.
[0022] The target detection image can be understood as an image of a cable towing a ship, captured in the environment to be detected (e.g., a scene with ships docked at a pier). In one exemplary embodiment, the cable recognition model can utilize a trained YOLO model to perform image recognition and prediction on the target detection image. A semantic segmentation model is used in conjunction with the YOLO model to process the target detection image to obtain cable distribution data. The cable state calculation formula includes three constant parameters (e.g., A, B, and C) and point coordinate parameters. This expression is used to calculate the tension of the cable in the target detection image.
[0023] S102: Determine cable distribution data based on the target detection image and the cable recognition model.
[0024] In an exemplary embodiment, the implementation of this step may include but is not limited to the following methods: dividing the target detection image into multiple cells; detecting the center point extracted by the cable recognition model in the cell; predicting the bounding box and the confidence of the bounding box based on the cell; making predictions based on the center point, bounding box and confidence to determine the cable distribution data.
[0025] In one exemplary embodiment, the target detection image is divided into an S*S grid. The convolutional neural network (CNN) network in the cable recognition model extracts the target detection image to obtain the center point. The center point extracted by the cable recognition model in each cell (i.e., the aforementioned grid) is detected. Based on the cell-based bounding box prediction and the confidence level of the bounding box, two bounding boxes are predicted for each cell, and each bounding box predicts five elements, including x, y, w, h, and c, where x and y represent the horizontal and vertical coordinates of the bounding box, w and h represent the size of the bounding box (i.e., width and height), and c represents the confidence level of the bounding box. Based on the center point, bounding box, and confidence level, algorithms such as non-maximum suppression (NMS) are used for network prediction to determine the cable distribution data.
[0026] S103. Process the cable distribution data based on the semantic segmentation model in combination with the Hough transform algorithm to determine the Hough transform result.
[0027] In an exemplary embodiment, this step may be implemented by performing curve fitting on the cable distribution data based on a semantic segmentation model combined with a Hough transform algorithm to obtain a set of cable bending points; and determining the set of cable bending points as a Hough transform result. The Hough transform is a feature extraction technique in image processing. This process calculates the local maximum of the cumulative results in a parameter space to obtain a set that conforms to a specific shape as the Hough transform result.
[0028] S104. Determine the tightness of the cable in the target detection image according to the Hough transform result and the cable state calculation formula.
[0029] In an exemplary embodiment, after obtaining the Hough transform result through the Hough transform, combined with the cable state calculation formula, the distance between each point in the cable bending point set and the line connecting the two end points of the curve obtained by the Hough transform fitting is calculated in sequence, and the curvature of the cable is judged by the size of the distance, thereby determining the tightness of the cable.
[0030] The disclosed embodiments provide a method for determining the tension of a cable, comprising: obtaining a target detection image, a cable recognition model, a semantic segmentation model, and a cable state calculation formula; wherein the cable recognition model is trained, and the cable state calculation formula includes three constants and point coordinate parameters; determining cable distribution data based on the target detection image and the cable recognition model; processing the cable distribution data based on the semantic segmentation model in conjunction with the Hough transform algorithm to determine a Hough transform result; and determining the tension of the cable in the target detection image based on the Hough transform result and the cable state calculation formula. This solution determines the cable distribution data through network model recognition and automatically calculates the tension of the cable using a designed cable state calculation formula. This solution can address the issues of poor stability and low efficiency of manual judgment in actual engineering projects, achieving efficient and accurate operation.
[0031] As shown in FIG. 2 , in one example, a method of training a cable recognition model may include but is not limited to the following steps S201 to S205 .
[0032] S201: Obtain a cable dataset to be trained and a model to be trained.
[0033] S202: Perform noise reduction processing on the cable dataset to be trained to obtain a first dataset.
[0034] The noise reduction process in this step can improve the accuracy of network model training.
[0035] S203: Perform enhancement processing on the first data set to obtain a second data set.
[0036] In order to obtain an effective cable dataset, a large number of on-site pictures need to be collected. However, due to constraints, it is impossible to collect enough data. Therefore, multiple enhancement methods can be used to enhance the first dataset to obtain the second dataset.
[0037] In an exemplary embodiment, the following enhancement methods may be used in the embodiments of the present disclosure:
[0038] Method 1: Subtract the RGB value of the pixel in the image from 255 (i.e., invert the pixel value) to get the inverted new image.
[0039] Method 2: Color dithering, which randomly adjusts the saturation, brightness, contrast, and sharpness of the image through a random function to generate a new image;
[0040] Method 3: Automatic Color Enhancement (ACE) uses local adaptive filtering based on the spatial relationship between color and brightness in an image to achieve brightness, color, and contrast adjustments with local and nonlinear characteristics, while satisfying the gray world theory and white speckle assumptions to produce new images.
[0041] Method 4: color reduction processing, that is, the image is represented by 4 pixel values. For example, compress the image from 2563 to 4 3 , RGB values only take four values to generate a new image;
[0042] Method 5: Convert the RGB color space to the HSI color space to obtain a new image;
[0043] Method 6: Perform color image histogram equalization to obtain a new image.
[0044] New images are obtained through different enhancement methods, and the new images are added to the first data set to obtain a second data set, so as to increase the number of parameters of the data set required for training.
[0045] S204: Label the cable part in the second data set to obtain a semantic segmentation data set.
[0046] In an exemplary embodiment, a data annotation tool may be used to annotate the cable portion of the image in the second dataset to obtain a semantic segmentation dataset.
[0047] S205. Train the model to be trained according to the semantic segmentation dataset to obtain a cable recognition model.
[0048] As shown in FIG3 , in an example, before step S102 , the embodiment of the present disclosure further provides an implementation method, including but not limited to the following steps S301 to S302 .
[0049] S301: Perform noise reduction processing on the target detection image.
[0050] In one exemplary embodiment, the CBDNet network can be used to perform noise reduction on target detection images captured by the sensor to improve the accuracy of the cable recognition model. In one exemplary embodiment, the CBDNet network can be composed of two components: a noise estimation subnetwork and a denoising subnetwork. End-to-end training is performed simultaneously. For example, images synthesized from signal-independent noise and noise processed internally by the camera are trained jointly with real noisy images, thereby improving the generalization capability of the denoising network and enhancing the denoising effect. Real noisy images can include images from other datasets, such as RENOIR, DND, and NC12.
[0051] S302: Binarize the denoised target detection image.
[0052] In an exemplary embodiment, the PIL library can be used to perform a binarization process on the obtained image data. It is understandable that due to the large color difference between the ship's cable and the hull, the binarization process can effectively separate the hull and the cable in the image.
[0053] In one example, the cable state calculation formula may include:
[0054] Among them, x i ,y i are the horizontal and vertical coordinates of the midpoint of the cable bending point set, and A, B, and C are the straight line A*x 2 +B*x+C=0, and the straight line is the line connecting the coordinate points representing the two end points of the cable in the cable bending point set. The straight line is shown in FIG4 , and the points in FIG4 are points in the cable bending point set.
[0055] FIG5 is a schematic structural diagram of a device for determining the tightness of a cable provided by an embodiment of the present disclosure. As shown in FIG5 , the device may include: an acquisition module 501 , a first determination module 502 , a second determination module 503 , and a third determination module 504 .
[0056] an acquisition module configured to acquire a target detection image, a cable recognition model, a semantic segmentation model, and a cable state calculation formula;
[0057] Among them, the cable recognition model is obtained through training, and the cable state calculation formula includes three constants and point coordinate parameters;
[0058] a first determination module configured to determine cable distribution data based on the target detection image and the cable recognition model;
[0059] The second determination module is configured to process the cable distribution data based on the semantic segmentation model in combination with the Hough transform algorithm to determine the Hough transform result;
[0060] The third determination module is configured to determine the tightness of the cable in the target detection image according to the Hough transform result and the cable state calculation formula.
[0061] In one example, a method for training a cable recognition model includes:
[0062] Obtain the cable dataset and model to be trained;
[0063] Performing noise reduction processing on the cable data set to be trained to obtain a first data set;
[0064] Performing enhancement processing on the first data set to obtain a second data set;
[0065] Annotate the cable part in the second dataset to obtain a semantic segmentation dataset;
[0066] The model to be trained is trained based on the semantic segmentation dataset to obtain a cable recognition model.
[0067] In an exemplary embodiment, performing enhancement processing on a first data set to obtain a second data set includes:
[0068] The first data set is enhanced using multiple enhancement methods to obtain a second data set.
[0069] As shown in FIG6 , in one example, the apparatus may further include a noise reduction module 505 and a processing module 506 ;
[0070] Wherein, the noise reduction module is configured to perform noise reduction processing on the target detection image;
[0071] The processing module is configured to perform binarization processing on the denoised target detection image.
[0072] In one example, the first determining module is further configured to perform the following process:
[0073] Divide the target detection image into multiple cells;
[0074] Detect the center point extracted by the cable recognition model within the cell;
[0075] Predict bounding boxes and confidence of bounding boxes based on cells;
[0076] Determine cable distribution data by making predictions based on center points, bounding boxes, and confidence levels.
[0077] In one example, the second determination module is specifically configured to perform curve fitting on the cable distribution data based on a semantic segmentation model combined with a Hough transform algorithm to obtain a set of cable bending points; and determine the set of cable bending points as a Hough transform result.
[0078] In one example, the cable state calculation formula includes:
[0079] Among them, x i ,y i are the horizontal and vertical coordinates of the midpoint of the cable bending point set, and A, B, and C are the straight line A*x 2 +B*x+C=0, and the straight line is the line connecting the coordinate points representing the two end points of the cable in the cable bending point set.
[0080] The device for determining the tightness of a cable can execute the method for determining the tightness of a cable provided in FIG. 1 to FIG. 3 , and has the corresponding devices and beneficial effects of the method.
[0081] Figure 7 is a structural diagram of a computer device provided by an embodiment of the present disclosure. As shown in Figure 7, the computer device includes a controller 701, a memory 702, an input device 703, and an output device 704. The number of controllers 701 in the computer device can be one or more, and Figure 7 takes one controller 701 as an example. The controller 701, memory 702, input device 703, and output device 704 in the computer device can be connected via a bus or other means, and Figure 7 takes connection via a bus as an example.
[0082] The memory 702, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the method for determining the tension of a cable in the embodiment of FIG1 (e.g., the acquisition module 501, the first determination module 502, the second determination module 503, the third determination module 504, etc. in the apparatus for determining the tension of a cable). The controller 701 executes the software programs, instructions, and modules stored in the memory 702 to perform various functions of the computer device and process data, thereby implementing the aforementioned method for determining the tension of a cable.
[0083] The memory 702 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the computer. Furthermore, the memory 702 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, the memory 702 may further include memory remotely located relative to the controller 701, and these remote memories may be connected to a terminal / server via a network. Examples of networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0084] The input device 703 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the computer device. The output device 704 may include a display device such as a display screen.
[0085] The embodiment of the present disclosure further provides a storage medium containing computer-executable instructions. When the computer-executable instructions are executed by a computer controller, they are used to perform a method for determining the tightness of a cable. The method includes the steps shown in FIG. 1 .
[0086] The disclosed embodiments provide a method, apparatus, device, and storage medium for determining the tension of a cable, including: obtaining a target detection image, a cable recognition model, a semantic segmentation model, and a cable state calculation formula; wherein the cable recognition model is trained, and the cable state calculation formula includes three constants and point coordinate parameters; determining cable distribution data based on the target detection image and the cable recognition model; processing the cable distribution data based on the semantic segmentation model in conjunction with the Hough transform algorithm to determine the Hough transform result; and determining the tension of the cable in the target detection image based on the Hough transform result and the cable state calculation formula. This solution determines the cable distribution data through network model recognition and automatically calculates the tension of the cable using a designed cable state calculation formula. This solution can address the problems of poor stability and low efficiency of manual judgment in actual engineering projects, achieving efficient and accurate operation.
[0087] Through the above description of the implementation methods, those skilled in the art can clearly understand that the present disclosure can be implemented with the help of software and necessary general-purpose hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present disclosure.
[0088] It is worth noting that the modules included in the above-mentioned device for determining the tightness of the cable are only divided according to functional logic, but are not limited to the above-mentioned division method. As long as the corresponding functions can be achieved, it is not used to limit the scope of protection of this disclosure.
[0089] Note that the above are merely preferred embodiments of the present disclosure and the technical principles employed. Those skilled in the art will appreciate that the present disclosure is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions are possible for those skilled in the art without departing from the scope of protection of the present disclosure. Therefore, although the present disclosure has been described in detail through the above embodiments, the present disclosure is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present disclosure. The scope of the present disclosure is determined by the scope of the appended claims.
Claims
1. A method for determining the tightness state of a cable, comprising: Obtaining a target detection image, a cable recognition model, a semantic segmentation model, and a cable state calculation formula; Wherein, the cable recognition model is obtained through training, and the cable state calculation formula includes three constants and point coordinate parameters; Determining cable distribution data according to the target detection image and the cable recognition model; Processing the cable distribution data based on the semantic segmentation model combined with the Hough transform algorithm to determine the Hough transform result; Determining the tightness state of the cable in the target detection image according to the Hough transform result and the cable state calculation formula.
2. The method according to claim 1, wherein, Training the cable recognition model includes: Obtaining a cable dataset to be trained and a model to be trained; Performing noise reduction processing on the cable dataset to be trained to obtain a first dataset; Performing enhancement processing on the first dataset to obtain a second dataset; Annotating the cable part in the second dataset to obtain a semantic segmentation dataset; Training the model to be trained according to the semantic segmentation dataset to obtain the cable recognition model.
3. The method according to claim 2, wherein, The performing enhancement processing on the first dataset to obtain a second dataset includes: Performing enhancement processing on the first dataset using multiple enhancement methods to obtain a second dataset.
4. The method according to claim 1, wherein Before determining the cable distribution data according to the target detection image and the cable recognition model, the method further includes: Performing noise reduction processing on the target detection image; Performing binarization processing on the denoised target detection image.
5. The method according to claim 1 or 4, wherein The determining the cable distribution data according to the target detection image and the cable recognition model includes: Dividing the target detection image into multiple cells; Detecting the center points extracted by the cable recognition model within the cells; Predicting the bounding box and the confidence of the bounding box based on the cells; Performing prediction based on the center points, the bounding box, and the confidence to determine the cable distribution data.
6. The method according to claim 1, wherein The processing the cable distribution data based on the semantic segmentation model combined with the Hough transform algorithm to determine the Hough transform result includes: Performing curve fitting on the cable distribution data based on the semantic segmentation model combined with the Hough transform algorithm to obtain a set of cable bending points; Determining the set of cable bending points as the Hough transform result.
7. The method according to claim 6, wherein The cable state calculation formula includes: where x i , y i are the abscissa and ordinate values of the midpoint of the set of cable bending points respectively, A, B, and C are the parameters in the straight line A*x 2 +B*x + C = 0, and the straight line is the connection line between the coordinate points representing the two ends of the cable in the set of cable bending points.
8. A device for determining the tightness state of a cable, comprising: An obtaining module configured to obtain a target detection image, a cable recognition model, a semantic segmentation model, and a cable state calculation formula; Wherein, the cable recognition model is obtained through training, and the cable state calculation formula includes three constants and point coordinate parameters; A first determination module configured to determine cable distribution data according to the target detection image and the cable recognition model; A second determination module configured to process the cable distribution data based on the semantic segmentation model combined with the Hough transform algorithm to determine the Hough transform result; A third determination module configured to determine the tightness state of the cable in the target detection image according to the Hough transform result and the cable state calculation formula.
9. A computer device, comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the method for determining the tightness state of the cable as described in any one of claims 1-7 is implemented.
10. An apparatus-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for determining the tightness state of the cable as described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Seismic-data-based method for automatically extracting quantitative description parameters of submarine water channel
CN109143359A
YOLOv2 algorithm-based catenary positioning pipe inclined stay wire fault detection method
CN112132820A
Method for identifying hoisting object in construction scene
CN112561989A
Method for measuring horizontal bending of crane by using total station
CN113884049A
Method for measuring sidewise bending of crane by total station
CN114088008A