The textile industry has been growing rapidly, even the growth of textile products exceeds the growth of the national economy. The demand for textile products is not only for domestic consumption but also for export. In an effort to meet quality standards and maintain customer satisfaction, quality control of fabric production is very important, especially in controlling fabric production defects. The types of defects that exist in fabrics are holes, stains, rare defects due to broken/lost threads, floating, color fading, broken patterns, double threads, thick threads (slubs), mixed ends, pin marks, and others. In this research, a system is designed that can detect production defects in fabrics using machine learning-based image processing methods using Raspberry Pi. The types of defects modeled are sparse defects and stain defects, or in factory terms often called slap defects. The test results show that this system has an average frame per second (FPS) of 4.85, an average inference time of 181.1 ms, with an image classification result accuracy of 98.4%