Fruit grading method based on improved MobileViT network model
Through the improved MobileViT network model, combined with ASPP and CA modules, the problems of high cost and poor applicability of the fruit grading system are solved, and low-cost, high-accuracy fruit grading is achieved, which is suitable for farm environments with limited computing resources.
Patent Information
- Application Number
- CN202510281918.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-07-22
AI Technical Summary
The existing fruit grading system is costly, complex in operation and poor in applicability, and is difficult to use with limited computing resources and strict environmental conditions, making it difficult to promote in some farms or small production enterprises.
The improved MobileViT network model is adopted, combined with the ASPP module and the CA module, and the fruit surface image data is enhanced and preprocessed, a fruit image classification network model is constructed, and high-precision grading is achieved through training and testing.
It realizes low-cost, high adaptability and high accuracy fruit grading, suitable for scenarios with limited computing resources, reduces dependence on environmental conditions, reduces manual operations, and improves production efficiency.
Smart Images

Figure CN120356203A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly relates to a fruit grading method based on an improved MobileViT network model. Background Art
[0002] In contemporary agricultural production and supply chain management, fruit grading systems play a crucial role. The development of this system benefits from the increasing maturity of computer vision, deep learning, sensing technology, and automation systems. First, through high-resolution imaging devices, sensors, and advanced imaging techniques, fruit grading systems can accurately obtain the appearance and quality data of fruits. The processing of image information utilizes computer vision and image processing techniques, including filtering, segmentation, feature extraction, and pattern recognition, in order to accurately locate and identify various features of fruits, such as shape, color, size, and defects. Deep learning models such as convolutional neural networks are used to learn features from a large amount of image data and achieve automated classification and grading; at the same time, spectral imaging and hyperspectral photography help evaluate the internal quality and maturity of fruits. The synergistic effect of these technologies provides the ability for fruit grading systems to grade fruits accurately and quickly, improving production efficiency, ensuring product quality, and reducing labor costs in the production process.
[0003] However, although fruit grading systems have played an important role in improving agricultural product quality control, increasing production efficiency, and meeting market demands, there are still some limitations. First, the accuracy of the system is affected by the diversity and variability of fruits themselves, such as the diversity of fruit shapes, colors, and surface features, which poses challenges for the system when dealing with diverse fruits. Second, the assessment of the internal quality of fruits by the system usually requires additional equipment and costs, such as spectral instruments or X-ray devices, which increases the complexity and cost of the grading system. In addition, the implementation of fruit grading systems also faces some technical challenges. For example, the deployment and maintenance of the system require professional technical personnel, which may be a cost that is difficult to bear for some farms or small production enterprises. Moreover, the system needs to strictly control environmental conditions to ensure accurate grading, which poses challenges for some production scenarios where environmental conditions are difficult to control. Finally, the large amount of data processing and storage required by fruit grading systems places demands on computing resources and IT infrastructure.
[0004] Currently, fruit grading systems (such as the fruit defect non-destructive detection method and fruit grading method based on neural networks with the patent publication number CN112697984A) have deficiencies such as high costs, complex operations, and poor applicability, and have high requirements for production equipment and are difficult to use in the case of limited computing resources.
[0005] Therefore, there is an urgent need for a fruit image classification technology with low cost, good applicability, and high classification accuracy. Summary of the Invention
[0006] In order to overcome the defects and deficiencies of the existing technology, the present invention provides a fruit grading method based on an improved MobileViT network model. During the classification process after fruit picking, the present invention can efficiently classify and identify the collected fruit images according to features such as shape and color, and has the advantages of low cost, good adaptability, high accuracy, etc., expanding the application scenarios of deep learning technology.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] The present invention provides a fruit grading method based on an improved MobileViT network model, including the following steps:
[0009] Obtain fruit surface image data, and perform data augmentation and preprocessing on the fruit surface image data;
[0010] Perform image enhancement on the preprocessed fruit surface image data to improve the contrast between the defective area and the normal area on the fruit surface;
[0011] Divide the fruit surface image data into a training set, a validation set, and a test set, and mark the grading criteria;
[0012] Construct a fruit image classification network model, and add an ASPP module and a CA module to the MobileViT network model;
[0013] Train the fruit image classification network model based on the training set to obtain a trained fruit image classification network model;
[0014] Test the fruit image classification network model based on the test set, and output the fruit grading accuracy;
[0015] Output the predicted fruit grading result based on the trained fruit image classification network model.
[0016] As a preferred technical solution, performing data augmentation and preprocessing on the fruit surface image data specifically includes:
[0017] Perform data augmentation on the fruit surface image data, including data augmentation operations such as random rotation, translation, scaling, flipping, color enhancement, and noise injection;
[0018] Perform noise reduction preprocessing on the fruit surface image data based on bilateral filtering.
[0019] As a preferred technical solution, image enhancement is performed on the preprocessed fruit surface image data, and image enhancement is based on adaptive histogram equalization.
[0020] As a preferred technical solution, the MobileViT network model uses a convolutional neural network to obtain local information and obtains global information through a Transformer structure. An ASPP module is added between the input convolutional layer and the MobileNetV2 block. The ASPP module constructs convolutional kernels with different receptive fields based on different dilation rates, uses multiple parallel dilated convolutions with different sampling rates, captures image features in parallel at different scales, processes the features extracted at each sampling rate in separate branches, and fuses them to generate the final result.
[0021] As a preferred technical solution, a CA module is added between the MobileNetV2 block of the MobileViT network model and the MobileNetV2 block that performs downsampling. The CA module adaptively pools the input features in both the height and width dimensions to capture key information.
[0022] The present invention provides a fruit grading system based on an improved MobileViT network model, including: a data acquisition module, a data preprocessing module, an image enhancement module, a data partitioning module, a network model construction module, a network model training module, a network model testing module, and a grading result output module;
[0023] The data acquisition module is used to acquire fruit surface image data;
[0024] The data preprocessing module is used to perform data enhancement and preprocessing on the fruit surface image data;
[0025] The image enhancement module is used to perform image enhancement on the preprocessed fruit surface image data to improve the contrast between the defective area and the normal area on the fruit surface;
[0026] The data partitioning module is used to partition the fruit surface image data into a training set, a validation set, and a test set, and mark the grading criteria;
[0027] The network model construction module is used to construct a fruit image classification network model and add an ASPP module and a CA module to the MobileViT network model;
[0028] The network model training module is used to train the fruit image classification network model based on the training set to obtain a trained fruit image classification network model;
[0029] The network model testing module is used to test the fruit image classification network model based on a test set and output the fruit grading accuracy rate;
[0030] The grading result output module is used to output the predicted fruit grading result based on the trained fruit image classification network model.
[0031] As a preferred technical solution, the data preprocessing module is used to perform data augmentation and preprocessing on the fruit surface image data, specifically including:
[0032] Performing data augmentation on the fruit surface image data, including data augmentation operations such as random rotation, translation, scaling, flipping, color enhancement, and noise injection;
[0033] Performing noise reduction preprocessing on the fruit surface image data based on bilateral filtering.
[0034] As a preferred technical solution, the image enhancement module is used to perform image enhancement on the preprocessed fruit surface image data, and perform image enhancement based on adaptive histogram equalization.
[0035] As a preferred technical solution, the MobileViT network model uses a convolutional neural network to obtain local information, and obtains global information through a Transformer structure. An ASPP module is added between the input convolutional layer and the MobileNetV2 block. The ASPP module constructs convolutional kernels with different receptive fields based on different dilation rates, uses multiple parallel dilated convolutions with different sampling rates, captures image features in parallel at different scales, processes the features extracted at each sampling rate in separate branches, and fuses them to generate the final result.
[0036] As a preferred technical solution, a CA module is added between the MobileNetV2 block of the MobileViT network model and the MobileNetV2 block that performs downsampling. The CA module adaptively pools the input features in both the height and width dimensions to capture key information.
[0037] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0038] (1) The present invention introduces an ASPP module into the MobileViT network model, which can effectively capture multi-scale information, increase the receptive field of the convolution, and maintain the resolution of the feature map.
[0039] (2) The present invention introduces a CA module into the MobileViT network model, aiming to enable the model to independently focus on different spatial dimensions of the input features, so as to more accurately capture key information.
[0040] (3) The classification accuracy of the network model proposed by the present invention is relatively high, reaching more than 95%, which can meet the requirements in actual production, has strong applicability, and can be applied to scenarios with limited computing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a schematic flowchart of the fruit grading method based on the improved MobileViT network model of the present invention;
[0042] Figure 2 It is a schematic diagram of the network structure of the ASPP module of the present invention;
[0043] Figure 3 It is a schematic diagram of the network structure of the CA module of the present invention;
[0044] Figure 4 It is a schematic diagram of the network structure of the fruit image classification network model of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0046] Embodiment 1
[0047] As Figure 1 shown, this embodiment provides a fruit grading method based on an improved MobileViT network model, including the following steps:
[0048] S1: Obtain fruit surface image data, and perform data augmentation and preprocessing on the fruit surface image data;
[0049] In this embodiment, the fruit surface image data can be obtained from publicly available fruit image datasets on the Internet. For example, collect fruit images that meet the requirements from datasets such as ImageNet and Fruits 360 dataset, and try to keep the number of samples of each category balanced during the process of collecting images to avoid a situation where the number of samples of different categories varies too much;
[0050] In this embodiment, the fruit surface image data can also be obtained through an image acquisition device. The image acquisition device includes a camera, a light source, a light box, and a background board. Place the fruit in the light box, adjust the light to ensure uniform illumination of the fruit, and use the camera to collect images of the fruit from multiple angles to capture its comprehensive feature information, ensuring that the image acquisition conditions for each fruit are the same;
[0051] In this embodiment, targeted random rotation, translation, scaling, flipping, color enhancement, and noise injection data augmentation operations are performed on the images to expand the number of the sample data set, which helps reduce overfitting, enhance the generalization performance of the model, improve the robustness of the model, and avoid the problem that the model has a tendency during the training process due to the excessive number of samples of certain categories;
[0052] In this embodiment, the bilateral filtering method is used to denoise the fruit images. While reducing noise, the edges are kept clear, avoiding the influence of noise on image recognition, and the filtering degree can be controlled by adjusting parameters;
[0053] In this embodiment, the bilateral filter is an image filter that combines spatial information and pixel differences. It considers the spatial neighborhood relationship of pixels and gives higher weights to the surrounding pixels that are spatially close to the central pixel; at the same time, the bilateral filter also considers the differences between pixel values and gives higher weights to the surrounding pixels whose pixel values are close to the central pixel. The above two weights are combined, that is, the product of the spatial weight and the pixel difference weight forms the bilateral weight, which ensures that those pixels that are spatially close and have similar pixel values contribute more to the final result. After obtaining the bilateral weight, the new pixel value of the central pixel is set to the weighted average of all pixels in its neighborhood, where the weight is the bilateral weight calculated above;
[0054] S2: Through the method of image enhancement on the preprocessed images, the contrast between the defective area and the normal area on the fruit surface is improved;
[0055] In this embodiment, image enhancement is performed by adaptive histogram equalization on the images. Since the adaptive histogram equalization method can adaptively adjust according to the local features of the images, it effectively enhances the contrast of the images, reduces the over-enhancement and noise amplification problems that may occur in the traditional global histogram equalization, and enables better detail enhancement and image enhancement effects on images with different illumination conditions or contrasts in different regions. Therefore, the method of adaptive histogram equalization is used to process the images, making the defective areas more prominent, improving the contrast between the defective area and the normal area on the fruit surface, enabling the network model to more accurately focus on the regions of interest, and improving the classification performance of the model.
[0056] S3: The image data set is divided into a training set, a validation set, and a test set;
[0057] In this embodiment, the fruit image data set is divided into a training set, a validation set, and a test set according to a ratio, where the training set accounts for 60%, the validation set accounts for 20%, and the test set accounts for 20%. In each data set, the images are saved in different folders according to different categories. The classification labels of the fruit images include four labels: premium fruits, first-class fruits, second-class fruits, and substandard fruits;
[0058] In this embodiment, citrus fruits are used as the grading objects. The grading criteria for premium fruits are as follows: short oval shape, regular and round fruit appearance, clean fruit surface, smooth peel, allowing extremely minor defects, no fruit spots, no waterlogging, withered water, and puffy fruits, no mechanical damage, and the fruit surface is orange-red or tangerine-red with uniform coloring. The grading criteria for first-class fruits are as follows: short oval or oblate shape, relatively regular and round fruit appearance, clean fruit surface, relatively smooth peel, allowing minor defects, no more than 1 fruit spot, fruit spot diameter < 2.5 mm, no waterlogging, withered water, and puffy fruits, no mechanical damage, and the fruit surface is light orange-red or light red with uniform coloring. The grading criteria for second-class fruits are as follows: short oval or oblate shape, relatively regular and round fruit appearance, relatively clean fruit surface, allowing minor defects, more than 1 fruit spot, fruit spot diameter < 3 mm, allowing minor waterlogging, withered water, and puffy fruits, allowing minor mechanical damage, and the fruit surface is light orange-yellow with relatively uniform coloring. Fruits that do not meet the above criteria are substandard fruits;
[0059] S4: Construct a fruit image classification network model and perform structural adjustment and optimization on the model;
[0060] As Figure 4 shown, the fruit image classification network model of this embodiment is improved based on the MobileViT network model. In the figure, Input image represents the input image, Output represents the output feature map, Conv represents the convolutional layer, n×n represents the size of the convolutional kernel, MV2 represents the MobileNetV2 block, which is an inverted residual structure. Its feature map is first upsampled, and then downsampled after depthwise separable convolution. ↓2 indicates that downsampling needs to be performed. MobileViT block represents the module proposed in MobileViT, which is mainly composed of three parts: the local representation layer, the global representation layer, and the fusion layer. Global pool represents global pooling, ASPP represents the ASPP module, and ECA represents the ECA module. MobileViT first uses a convolutional neural network (CNN) to obtain local information, and then obtains global information through the Transformer structure, which improves the accuracy, robustness, and generalization ability of the model while reducing the model complexity.
[0061] As Figure 2As shown, an Atrous Spatial Pyramid Pooling (ASPP) module is added to the fruit image classification network model, aiming to effectively capture multi-scale information and increase the receptive field of the convolution. The ASPP module is added between the 3×3 convolutional layer Conv and the MobileNetV2 block. In the figure, Input and Output represent the input feature map and the output feature map, Pool represents the pooling layer, the corresponding n×n represents the size of the pooling kernel, Concat represents the concatenation operation, Conv represents the convolutional layer, the corresponding n×n represents the size of the convolutional kernel, and Upsample represents the upsampling. The ASPP module uses multiple parallel atrous convolutions with different sampling rates. The features extracted for each sampling rate are further processed in separate branches and fused to generate the final result. This module constructs convolutional kernels with different receptive fields through different atrous rates to obtain multi-scale object information, can capture image features in parallel at different scales, and does not introduce additional parameters, effectively improving the model's perception ability, especially performing well when dealing with objects of different scales and sizes.
[0062] As Figure 3 As shown, a Coordinate Attention (CA) module is added to the fruit image classification network model, aiming to enable the model to independently focus on different spatial dimensions of the input features, so as to more accurately capture key information. In this embodiment, the CA module is added between the MobileNetV2 block and the MobileNetV2 block that performs downsampling. In the figure, Input and Output represent the input feature map and the output feature map, Residual represents the residual block, X AvgPool represents the one-dimensional horizontal global average pooling, Y Avg Pool represents the one-dimensional vertical global average pooling, Concat represents the concatenation operation, Conv2d represents the two-dimensional convolution, BatchNorm+Non-linear represents the regularization and linearization operations, Sigmoid represents the sigmoid activation function, and Re-weight represents the quadratic weight superposition operation. This module adaptively pools the input features in both the height and width dimensions, enabling the model to independently focus on different spatial dimensions of the input features, so as to more accurately capture key information. Its simplicity and efficiency mainly rely on the 1×1 convolution and adaptive pooling technologies, enabling it to be seamlessly integrated into various convolutional neural networks to improve performance. The CA module significantly improves the model's expression ability for the input data by emphasizing important features and weakening secondary features, which is crucial for processing complex visual tasks, enabling the model to more comprehensively understand and integrate information from different spatial regions, thereby enhancing the ability to understand overall features.
[0063] S5: Set the training parameters, use the training set and the validation set to train and debug the network model, and obtain the network model with the best classification effect;
[0064] In this embodiment, training parameters such as epoch, batch size, and learning rate are set, the Adamax optimizer is used, and through a large amount of training and debugging, the network model with the best classification effect is obtained;
[0065] In this embodiment, epoch is set to 300, batch size is set to 16, the learning rate is set to 0.0003, and the cosine annealing algorithm is used to dynamically adjust the learning rate. During the training process, the exploration ability of the model between global search and local search is balanced. By adjusting the learning rate, the model is more likely to converge to the global optimal solution in the later stage of training, and can avoid falling into the local optimal solution to a certain extent, thereby improving the generalization ability of the model and helping to enhance the stability of training.
[0066] Compared with the standard Adam optimizer, Adamax makes a more simplified adjustment to the learning rate, effectively reducing memory consumption and computational complexity. It shows better stability and performance when dealing with large-scale parameters, making it often converge to a suitable learning rate faster in practice. At the same time, it also has stronger robustness to abnormal situations and noise, and is widely used in deep learning tasks. Therefore, the Adamax optimizer is used for training, and through a large amount of training and debugging, the network model with the best classification effect is obtained.
[0067] S6: Call the network model to perform hierarchical testing on the test set, use the hierarchical accuracy rate as the model evaluation criterion to verify the model performance. By comparing this hierarchical result with the true category of the fruit image, it can be detected whether this classification method has the ability to grade fruit images, and the accuracy rate of image grading is output, thus completing the fruit image grading based on deep learning.
[0068] The present invention can combine the output result obtained by the grading method with other mechanical operations for sorting fruits, such as moving fruits by a robotic arm, providing an extended application means and a more efficient method for the traditional manual detection method, which can effectively improve efficiency and reduce the consumption of unnecessary human and material resources, effectively alleviate the difficulty of screening and classifying fruits in the case of a large number of fruits, and using the deep learning detection method, the actual application scenario can be effectively expanded, enabling this method to grade a variety of fruits.
[0069] Embodiment 2
[0070] This embodiment provides a fruit grading system based on an improved MobileViT network model for implementing the fruit grading method based on the improved MobileViT network model in Embodiment 1 above. The system includes: a data acquisition module, a data preprocessing module, an image enhancement module, a data partitioning module, a network model construction module, a network model training module, a network model testing module, and a grading result output module;
[0071] In this embodiment, the data acquisition module is used to acquire fruit surface image data;
[0072] In this embodiment, the data preprocessing module is used to perform data enhancement and preprocessing on the fruit surface image data;
[0073] In this embodiment, the image enhancement module is used to perform image enhancement on the preprocessed fruit surface image data to improve the contrast between the defective area and the normal area on the fruit surface;
[0074] In this embodiment, the data partitioning module is used to partition the fruit surface image data into a training set, a validation set, and a test set and mark the grading criteria;
[0075] In this embodiment, the network model construction module is used to construct a fruit image classification network model and add an ASPP module and a CA module to the MobileViT network model;
[0076] In this embodiment, the network model training module is used to train the fruit image classification network model based on the training set to obtain a trained fruit image classification network model;
[0077] In this embodiment, the network model testing module is used to test the fruit image classification network model based on the test set and output the fruit grading accuracy;
[0078] In this embodiment, the grading result output module is used to output the predicted fruit grading result based on the trained fruit image classification network model.
[0079] In this embodiment, the data preprocessing module is used to perform data enhancement and preprocessing on the fruit surface image data, specifically including:
[0080] Performing data enhancement on the fruit surface image data, including data enhancement operations such as random rotation, translation, scaling, flipping, color enhancement, and noise injection;
[0081] Performing noise reduction preprocessing on the fruit surface image data based on bilateral filtering.
[0082] In this embodiment, the image enhancement module is used to perform image enhancement on the preprocessed fruit surface image data and perform image enhancement based on adaptive histogram equalization.
[0083] In this embodiment, the MobileViT network model uses a convolutional neural network to obtain local information and a Transformer structure to obtain global information. An ASPP module is added between the input convolutional layer and the MobileNetV2 block. The ASPP module constructs convolutional kernels with different receptive fields based on different dilation rates, uses multiple parallel dilated convolutions with different sampling rates to capture image features in parallel at different scales, processes the features extracted at each sampling rate in separate branches, and fuses them to generate the final result.
[0084] In this embodiment, a CA module is added between the MobileNetV2 block of the MobileViT network model and the MobileNetV2 block that performs downsampling. The CA module adaptively pools the input features in both the height and width dimensions to capture key information.
[0085] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement methods and are all included in the protection scope of the present invention.
Claims
1. A fruit grading method based on an improved MobileViT network model, characterized in that, Including the following steps: Obtain the fruit surface image data, and perform data augmentation and preprocessing on the fruit surface image data; Perform image enhancement on the preprocessed fruit surface image data to improve the contrast between the defective area and the normal area on the fruit surface; Divide the fruit surface image data into a training set, a validation set, and a test set, and mark the grading criteria; Construct a fruit image classification network model, and add an ASPP module and a CA module to the MobileViT network model; Train the fruit image classification network model based on the training set to obtain the trained fruit image classification network model; Test the fruit image classification network model based on the test set and output the fruit grading accuracy; Output the predicted fruit grading result based on the trained fruit image classification network model.
2. The fruit grading method based on the improved MobileViT network model according to claim 1, characterized in that, Perform data augmentation and preprocessing on the fruit surface image data, specifically including: Perform data augmentation on the fruit surface image data, including data augmentation operations such as random rotation, translation, scaling, flipping, color enhancement, and noise injection; Perform noise reduction preprocessing on the fruit surface image data based on bilateral filtering.
3. The fruit grading method based on the improved MobileViT network model according to claim 1, wherein Perform image enhancement on the preprocessed fruit surface image data, and perform image enhancement based on adaptive histogram equalization.
4. The fruit grading method based on the improved MobileViT network model according to claim 1, characterized in that, The MobileViT network model uses a convolutional neural network to obtain local information and obtains global information through a Transformer structure. An ASPP module is added between the input convolutional layer and the MobileNetV2 block. The ASPP module constructs convolutional kernels with different receptive fields based on different dilation rates, uses multiple parallel dilated convolutions with different sampling rates, captures image features in parallel at different scales, processes the features extracted at each sampling rate in separate branches, and fuses them to generate the final result.
5. The fruit grading method based on the improved MobileViT network model according to claim 1, characterized in that, Add a CA module between the MobileNetV2 block and the MobileNetV2 block that performs downsampling in the MobileViT network model. The CA module performs adaptive pooling on the input features in both the height and width dimensions to capture key information.
6. A fruit grading system based on an improved MobileViT network model, characterized in that, Including: A data acquisition module, a data preprocessing module, an image enhancement module, a data division module, a network model construction module, a network model training module, a network model testing module, and a grading result output module; The data acquisition module is used to obtain the fruit surface image data; The data preprocessing module is used to perform data augmentation and preprocessing on the fruit surface image data; The image enhancement module is used to perform image enhancement on the preprocessed fruit surface image data to improve the contrast between the defective area and the normal area on the fruit surface; The data division module is used to divide the fruit surface image data into a training set, a validation set, and a test set, and mark the grading criteria; The network model construction module is used to construct a fruit image classification network model, and add an ASPP module and a CA module to the MobileViT network model; The network model training module is used to train the fruit image classification network model based on the training set to obtain the trained fruit image classification network model; The network model testing module is used to test the fruit image classification network model based on a test set and output the fruit grading accuracy rate. The grading result output module is used to output the predicted fruit grading result based on the trained fruit image classification network model.
7. The fruit grading system based on the improved MobileViT network model according to claim 6, characterized in that, The data preprocessing module is used to perform data augmentation and preprocessing on the fruit surface image data, specifically including: Performing data augmentation on the fruit surface image data, including data augmentation operations such as random rotation, translation, scaling, flipping, color enhancement, and noise injection. Performing noise reduction preprocessing on the fruit surface image data based on bilateral filtering.
8. The fruit grading system based on the improved MobileViT network model according to claim 6, wherein, The image enhancement module is used to perform image enhancement on the preprocessed fruit surface image data, and perform image enhancement based on adaptive histogram equalization.
9. The fruit grading system based on the improved MobileViT network model according to claim 6, characterized in that The MobileViT network model uses a convolutional neural network to obtain local information and a Transformer structure to obtain global information. An ASPP module is added between the input convolutional layer and the MobileNetV2 block. The ASPP module constructs convolutional kernels with different receptive fields based on different dilation rates, uses multiple parallel dilated convolutions with different sampling rates to capture image features in parallel at different scales, processes the features extracted at each sampling rate in separate branches, and fuses them to generate the final result.
10. The fruit grading system based on the improved MobileViT network model according to claim 6, characterized in that, A CA module is added between the MobileNetV2 block and the MobileNetV2 block that performs downsampling in the MobileViT network model. The CA module performs adaptive pooling on the input features in both the height and width dimensions to capture key information.
Citation Information
Patent Citations
Fruit defect nondestructive testing method based on neural network and fruit grading method
CN112697984A