A gantry crane track occlusion detection method
By building and training a gantry crane track segmentation model and using the U2Net network to automatically identify track occlusions, the problems of low efficiency and poor safety of manual inspections in existing technologies are solved, and automatic detection and timely alarms are achieved.
Patent Information
- Application Number
- CN202311001644.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-09
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-08-09
AI Technical Summary
Existing gantry cranes are unable to automatically detect whether the track is blocked in real time and rely on manual inspections, which poses a safety hazard and is inefficient.
A gantry crane track segmentation model was constructed. Images were acquired through surveillance cameras and trained using the U2Net network. The model automatically identified whether the track was blocked and used binarization and projection processing to determine the track status.
It realizes automatic detection without manual inspection, improves safety and efficiency, detects track obstructions in time, and ensures work safety.
Smart Images

Figure CN117197046B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a gantry crane track occlusion detection method. Background Art
[0002] Gantry cranes are primarily used for loading and unloading outdoor cargo yards, material yards, and bulk cargo. They are widely used in port cargo yards due to their high site utilization, large operating range, wide adaptability, and strong versatility.
[0003] The gantry crane structure resembles a door-shaped frame, with two legs mounted under the main beam, allowing it to travel directly on ground tracks. The main beam can have outrigger beams at either end. For example, Chinese invention patent application number CN 202211220945.5 (publication number CN115417306A) discloses an adjustable gantry crane. By providing a track at the bottom of the base, which is fixed to the bottom surface, the gantry crane can be easily repositioned without manual handling or disassembly.
[0004] However, the gantry crane in the existing technology has a large operating range, and it is impossible to observe in real time in the cockpit whether the track is blocked by foreign objects. It can only rely on special staff to conduct manual inspections. Once the track is found to be blocked by foreign objects, it needs to be reported in time. If the report is not timely, it will cause safety problems in the operation of the gantry crane, which is very likely to cause accidents with serious consequences. In addition, the manual inspection method is time-consuming and labor-intensive, and the operation under the gantry crane is very dangerous, and the life safety of the inspectors cannot be guaranteed.
[0005] Therefore, it is necessary to further improve the existing technology. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide a gantry crane track obstruction detection method that can automatically identify track obstruction conditions to ensure work safety in response to the above-mentioned existing technologies.
[0007] The technical solution adopted by the present invention to solve the above technical problems is: a gantry crane track occlusion detection method, characterized by comprising the following steps:
[0008] S1. Obtain a dataset of multiple gantry crane track images, where each sample in the dataset includes a gantry crane track image and a label corresponding to the gantry crane track image, and the label corresponding to the gantry crane track image is an image of the track area in the gantry crane track image;
[0009] S2. Build a gantry crane track segmentation model, and use the data set in S1 to train the built gantry crane track segmentation model to obtain a trained gantry crane track segmentation model;
[0010] S3. Obtain a gantry crane track image, use it as a test sample, and input the test sample into the trained gantry crane track segmentation model to obtain a segmented image;
[0011] S4. Determine whether the track in the segmented image runs through the entire segmented image. If so, the current gantry crane track is not blocked; if not, the current gantry crane track is blocked.
[0012] In order to obtain the gantry crane track image, the gantry crane track image is obtained by shooting with a monitoring camera on the gantry crane.
[0013] In the above solution, the label corresponding to the gantry crane track image in S1 is obtained in the following way:
[0014] It is represented by a single-channel image of the same size as the current gantry crane track image. If the pixel point at a certain coordinate in the current gantry crane track image is the background, the pixel at the corresponding position of the single-channel image is set to 0; if the pixel point at a certain coordinate in the current gantry crane track image is the track, the pixel at the corresponding position of the single-channel image is set to 255.
[0015] Preferably, the specific process of training the gantry crane track segmentation model in S2 is:
[0016] S2-1. Normalize each gantry crane track image in the data set to obtain a normalized data set;
[0017] S2-2. Select some gantry crane track images and their corresponding labels in batches and input them into the gantry crane track segmentation model. The gantry crane track images serve as the input of the gantry crane track segmentation model, and the labels corresponding to the gantry crane track images serve as the output of the gantry crane track segmentation model.
[0018] S2-3. Calculate the training loss function of the gantry crane track segmentation model by gradient descent, and reversely update the model parameters of the gantry crane track segmentation model according to the training loss function;
[0019] S2-4. If the gantry crane track segmentation model reaches the set maximum number of iterations or minimum error value, the training is completed, and the trained gantry crane track segmentation model is obtained.
[0020] Preferably, the gantry crane track segmentation model in S2 adopts the U2Net network.
[0021] In the above solution, the specific method of determining whether the track in the segmented image runs through the entire segmented image in S4 is:
[0022] S4-1, binarizing the segmented image to obtain a binarized segmented image;
[0023] The specific operation of binarization is: set the pixels of the background part of the segmented image to 0, and set the pixels of the track part of the segmented image to 1;
[0024] S4-2, projecting the binarized segmented image in S4-1 along its length direction to obtain a one-dimensional vector;
[0025] The specific method of obtaining the one-dimensional vector is: accumulating the pixels in the same width direction of the binarized segmented image to obtain multiple values projected on the length direction of the binarized segmented image, that is, these values constitute a one-dimensional vector;
[0026] S4-3, obtaining the maximum value in the one-dimensional vector;
[0027] S4-4. Compare the maximum value in S4-3 with the width of the segmented image to determine whether the maximum value is smaller than the height of the segmented image. If so, the current gantry crane track is blocked; if not, the current gantry crane track is not blocked.
[0028] Compared with the existing technology, the advantages of the present invention are: by constructing a gantry crane track segmentation model and training the constructed gantry crane track segmentation model using a dataset, a trained gantry crane track segmentation model is obtained. Therefore, the acquired gantry crane track image can be input into the trained gantry crane track segmentation model to obtain a segmented image. Finally, by judging the segmented image, the result of whether the current gantry crane track is blocked can be obtained. Therefore, this method can automatically detect whether the gantry crane track is blocked without manual inspection, ensuring work safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is a flow chart of a gantry crane track occlusion detection method in an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The present invention will be described in further detail below with reference to the accompanying drawings and embodiments.
[0031] like Figure 1 As shown, the gantry crane track obstruction detection method in this embodiment includes the following steps:
[0032] S1. Obtain a dataset of multiple gantry crane track images, where each sample in the dataset includes a gantry crane track image and a label corresponding to the gantry crane track image, and the label corresponding to the gantry crane track image is an image of the track area in the gantry crane track image;
[0033] In this embodiment, the gantry crane track image is obtained by: photographing and obtaining it through a monitoring camera on the gantry crane;
[0034] The labels corresponding to the gantry crane track images are manually annotated. The specific annotation method is as follows:
[0035] Use a single-channel image of the same size as the current gantry crane track image to represent it. If a pixel point at a certain coordinate in the current gantry crane track image is the background, then the pixel at the corresponding position of the single-channel image is set to 0; if a pixel point at a certain coordinate in the current gantry crane track image is the track, then the pixel at the corresponding position of the single-channel image is set to 255;
[0036] S2. Build a gantry crane track segmentation model, and use the data set in S1 to train the built gantry crane track segmentation model to obtain a trained gantry crane track segmentation model;
[0037] In this embodiment, the gantry crane track segmentation model adopts the U2Net network, and the training loss function adopts cross entropy and similarity metric loss; of course, other segmentation networks in the prior art can also be used;
[0038] The specific process of training the gantry crane track segmentation model is as follows:
[0039] S2-1. Normalize each gantry crane track image in the data set to obtain a normalized data set;
[0040] In this embodiment, the normalization process includes but is not limited to dividing all pixel values in each image by the maximum pixel value in the image;
[0041] S2-2. Select some gantry crane track images and their corresponding labels in batches and input them into the gantry crane track segmentation model. The gantry crane track images serve as the input of the gantry crane track segmentation model, and the labels corresponding to the gantry crane track images serve as the output of the gantry crane track segmentation model.
[0042] S2-3. Calculate the training loss function of the gantry crane track segmentation model by gradient descent, and reversely update the model parameters of the gantry crane track segmentation model according to the training loss function;
[0043] S2-4. If the gantry crane track segmentation model reaches the set maximum number of iterations or minimum error value, the training ends, and the trained gantry crane track segmentation model is obtained;
[0044] S3. Obtain a gantry crane track image, use it as a test sample, and input the test sample into the trained gantry crane track segmentation model to obtain a segmented image;
[0045] S4. Determine whether the track in the segmented image runs through the entire segmented image. If so, the current gantry crane track is not blocked; if not, the current gantry crane track is blocked;
[0046] In this embodiment, the specific method for determining whether the track in the segmented image runs through the entire segmented image is:
[0047] S4-1, binarizing the segmented image to obtain a binarized segmented image;
[0048] The specific operation of binarization is: set the pixels of the background part of the segmented image to 0, and set the pixels of the track part of the segmented image to 1;
[0049] S4-2, projecting the binarized segmented image in S4-1 along its length direction to obtain a one-dimensional vector;
[0050] The specific method of obtaining the one-dimensional vector is: accumulating the pixels in the same width direction of the binarized segmented image to obtain multiple values projected on the length direction of the binarized segmented image, that is, these values constitute a one-dimensional vector;
[0051] For ease of understanding, the binarized segmented image can be viewed as an M*N two-dimensional matrix. The binarized segmented image is projected along its length, that is, the pixels in each column are accumulated to obtain a 1*N one-dimensional vector.
[0052] S4-3, obtaining the maximum value in the one-dimensional vector;
[0053] S4-4. Compare the maximum value in S4-3 with the width of the segmented image to determine whether the maximum value is smaller than the height of the segmented image. If so, the current gantry crane track is blocked; if not, the current gantry crane track is not blocked.
[0054] In addition, the above-mentioned detection method is implemented on the controller. If it is determined that the current gantry crane track is blocked, the controller can be connected to the alarm system to issue an alarm, or the staff can be reminded through communication to detect problems in time and ensure work safety.
[0055] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A gantry crane track occlusion detection method, characterized in that The steps include: S1. Obtain a dataset of multiple gantry crane track images, where each sample in the dataset includes a gantry crane track image and a label corresponding to the gantry crane track image, and the label corresponding to the gantry crane track image is an image of the track area in the gantry crane track image; S2. Build a gantry crane track segmentation model, and use the data set in S1 to train the built gantry crane track segmentation model to obtain a trained gantry crane track segmentation model; S3. Obtain a gantry crane track image, use it as a test sample, and input the test sample into the trained gantry crane track segmentation model to obtain a segmented image; S4. Determine whether the track in the segmented image runs through the entire segmented image. If so, the current gantry crane track is not blocked; if not, the current gantry crane track is blocked; The specific method of determining whether the track in the segmented image runs through the entire segmented image in S4 is: S4-1, binarizing the segmented image to obtain a binarized segmented image; The specific operation of binarization is: set the pixels of the background part of the segmented image to 0, and set the pixels of the track part of the segmented image to 1; S4-2, projecting the binarized segmented image in S4-1 along its length direction to obtain a one-dimensional vector; The specific method of obtaining the one-dimensional vector is: accumulating the pixels in the same width direction of the binarized segmented image to obtain multiple values projected on the length direction of the binarized segmented image, that is, these values constitute a one-dimensional vector; S4-3, obtaining the maximum value in the one-dimensional vector; S4-4. Compare the maximum value in S4-3 with the width of the segmented image to determine whether the maximum value is smaller than the height of the segmented image. If so, the current gantry crane track is blocked; if not, the current gantry crane track is not blocked.
2. The gantry crane track obstruction detection method according to claim 1, characterized in that: The method for obtaining the gantry crane track image in S1 is: obtaining it by shooting with a monitoring camera on the gantry crane.
3. The gantry crane track obstruction detection method according to claim 1, characterized in that: The specific method of obtaining the label corresponding to the gantry crane track image in S1 is: It is represented by a single-channel image of the same size as the current gantry crane track image. If the pixel point at a certain coordinate in the current gantry crane track image is the background, the pixel at the corresponding position of the single-channel image is set to 0; if the pixel point at a certain coordinate in the current gantry crane track image is the track, the pixel at the corresponding position of the single-channel image is set to 255.
4. The gantry crane track obstruction detection method according to claim 3, characterized in that: The specific training process of the gantry crane track segmentation model in S2 is as follows: S2-1. Normalize each gantry crane track image in the data set to obtain a normalized data set; S2-2. Select some gantry crane track images and their corresponding labels in batches and input them into the gantry crane track segmentation model. The gantry crane track images serve as the input of the gantry crane track segmentation model, and the labels corresponding to the gantry crane track images serve as the output of the gantry crane track segmentation model. S2-3. Calculate the training loss function of the gantry crane track segmentation model by gradient descent, and reversely update the model parameters of the gantry crane track segmentation model according to the training loss function; S2-4. If the gantry crane track segmentation model reaches the set maximum number of iterations or minimum error value, the training is completed, and the trained gantry crane track segmentation model is obtained.
5. The gantry crane track obstruction detection method according to claim 4, characterized in that: The gantry crane track segmentation model in S2 adopts the U2Net network.
Citation Information
Patent Citations
Adjustable gantry crane device
CN115417306A
Line foreign matter detection method, device and equipment and storage medium
CN113160217A
Crane operation monitoring method and system based on digital twinning
CN115457479A