Industrial automatic fabric inspection system, a critical technology in the industry, enhances both total production quantity and quality compared to conventional inspection techniques. This study aims to create a reliable and effective real-time automated visual inspection system for fabrics, focusing on defect detection. The goals of the study can be stated as; installing a system with advanced technology for capturing and processing images swiftly, the development and deployment of a system capable of autonomously learning and scanning fabrics in use, and the creation of a smart framework for accurate fabric defect detection and classification. We focus on the development of unsupervised fabric defect detection using a convolutional autoencoder model, and defect classification using a convolutional neural network model, which takes input as the feature vector generated by the convolutional autoencoder. The experimental outcomes have displayed significant success rates in both detecting defects and classifying them, confirming the effectiveness of the framework in real-time visual inspection systems.