The invention discloses a port container cargo loading and unloading state identification method based on
computer vision, and the method comprises the steps: collecting visible light and
infrared video images in a port, and carrying out the preprocessing of the images through combining with a defogging
algorithm; carrying out the recognition and classification of port objects in the
video based on an improved OfficientDet target detection model, and dynamically adjusting the
feature fusion weight; in combination with a
motion detection technology, if a target is detected to move, the target is divided into a
truck type; otherwise, classifying into a'container 'class; further optimizing and classifying the detection target based on an ST-MRF
image segmentation technology, and extracting a container class; using a DINO-X target detection model to identify whether a container cover exists or not, and marking a container without a cover as'no goods, to be loaded and unloaded '; and through a multi-
feature fusion loading and unloading state
probability model MFSM, the container cover coverage rate, the cargo height and the inclination angle are integrated to judge the state of the container. The accuracy and efficiency of container loading and unloading
state recognition are improved, and the intelligent level of port container loading and unloading management is improved.