A method of object detection and ranging based on YOLO for binocular vision is proposed in this paper. Firstly, the object is detected by YOLO, and then the feature points are matched by stereo matching algorithm. The algorithm is proved to be effective by experiments, and it has certain engineering significance to realize stereo ranging by using vision technology.