The purpose of this paper is to study the algorithm of object detection and scene understanding in complex scenes assisted by AI(Artificial Intelligence), so as to improve the machine's perception of the surrounding environment. Aiming at occlusion and dense scenes, this paper proposes a series of innovative algorithms by introducing technologies such as multi-scale detection, occlusion processing and real-time optimization. Experimental results show that the proposed algorithm has achieved excellent performance on several public data sets. Compared with the current mainstream object detection algorithm -YOLO, the method proposed in this paper has a significant improvement in accuracy. Especially in multi-scale object detection, occlusion and dense scene processing and real-time optimization, the proposed algorithm shows obvious advantages. The research results provide an effective solution for object detection and scene understanding in complex scenes, and promote the application of AI system in related fields.