The goal of the project was to validate a machine vision–based solution for assessing the quality of grain sorting. A camera-based device was built, and an AI model was trained to automatically predict the level of impurities in the sorted grain. The solution is based on the YOLOv11-seg model, can be integrated into existing sorting machines, and provides a more comprehensive overview of the entire sorting process, enhancing quality control. The prototype was successfully tested in a pilot drying facility, achieving over 95% accuracy. As a result of the project, a Docker-based tool was validated, enabling easy deployment of the solution across different hardware and application environments.