Detecting distance between surfaces of transparent materials with large area and thickness has always been a difficult problem in the field of industry. In this paper, a method based on low-cost TOF continuous-wave modulation and deep convolutional neural network technology is proposed. The distance detection between transparent material surfaces is converted to the problem of solving the intersection of the optical path and the transparent material’s front and rear surfaces. On this basis, the Gray code encoding and decoding operations are combined to achieve distance detection between surfaces. The problem of holes and detail loss of depth maps generated by low-resolution TOF depth sensors have been also effectively solved. The entire system is simple and can achieve thickness detection on the full surface area. Besides, it can detect large transparent materials with a thickness of over 30 mm, which far exceeds the existing optical thickness detection system for transparent materials.