**1. Introduction**

Paddy is a major grain in the world. As the worldwide population grows, the requirement for rice is expected to rise by 30% in 2050 [1]. Therefore, the processing and production of rice have a vital role. At present, there are prominent problems in the rice market, such as the one-sided pursuit of appearance quality (fine, white, and nice taste), backward control means of the DOM, and nutrient loss caused by over-processing, which threaten food security [2]. Thus, an efficient and rapid method of estimating the DOM of rice can instruct enterprises to adjust the parameters in the rice milling process in real-time. Additionally, enterprises can perform such approaches to moderately process rice and achieve efficient rice loss reduction through technological innovation. It has essential significance for guiding paddy processing, rice storage, distribution, and trade.

According to the regulations of the Chinese National Standard of "Milled rice (GB/T 1354-2018) [3]", rice DOM refers to the degree of germ remaining and the residual bran layer on the surface and back grooves of a rice grain after processing, which is divided into three levels: well-milled, reasonably well-milled, and substandard. Well-milled, reasonably well-milled, and substandard rice represent rice with skin retention less than 2%, between 2% and 7%, and more than 7%, respectively. The skin retention of rice is defined as the sum of the residual skin and rice embryo projection area as a percentage of the projection area of the sample. In rice processing enterprises, detecting the DOM of rice is still at the

**Citation:** Chen, W.; Li, W.; Wang, Y. Evaluation of Rice Degree of Milling Based on Bayesian Optimization and Multi-Scale Residual Model. *Foods* **2022**, *11*, 3720. https://doi.org/ 10.3390/foods11223720

Academic Editor: Elena Canellas

Received: 10 October 2022 Accepted: 17 November 2022 Published: 19 November 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

stage of human eye inspection or staining method to auxiliary implementation. These approaches have the disadvantages of strong professionalism, being time-consuming and labor-intensive, poor repeatability, etc. Foreign researchers found that rice DOM is closely related to its chemical composition content [4]. They extracted the lipid content of the milled rice surface by chemical extraction to quantify the DOM of rice [5]. However, this method cannot meet the requirements of modern rice DOM for rapid, non-destructive, efficient, and objective detection.

Machine vision technology provides the advantages of high efficiency, fast speed, and accurate detection, which is currently a research hot spot in the field of crop detection [6–8]. Xu et al. [9] and Wood et al. [10] detected the DOM of rice by digital image processing technology combined with the staining method, but the staining process was cumbersome and destructive. Zhang et al. [11] obtained the rice DOM by the bran degree of RGB images of rice. Wan and Long [12] and Wan et al. [13] proposed detection methods based on gray-gradient co-occurrence matrix and color features incorporated with machine learning, respectively, and the corresponding discrimination accuracy reached 94% and 92.17%. Fang et al. [14] used grayscale values of rice to measure DOM. Zareiforoush et al. [15] adopted the fuzzy logic reasoning method to realize the recognition of five rice milling grades, and the overall confidence reached 89.80%. Hortinela et al. [16] used the support vector machine to classify milled rice with an adaptive enhancement algorithm, and the average accuracy was 86.67%. Although the above methods achieved positive detection results, they all need to design and extract features manually, and there is the problem that incomplete feature extraction leads to low accuracy.

In recent years, CNN has achieved remarkable achievements in face recognition [17], handwritten digit recognition [18], pedestrian detection [19], and other fields, bringing new opportunities for the development of rice DOM detection technology. In terms of DOM detection of rice, Qi et al. [20] combined the hypercolumn technology, max-relevance and min-redundancy feature selection algorithm, extreme learning machine technique, and improved VGG16 to identify rice DOM with an overall accuracy of 97.32%. For the quality inspection of rice, Patel and Joshi [21] used the transfer learning-based VGG16 model for fine rice, broken rice, and variety determination. A four-layer CNN model to realize head and broken rice classification was adopted by Hong Son and Thai-Nghe [22]. Li and Li [23] improved Inception-v3 by introducing fine-grained classification to learn local features of rice and to identify the integrity of the rice germ. Li et al. [24] refined the Inception-v3 model to detect the integrity of the germ with the addition of mutual channel loss and mlpconv. Li et al. [25] identified rice germ integrity based on the EfficientNet-B3 model with the introduction of the double attention network (DAN).

To summarize, existing research on rice is mostly quality examination, while the determination of rice DOM has essential guidance for maintaining food nutrition and reducing food waste. The current research is unable to acquire the feature details of rice well, and there is still a lack of deep learning-based methods that can effectively and correctly identify the DOM of rice. Therefore, the main contributions of this study are as follows:

