Automatic weight detection is an essential step in the factory production of Pleurotus eryngii. In this study, a data set containing 1154 Pleurotus eryngii images was created, and then machine vision technology was used to extract eight two-dimensional features from the images. Because the fruiting bodies of Pleurotus eryngii have different shapes, these features were less correlated with weight. This paper proposed a multidimensional feature derivation method and an Attention-Based CNN model to solve this problem. This study aimed to realize the traditional feature screening task by deep learning algorithms and built an estimation model. Compared with different regression algorithms, the R2, RMSE, MAE, and MAPE of the Attention-Based CNN were 0.971, 7.77, 5.69, and 5.87%, respectively, and showed the best performance. Therefore, it can be used as an accurate, objective, and effective method for automatic weight measurements of Pleurotus eryngii.