The embodiment of the invention discloses a crane four-
rope grab bucket swing angle calculation method and
system based on YOL0v5, and the method comprises the following steps: firstly, triggering an image collection unit through a crane PLC control program, and capturing an image of a four-
rope grab bucket in real time; then, preprocessing the image by using a lightweight YOLOv5
algorithm, and extracting feature information; then, recognizing grab bucket features in the image by using a YOLOv5
algorithm, and determining the position of the grab bucket features; then, the swing quantity of the lifting appliance is calculated through coordinate conversion; and finally, the swing angle of the grab bucket is calculated and output according to the swing amount and the length of the lifting
rope. According to the method, by optimizing the YOLOv5
algorithm and lightweight design, the grab bucket recognition precision and the
system operation efficiency are improved, the swing angle of the four-rope grab bucket can be output in real time through accurate coordinate transformation and
distortion correction
processing, and accurate feedback and control basis is provided for crane operation.