Rice classification and quality detection are therefore crucial for ensuring the safety and quality of rice for human consumption and reducing the financial losses associated with rice spoilage. Accurate and efficient rice classification and quality detection techniques can help farmers, traders, and regulators identify the most valuable and high-quality rice cultivars, enabling them to make better crop management, storage, and transportation decisions. A system to automatically classify different types of rice grains is a valuable and crucial area of research in modern agriculture. Various methodologies have been used in recent years to identify agricultural products, including color-based, texture-based, and statistical-based features. This paper introduces a deep learning-based classification algorithm using ResNet deep models to represent the structural content of different varieties of rice grains. ResNet is a proven deep-learning model with impressive performance in various computer vision tasks, including signal classification. ResNet is adept at learning rich representations of images and generalizing them to new data making it a reliable choice for rice classification by combining residual learning and a well-structured architecture. In this paper, different architectures of ResNet, such as ResNet34, ResNet50, and a transferred version of ResNet50 using a transfer learning technique, are designed for performance evaluation in rice classification and quality detection problems. The performance of the proposed algorithm is compared with the other deep learning models and dictionary learning-based algorithms. The results demonstrate that the proposed algorithm using ResNet50 deep models and transfer learning accurately identified six rice varieties with an accuracy rate of over 99.85%. The algorithm also accurately detects rice quality for different percentages of combination with other rice varieties with an average accuracy of 98.13%.