Beef authenticity detection is a significant concern in today's food industry. This study proposes the K-Nearest Neighbors (K-NN) method based on the extraction of the Histogram of Oriented Gradients (HOG) feature to detect the authenticity of beef based on images. A dataset of 40 images of real and fake beef was collected and aggregated into 240 images to increase the variety of data. The imagery is changed to grayscale, and the HOG feature is extracted to capture texture and shape information. The K-NN model is built with optimized parameters using Grid Search and cross-validation techniques. The model was evaluated by measuring accuracy, precision, recall, and F1-score on the test data. The results show that the K-NN model with HOG feature extraction can achieve an accuracy of 80.56%, precision of 87.10%, recall of 72.97%, and F1-score of 72.97% in classifying real and fake beef. These findings confirm the effectiveness of the proposed method for the rapid and accurate detection of beef authenticity. This research contributes to developing image-based food authenticity detection methods that can be applied to increase consumer confidence in the food industry
Copyrights © 2024