<span lang="EN-US">Computer vision deals with image-based problems, such as deep learning, classification, and object detection. This study classifies the quality of dairy parents into three, namely high, medium, and low based on morphology by focusing on Bogor Indonesia farms. The morphological images used are the side and back of dairy cows and the challenge is to determine the optimal accuracy of the model for it to be implemented into an automated system. The 2-step mask region-based convolutional neural network (mask R-CNN) and Canny segmentation algorithm were continuously used to classify the convolutional neural network (CNN) in order to obtain optimal accuracy. When testing the model using training and testing ratios of 90:10 and 80:20, it was evaluated in terms of accuracy, precision, recall, and F1-score. The results showed that the highest model produced an accuracy of 85.44%, 87.12% precision, 83.79% recall, and 84.94% F1-score. Therefore, it was concluded that the test result with 2-stages of segmentation was the best.</span>