# Prediction of Grain Porosity Based on WOA-BPNN and Grain Compression Experiment
This instrument achieved automatic control of the measurement process, real-time display, and storage of the detection parameters as well as a measurement error of 0.3%. The system detection demonstrated high stability and accuracy. With advancements in measurement technology, researchers are now able to physically image porous media using high-precision scanners. [PERSON] et al. [10] utilized CT scanning imaging to reconstruct three-dimensional images of wheat and pea grain piles under simulated silo conditions. They quantitatively described the pore network structure of the grain porous medium. [PERSON] et al. [11] investigated the impact of vertical pressure on the pore structure of grain piles using grain slice imaging and image processing techniques. The results indicated that the pore area and pore diameter of the piled grain gradually decreased with increasing vertical pressure. Currently, numerous researchers are extensively utilizing numerical simulation methods to investigate porous media and model them with the assistance of rapidly advancing computer technology [12; 13; 14]. In recent years, due to numerous breakthroughs in computer science, many scholars have utilized artificial intelligence to predict issues in various engineering fields [15; 16; 17; 18]. Machine learning techniques have been applied to solve numerous practical problems in various aspects of grain security and storage. [PERSON] et al. [19] utilized machine vision and back propagation neural network technology to classify five corn varieties. The experimental results demonstrated an average classification accuracy of up to 90%. [PERSON] et al. [20] proposed a hyperspectral classification model for detecting corn seed mildew with an accuracy of 92%. This model offers technical support and new insights for early mildew detection as well as for the selection and breeding of corn seeds. [PERSON] et al. [21] proposed a grain temperature prediction model based on support vector regression. They analyzed the correlation between the grain temperature data and the corresponding weather forecast data, conducted principal component analysis on the weather data, reduced the dimensionality of the model input, and utilized the weather information to predict the average temperature of the grain piles. The predicted root mean square error (RMSE) was 1.26 \({}^{\circ}\)C. [PERSON] et al. [22] utilized the KNN method to estimate the quantity of grains in the silo, yielding practical results with an accuracy of 96.71%. Meanwhile, [PERSON] et al. [23] introduced a swift approach for evaluating the quality of maize kernels through image analysis and support vector machine, achieving a recognition accuracy of 97.44%. [PERSON] et al. [24] evaluated five different prediction models--cubist, random forest, artificial neural network, support vector machine with polynomial kernel, and support vector machine with radial kernel--using machine learning techniques to simulate the loss of dry matter in stored soybeans. The results indicated that the random forest model yielded the most accurate predictions. [PERSON] et al. [25] utilized a machine learning approach to detect adulteration in bulk paddy. They used the color and texture features of the image and developed a BPNN classification model trained on reduced features derived from the principal component analysis. This model achieved an adulteration classification accuracy of 93.31%. Several studies have investigated the application of machine learning for pest detection, mold detection, and monitoring storage temperature in grain storage. However, there is limited research on the use of machine learning for predicting grain porosity. In this paper, a machine learning algorithm was incorporated into the prediction model for grain cell porosity. Three influencing factors of grain porosity--grain type, moisture content, and vertical pressure--were selected as the input variables.