This paper researches an IoT module-based pipe classification system for a flexible manufacturing system that recognizes the size and length of pipes used in the painting process of high-pressure pipes. The proposed system is composed of an IoT module, USB camera, and edge TPU for pipe classification. The proposed system recognizes the type of pipe by three processes; object detection of the pipe, line detection algorithm of the three regions of interest, and pipe classification algorithm based on the line detection algorithm. Furthermore, the proposed system enables web-based real-time monitoring, providing convenience to workers and helping them make quick decisions. The IoT module interfaces with the painting robot and the sequence control that paints for each type of pipe is executed in the painting robot, allowing flexible manufacturing of the painting process.