The invention provides a belt conveyor deviation detection method and system, a medium and a terminal, and the method comprises the steps of: collecting image data of a belt conveyor, and forming an original data set; marking the original data set, establishing a target detection model, and training the target detection model; acquiring a to-be-identified belt conveyor image, inputting the to-be-identified belt conveyor image into the trained target detection model, obtaining a detection result, obtaining belt conveyor edge lines according to the position information of belt conveyor edge identification frames, and judging whether the belt conveyor deviates or not according to the positions of the belt conveyor edge lines. According to the invention, the position information of belt conveyor edge recognition frames is obtained through the target detection model, belt conveyor edge lines are obtained based on the obtained position information, and whether the belt conveyor deviates or not is judged according to the positions of the belt conveyor edge lines, so that the edge lines on the two sides of the belt on the belt conveyor can be well and automatically recognized, the coordinate information of the edge lines on the two sides of the belt is judged, the situation that the belt conveyor deviates abnormally is judged in time, and unnecessary losses are avoided.