A refrigerator intelligent control method based on image recognition and intelligent refrigerator
By adopting the feature extraction and minimum redundancy maximum correlation algorithm of the parallel AlexNET and VGG16 models in smart refrigerators, combined with the improved support vector machine classifier, the problem of high computing resource consumption in the food recognition process of smart refrigerators is solved, and high accuracy is achieved Identification and low-cost design improve the response speed and user experience of the refrigerator.
Patent Information
- Application Number
- CN202410060916.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-16
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-01-16
AI Technical Summary
Existing smart refrigerators consume a large amount of computing resources during the food recognition process, resulting in high manufacturing costs and difficulty in later failure maintenance.
A feature extraction model based on the parallel AlexNET model and VGG16 model is used, combined with the minimum redundancy maximum correlation algorithm to remove redundant features, and an improved support vector machine classifier is constructed. The nonlinear separation model improves the flexibility of the classifier and reduces computational costs. and training difficulty.
It achieves high-precision food identification, reduces refrigerator manufacturing costs, improves response speed and energy saving level, facilitates after-sales maintenance, and improves product competitiveness and user experience.
Smart Images

Figure CN118247782B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to an intelligent refrigerator control method based on image recognition and an intelligent refrigerator. Background Art
[0002] Smart refrigerators are household appliances that integrate advanced technology and intelligent functions to provide a more convenient, intelligent, and networked user experience compared to traditional refrigerators. Some smart refrigerators have food recognition functions. They can identify the food stored in the refrigerator through built-in cameras or other sensors, and provide the best cooling temperature, making the refrigerator more convenient and easy to use. The design goal of smart refrigerators is to improve the convenience, intelligence, and networking of users' lives, and provide users with a smarter home life experience through advanced technology.
[0003] In the prior art, in order to identify the type of food put in by the user, a classification model with huge computational complexity is often used to train and learn the features of the original image, so that it has better food classification and recognition capabilities. However, a large amount of computing resources is consumed in this process, which greatly increases the manufacturing cost of the smart refrigerator and makes subsequent fault maintenance difficult. Summary of the invention
[0004] In order to solve the technical problems in the prior art that in order to identify the type of food put in by the user, a classification model with huge computational complexity is often used to train and learn the features of the original image on the basis of the original image so that it has better food classification and recognition capabilities, but a large amount of computing resources is consumed in this process, which greatly increases the manufacturing cost of the smart refrigerator and makes subsequent fault maintenance difficult, the present invention provides a refrigerator intelligent control method based on image recognition and a smart refrigerator.
[0005] First aspect
[0006] The present invention provides a refrigerator intelligent control method based on image recognition, comprising:
[0007] S101: Acquire an image of food to be identified placed in a refrigerator;
[0008] S102: Construct a feature extraction model based on the parallel AlexNET model and VGG16 model to extract the joint features of the food to be identified;
[0009] S103: removing redundant features in the joint features of the food to be identified by using a minimum redundancy maximum correlation algorithm to obtain a deep feature of the food to be identified;
[0010] S104: constructing an improved support vector machine classifier including a linear separation model and a nonlinear separation model;
[0011] S105: training the improved support vector machine classifier;
[0012] S106: inputting the deep features of the food to be identified into the trained improved support vector machine classifier;
[0013] S107: Outputting the food category to be identified;
[0014] S108: Adjusting the refrigeration temperature of the refrigerator according to the category of food to be identified.
[0015] Second aspect
[0016] The present invention provides a refrigerator intelligent control system based on image recognition, which is used to execute the refrigerator intelligent control method based on image recognition in the first aspect.
[0017] Compared with the prior art, the present invention has at least the following beneficial technical effects:
[0018] In the present invention, by combining the AlexNET model and the VGG16 model as feature extraction models, the diversity feature extraction of the food to be identified is provided, the feature expression of the food to be identified is enriched, and then the redundant features in the joint features of the food to be identified are removed according to the minimum redundancy maximum correlation algorithm, and the effective features are selected. The traditional cascade-level feature learning algorithm is replaced by feature selection, and the computational cost is reduced and higher precision performance is achieved by reducing the feature size, which can not only reduce the complexity of the recognition process, but also maintain the recognition accuracy of the food. Afterwards, a nonlinear function is introduced to improve the classifier, and the existing algorithm can effectively extract food features when facing similar foods that cannot be classified according to linear functions, and then effectively identify the type of the food, improve classification performance and accuracy, reduce refrigerator manufacturing costs, and enhance product competitiveness. By first extracting accurate deep features and then using the improved support vector machine classifier for classification and identification, the learning time and energy consumption of the neural network model in the learning process are effectively reduced, the training difficulty is reduced, and after-sales maintenance is facilitated, so that the refrigerator can quickly obtain and identify the type of food, thereby improving the response speed and energy saving level of the smart refrigerator, better serving customers' daily life, and contributing to product promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The preferred implementation modes will be described below in a clear and understandable manner with reference to the accompanying drawings to further illustrate the above-mentioned characteristics, technical features, advantages and implementation methods of the present invention.
[0020] Figure 1 It is a flow chart of a refrigerator intelligent control method based on image recognition provided by the present invention;
[0021] Figure 2It is a structural schematic diagram of a refrigerator intelligent control process based on image recognition provided by the present invention. DETAILED DESCRIPTION
[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings and other implementation methods can be obtained based on these drawings without creative work.
[0023] In order to simplify the drawings, only the parts related to the invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn or marked. In this article, "one" not only means "only one", but also means "more than one".
[0024] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0025] In this document, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0026] In addition, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0027] Example 1
[0028] In one embodiment, the reference specification Figure 1 , which shows a schematic diagram of the flow of the refrigerator intelligent control method based on image recognition provided by the present invention. Figure 2 , showing a structural schematic diagram of a refrigerator intelligent control process based on image recognition provided by the present invention.
[0029] The present invention provides a refrigerator intelligent control method based on image recognition, comprising:
[0030] S101: Acquire images of food to be identified placed in a refrigerator.
[0031] It is understandable that the food may include meat, vegetables or other food, and by installing a camera in the refrigerator, images of the food placed in the refrigerator can be obtained.
[0032] In a possible implementation manner, after S101, the method further includes:
[0033] S101A: Preprocess the food image to be identified, including image denoising and image enhancement.
[0034] Among them, image denoising aims to reduce the noise in the image, that is, irrelevant or unnecessary information. The noise may be caused by problems with the image acquisition equipment, lighting conditions or other environmental factors. Denoising can improve the quality of the image and help with subsequent feature extraction and classification steps. Image enhancement is to improve the visual quality and recognizability of the image. Image enhancement can include operations such as adjusting contrast, brightness, and color balance to make the image clearer and easier to analyze. The enhanced image may be more conducive to accurate recognition and feature extraction of the deep learning model.
[0035] Preprocessing helps eliminate unnecessary information in the image, making it easier for the deep learning model to focus on the characteristics of the food itself, thereby improving recognition accuracy. It can also make the system more adaptable and better able to process images under different lighting and environmental conditions. By improving image quality, the user experience when using the smart refrigerator can be enhanced, making the system more intelligent and user-friendly. In general, image preprocessing is to optimize the input image so that subsequent computer vision and deep learning models can better process and understand the image content.
[0036] S102: Construct a feature extraction model based on the parallel AlexNET model and VGG16 model to extract the joint features of the food to be identified.
[0037] In a possible implementation, the joint features of the food to be identified include a first feature set of the food image to be identified extracted by the AlexNET model and a second feature set of the food image to be identified extracted by the VGG16 model, wherein the first feature set and the second feature set both include texture attributes, shape attributes, color attributes, hierarchical attributes and local attributes of the food to be identified.
[0038] Among them, AlexNET is a deep convolutional neural network, which contains multiple convolutional layers and pooling layers, which is used to gradually extract high-level features of the image. The Rectified Linear Unit (ReLU) activation function is used after the convolutional layer, which helps the network learn nonlinear features. The LRN layer is introduced to help suppress the response of neighboring neurons and enhance the generalization ability of the model. The Dropout technique is used to prevent overfitting by randomly shutting down some neurons during training. The VGG16 model is a deep convolutional neural network proposed by a research team at the University of Oxford. It has 16 layers of convolution and fully connected layers, which is deeper than AlexNET. A smaller 3x3 convolution kernel is used so that the number of parameters will not explode when the network is deeper. The convolutional layers in VGG16 all use the same size convolution kernel, which simplifies the structure of the network. The maximum pooling layer is used to reduce the size of the feature map. AlexNET and VGG16 use different network structures, which can extract features at different levels and different levels of abstraction. By using them in parallel, richer and more diverse feature representations can be obtained. Food images may have a variety of different features, including texture, shape, color, etc. Using the features extracted by two different models in parallel can better adapt to different types of food. The joint use of two models with different characteristics can improve the robustness of the model while improving classification accuracy and reducing the risk of overfitting. Compared with using a large neural network alone, the small AlexNET and VGG16 can be trained and inferred faster and improve computational efficiency. By using these two models together, the multi-level features in food images can be better captured and utilized, improving the performance of the entire system.
[0039] S103: removing redundant features in the joint features of the food to be identified by using a minimum redundancy maximum correlation algorithm to obtain a deep feature of the food to be identified.
[0040] Among them, the minimum redundancy maximum correlation algorithm, also known as the mRMR algorithm, is an algorithm for feature selection. Its goal is to reduce the redundancy between features while retaining the maximum correlation. The algorithm evaluates their correlation by calculating the mutual information between features, and then selects a set of features that are both relevant and minimally redundant. The mutual information measures the mutual dependence between two random variables.
[0041] Specifically, first sort all features and arrange them in descending order according to their mutual information values with the target variable. Then create an empty feature set, add the highest-ranked features to the feature set in turn, and calculate the average mutual information between the feature and the selected features. The selected features should have the greatest relevance while minimizing redundancy with the selected features. Repeat the above steps until a predetermined number of features are selected or a predetermined performance indicator is reached.
[0042] By removing highly redundant features, the mRMR algorithm can help reduce data dimensions and improve the computational efficiency of the model. Removing redundant features helps reduce the model's sensitivity to noise and unnecessary information, thereby improving the model's generalization performance. Reducing the number of features can significantly speed up the training process, especially on high-dimensional data sets. The feature sets selected using mRMR are easier to interpret because they are more directly associated with the target variable.
[0043] In general, the application of the mRMR algorithm in feature selection helps to optimize the feature set, improve model performance, and to a certain extent explain and understand the feature importance of the model. In the extraction of deep features of food to be identified, the mRMR algorithm can ensure that the selected feature set has the maximum amount of information and reduce redundancy in the modeling process, providing more valuable input for subsequent classification models.
[0044] In a possible implementation manner, S103 specifically includes:
[0045] S1031: Form a feature vector f based on the extracted i-th feature i :
[0046] f i =[f i 1 ,f i 2 ,f i 3 ,…f i N ]
[0047] Among them, f i j represents the jth feature of the i-th attribute, i=5, j=1,2,…,N, N represents the maximum number of features included in each attribute;
[0048] S1032: Based on the probability distribution, establish the mutual information value function I(X,Y) between attribute X and attribute Y:
[0049]
[0050] Among them, p(x,y) represents the combined distribution probability of x feature and y feature, p 1 (x) and p 2 (y) represents the marginal distribution probability of feature x and feature y respectively;
[0051] S1033: Calculate attribute F according to mutual information value function i and attribute F j The first mutual information value between:
[0052] I(F i; F j )
[0053] Among them, I(F i ; F j ) represents the attribute F i and attribute F j The mutual information value between ;
[0054] S1034: Obtain attribute category label H and calculate attribute F i The second mutual information value between the attribute category label:
[0055] I(F i ; H)
[0056] Among them, I(F i ; H) indicates attribute F i and the mutual information value between the attribute category labels;
[0057] S1035: retaining features whose mutual information values are smaller than a preset first mutual information value and smaller than a preset second mutual information value, to obtain a selected feature set S;
[0058] S1036: Set the minimum redundancy condition min W and the minimum correlation condition min V :
[0059]
[0060]
[0061] Among them, |S| represents the number of features in the selected feature set;
[0062] S1037: Combine the redundant condition W and the related condition V to determine the feature screening condition T:
[0063]
[0064] S1038: According to the screening conditions, redundant features in the joint features of the food to be identified are removed to obtain the deep features of the food to be identified.
[0065] It should be noted that, through the minimum redundancy maximum correlation algorithm, the system forms a feature vector based on the extracted multiple features, and then calculates the mutual information value between the attributes based on the probability distribution, and then obtains the deep features of the food to be identified. By setting the preset mutual information value conditions, the algorithm effectively retains the features related to the attribute category label and with the maximum amount of information, while reducing the redundancy between the features. The advantage of this step in the image recognition intelligent refrigerator control method is that it ensures that the extracted deep features are more critical and targeted, improves the model's ability to represent the food to be identified, and has better classification performance and generalization ability than traditional methods. It can reduce the speed of effective feature acquisition of subsequent classification models during the training process, reduce the image feature size, reduce the consumption of training resources, and improve the accurate recognition ability of the trained model. This feature selection method helps to improve the accuracy and efficiency of the system, and brings significant advantages to the practical application of the intelligent refrigerator intelligent control method.
[0066] S104: Construct an improved support vector machine classifier including a linear separation model and a nonlinear separation model.
[0067] Among them, the support vector machine (SVM) classifier is a machine learning algorithm used for classification and regression analysis. Here, the purpose of dividing the classifier into linear separation model and nonlinear separation model is to better adapt to different types of data. Linear separation model: It is a classification method based on linear hyperplane. The model classifies by finding a hyperplane that can divide the data into two categories. The hyperplane is a d-1 dimensional subspace, where d is the dimension of the data. The linear separation model is suitable for situations where the data is well linearly distributable in the feature space. Nonlinear separation model: The nonlinear separation model uses the kernel technique to map the data from the original space to a higher dimensional feature space, thereby achieving modeling of nonlinear relationships. This model can handle data that cannot be separated by a linear hyperplane in the original feature space.
[0068] The improved support vector machine combines linear and nonlinear classification methods to adapt to data distributions of various shapes and structures. The construction of this comprehensive model aims to improve the flexibility of the classifier and make it more capable of complex data classification tasks.
[0069] In a possible implementation, S104 specifically includes:
[0070] S1041: Establish a linear separation model and the objective function of the linear separation model:
[0071] wx i +b≥1,y i =1
[0072] wxi +b≤-1,y i =-1
[0073]
[0074] Among them, y i Represents the category label, when y i = 1 indicates that the feature is a positive sample label. i = -1 indicates that the feature is a negative sample label, w indicates the weight vector, x i represents the i-th sample feature vector, b represents the bias parameter, represents the objective function of the linear separation model, ||w|| 2 represents the square of the norm of the hyperplane normal vector;
[0075] S1042: Introduce a penalty term to improve the objective function of the linear model and obtain the objective function of the nonlinear separation model:
[0076]
[0077] in, represents the objective function of the nonlinear separation model, represents the penalty term, C represents the regularization parameter, ξ i Represents the classification error variable for the i-th feature.
[0078] In a possible implementation, S104 further includes:
[0079] S1043: Solve the objective function of the linear separation model and the objective function of the nonlinear separation model through the Lagrange equation to obtain the Lagrange multipliers of the corresponding objective functions:
[0080]
[0081] Where L() represents the Lagrange equation, α i represents the Lagrange multiplier corresponding to sample feature i, represents the regularization term of the Lagrange multiplier, and k represents the number of samples;
[0082] S1044: Combine the Lagrange multiplier and the corresponding attribute category label, introduce the linear decision function and nonlinear decision function based on the Gaussian radial basis kernel function, and output the category label of the sample:
[0083]
[0084]
[0085]
[0086] Among them, f(x) 线性 and f(x) 非线性 They represent the category labels of the samples output by the linear decision function and the nonlinear decision function respectively, sign() represents the sign function, α i线性 represents the Lagrange multiplier of the objective function of the linear separation model, α i非线性 The Lagrange multiplier representing the objective function of the nonlinear separation model, K(x,x i ) represents the Gaussian radial basis kernel function, σ represents the bandwidth parameter of the Gaussian kernel, x represents the input sample, x i represents the i-th sample feature vector, i.e., the support vector of the Gaussian radial basis kernel function, ‖xx i ‖ represents the Euclidean distance between the input sample and the support vector.
[0087] Specifically, the objective functions of the linear separation model and the nonlinear separation model are first established, and then the penalty term is introduced to improve the objective function of the linear model to obtain the objective function of the nonlinear separation model. Next, the objective functions of the linear separation model and the nonlinear separation model are solved by the Lagrange equation to obtain the Lagrange multipliers of the corresponding objective functions. Finally, the linear decision function and the nonlinear decision function based on the Gaussian radial basis kernel function are introduced in combination with the Lagrange multipliers and the corresponding attribute category labels, and the category labels of the samples are output.
[0088] The advantage of this approach is that by introducing a nonlinear separation model, the support vector machine (SVM) classifier can more flexibly adapt to data distributions of various shapes and structures. The combination of linear and nonlinear separation models, as well as the introduction of Lagrange multipliers and kernel functions, enables the classifier to better handle complex data classification tasks, improving the performance and generalization ability of the classifier. This comprehensive modeling method makes the support vector machine more powerful and applicable when dealing with actual image recognition problems.
[0089] It should be noted that in the process of food recognition, by constructing an improved support vector machine classifier (SVM) including a linear separation model and a nonlinear separation model, adopting the objective function of the nonlinear separation model, and introducing a Gaussian radial basis kernel function, the classifier can adapt to complex food characteristics. Food images may have complex texture, shape, color and other features. The linear separation model is difficult to capture these complex nonlinear relationships. The introduction of a nonlinear separation model and a Gaussian radial basis kernel function can better adapt to these complex features and improve the recognition ability of various different food characteristics.
[0090] The introduction of Gaussian radial basis kernel function helps to capture nonlinear relationships in the data, thereby improving the generalization ability of the classifier, which means that the classifier can still effectively classify new and previously unseen food images, rather than just performing well on the data during training. By adopting a feature extraction model that parallels the AlexNET model and the VGG16 model, multi-level and multi-angle food features are obtained, and the introduction of the minimum redundancy maximum correlation algorithm to remove redundant features, and then training through the improved support vector machine classifier, it helps to comprehensively consider and utilize these features, improving the overall recognition performance. The SVM classifier is introduced, which has strong robustness and can handle a small amount of noise and outliers, which makes the model more robust to noise and image changes in real scenes. This comprehensive modeling method can more accurately and robustly identify various types of food in food recognition tasks, and improve the effect of smart refrigerators on intelligent perception and control of food types.
[0091] S105: Training the improved support vector machine classifier.
[0092] Specifically, sample data is obtained from a plurality of different food data sets. The obtained food sample data sets are used to train the improved support vector machine classifier. During the training process, the classifier gradually adjusts the model parameters to achieve more accurate classification by learning the relationship between the features of the sample data and the category labels. The goal of the training is to enable the classifier to correctly classify new and unseen food images. The training process performs multiple rounds of training iterations until the classification accuracy of the improved support vector machine classifier reaches a preset classification accuracy level. In each round of iteration, the classifier gradually improves the classification performance of food categories by repeatedly learning and adjusting the training data. This process usually involves steps such as parameter adjustment and loss function optimization to maximize the performance of the classifier. During the training process, a preset classification accuracy level is set as the termination condition of the training. When the classifier reaches or exceeds this accuracy level during the training process, the training is stopped, which ensures that the classifier reaches the pre-set performance standard during the training process. Through the above steps, the S105 stage realizes the training of the improved support vector machine classifier to improve its ability to accurately classify food images.
[0093] In a possible implementation manner, S105 specifically includes:
[0094] S1051: Obtain a food sample data set, and train an improved support vector machine classifier until the classification accuracy of the improved support vector machine classifier reaches a preset classification accuracy, wherein the food sample data set includes a Food-101 data set, a UEC-Food 256 data set, a Food-5K data set, an ETHZ Food-101 data set, and a UNICT-FD889 data set.
[0095] Among them, food sample datasets can be obtained from existing public datasets or data collected by yourself according to specific tasks and scenarios. Food-101 dataset: A large-scale image dataset containing 101 categories of food, each category has at least 1,000 images. This dataset is used for food recognition and classification tasks. UEC-Food 256 dataset: An image dataset containing 256 categories of food. Each category contains multiple images and is used for food classification and detection research. Food-5K dataset: A dataset containing 5,000 images, covering 250 different food categories, mainly used for food recognition and classification tasks. ETHZ Food-101 dataset: A dataset from the Swiss Federal Institute of Technology in Zurich, containing 101 categories of food, each category has at least 1,000 images, and is used for food recognition research.
[0096] UNICT-FD889 dataset: contains 889 types of food images for food classification and recognition research.
[0097] These datasets usually contain a large number of food images, covering multiple categories and different shooting conditions. In practical applications, you can select a suitable dataset according to the requirements of the specific task or collect data yourself according to specific scenarios to build a custom dataset. The use of food image datasets helps train support vector machine classifiers and improve the accuracy of different foods.
[0098] S106: Input the deep features of the food to be identified into the trained improved support vector machine classifier.
[0099] It can be understood that the system inputs the deep features extracted from the image into the previously trained improved support vector machine classifier. These deep features are obtained through the processing flow from S102 to S105, and they capture the key information of the food image. By inputting these features into the support vector machine, the classifier can accurately identify the category to which the food image belongs.
[0100] S107: Output the food category to be identified.
[0101] After processing and analyzing the deep features of the input, the support vector machine classifier outputs a label or logo representing the category of food to be identified. This output is the conclusion obtained by the system after classifying the input image, that is, predicting which category the food belongs to.
[0102] S108: Adjusting the refrigeration temperature of the refrigerator according to the category of food to be identified.
[0103] It should be noted that based on the food category information obtained in S107, the system further intelligently adjusts the refrigerator's refrigeration temperature. Different foods may need to be stored at different temperatures to ensure their freshness and quality. By comparing the food recognition results with the preset optimal storage temperature, the system can adjust the refrigerator's refrigeration settings to provide the best storage conditions. Through image recognition technology and intelligent control algorithms, the refrigerator can automatically adjust the refrigeration temperature according to the type of food stored, thereby better meeting the preservation needs of different ingredients.
[0104] It is understandable that this image recognition-based smart refrigerator control method can be applied to refrigeration equipment with various independent storage units. Through unit-level control methods, food preservation can be better achieved, food sales can be optimized, and economic losses caused by improper food storage can be reduced, making it suitable for various refrigeration scenarios and enhancing the application and promotion capabilities of refrigeration equipment.
[0105] Compared with the prior art, the present invention has at least the following beneficial technical effects:
[0106] In the present invention, by combining the AlexNET model and the VGG16 model as feature extraction models, the diversity feature extraction of the food to be identified is provided, the feature expression of the food to be identified is enriched, and then the redundant features in the joint features of the food to be identified are removed according to the minimum redundancy maximum correlation algorithm, and the effective features are selected. The traditional cascade-level feature learning algorithm is replaced by feature selection, and the computational cost is reduced and higher precision performance is achieved by reducing the feature size, which can not only reduce the complexity of the recognition process, but also maintain the recognition accuracy of the food. Afterwards, a nonlinear function is introduced to improve the classifier, and the existing algorithm can effectively extract food features when facing similar foods that cannot be classified according to linear functions, and then effectively identify the type of the food, improve classification performance and accuracy, reduce refrigerator manufacturing costs, and enhance product competitiveness. By first extracting accurate deep features and then using the improved support vector machine classifier for classification and identification, the learning time and energy consumption of the neural network model in the learning process are effectively reduced, the training difficulty is reduced, and after-sales maintenance is facilitated, so that the refrigerator can quickly obtain and identify the type of food, thereby improving the response speed and energy saving level of the smart refrigerator, better serving customers' daily life, and contributing to product promotion.
[0107] Example 2
[0108] In one embodiment, the present invention provides an image recognition-based smart refrigerator, which is used to execute the image recognition-based refrigerator intelligent control method in Example 1.
[0109] The image recognition-based smart refrigerator provided by the present invention can realize the steps and effects of the image recognition-based refrigerator intelligent control method in the above-mentioned embodiment 1. To avoid repetition, the present invention will not go into details.
[0110] Compared with the prior art, the present invention has at least the following beneficial technical effects:
[0111] In the present invention, by combining the AlexNET model and the VGG16 model as feature extraction models, the diversity feature extraction of the food to be identified is provided, the feature expression of the food to be identified is enriched, and then the redundant features in the joint features of the food to be identified are removed according to the minimum redundancy maximum correlation algorithm, and the effective features are selected. The traditional cascade-level feature learning algorithm is replaced by feature selection, and the computational cost is reduced and higher precision performance is achieved by reducing the feature size, which can not only reduce the complexity of the recognition process, but also maintain the recognition accuracy of the food. Afterwards, a nonlinear function is introduced to improve the classifier, and the existing algorithm can effectively extract food features when facing similar foods that cannot be classified according to linear functions, and then effectively identify the type of the food, improve classification performance and accuracy, reduce refrigerator manufacturing costs, and enhance product competitiveness. By first extracting accurate deep features and then using the improved support vector machine classifier for classification and identification, the learning time and energy consumption of the neural network model in the learning process are effectively reduced, the training difficulty is reduced, and after-sales maintenance is facilitated, so that the refrigerator can quickly obtain and identify the type of food, thereby improving the response speed and energy saving level of the smart refrigerator, better serving customers' daily life, and contributing to product promotion.
[0112] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0113] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A refrigerator intelligent control method based on image recognition, characterized in that: include: S101: Acquire an image of food to be identified placed in a refrigerator; S102: Construct a feature extraction model based on the parallel AlexNET model and VGG16 model to extract the joint features of the food to be identified; S103: removing redundant features in the joint features of the food to be identified by using a minimum redundancy maximum correlation algorithm to obtain a deep feature of the food to be identified; S104: constructing an improved support vector machine classifier including a linear separation model and a nonlinear separation model; S105: training the improved support vector machine classifier; S106: inputting the depth features of the food to be identified into the trained improved support vector machine classifier; S107: Outputting the food category to be identified; S108: adjusting the refrigeration temperature of the refrigerator according to the category of food to be identified; Wherein, the S104 specifically includes: S1041: Establish the linear separation model and the objective function of the linear separation model: wx i +b≥1,y i =1 wx i +b≤-1,y i =-1 Among them, y i Represents the category label, when y i = 1 indicates that the feature is a positive sample label. i = -1 indicates that the feature is a negative sample label, w indicates the weight vector, x i represents the i-th sample feature vector, b represents the bias parameter, represents the objective function of the linear separation model, ||w|| 2 represents the square of the norm of the hyperplane normal vector; S1042: Introduce a penalty term to improve the objective function of the linear model to obtain the objective function of the nonlinear separation model: in, represents the objective function of the nonlinear separation model, represents the penalty term, C represents the regularization parameter, ξ i Represents the classification error variable of the i-th feature; Wherein, the S104 further includes: S1043: Solve the objective function of the linear separation model and the objective function of the nonlinear separation model by using the Lagrange equation to obtain Lagrange multipliers of the corresponding objective functions: Where L() represents the Lagrange equation, α i represents the Lagrange multiplier corresponding to sample feature i, represents the regularization term of the Lagrange multiplier, k represents the number of samples; S1044: Combining the Lagrange multiplier and the corresponding attribute category label, a linear decision function and a nonlinear decision function based on a Gaussian radial basis kernel function are introduced to output the category label of the sample: Among them, f(x) 线性 and f(x) 非线性 They represent the category labels of the samples output by the linear decision function and the nonlinear decision function respectively, sign() represents the sign function, α i线性 represents the Lagrange multiplier of the objective function of the linear separation model, α i非线性 The Lagrange multiplier K(x,x) represents the objective function of the nonlinear separation model. i ) represents the Gaussian radial basis kernel function, σ represents the bandwidth parameter of the Gaussian kernel, x represents the input sample, x i represents the i-th sample feature vector, i.e., the support vector of the Gaussian radial basis kernel function, ‖xx i ‖ represents the Euclidean distance between the input sample and the support vector.
2. The refrigerator intelligent control method based on image recognition according to claim 1 is characterized in that: After S101, the method further includes: S101A: Preprocessing the food image to be identified, wherein the preprocessing includes image denoising and image enhancement.
3. The refrigerator intelligent control method based on image recognition according to claim 1, characterized in that: The joint features of the food to be identified include a first feature set of the food image to be identified extracted by the AlexNET model and a second feature set of the food image to be identified extracted by the VGG16 model, wherein the first feature set and the second feature set both include texture attributes, shape attributes, color attributes, hierarchical attributes and local attributes of the food to be identified.
4. The refrigerator intelligent control method based on image recognition according to claim 3 is characterized in that: The S103 specifically includes: S1031: Form a feature vector f based on the extracted i-th feature i : f i =[f i 1 ,f i 2 ,f i 3 ,…f i N ] Among them, f i j represents the jth feature of the i-th attribute, i=5, j=1,2,…,N, N represents the maximum number of features included in each attribute; S1032: Based on the probability distribution, establish the mutual information value function I(X,Y) between attribute X and attribute Y: Among them, p(x,y) represents the combined distribution probability of features x and y, p1(x) and p2(y) represent the marginal distribution probabilities of features x and y respectively; S1033: Calculate attribute F according to the mutual information value function i and attribute F j The first mutual information value between: I(F i ;F j ) Among them, I(F i ; F j ) represents the attribute F i and attribute F j The mutual information value between ; S1034: Obtain attribute category label H and calculate attribute F i The second mutual information value between the attribute category label: I(F i ;H) Among them, I(F i ; H) indicates attribute F i and the mutual information value between the attribute category label; S1035: retaining features whose mutual information values are smaller than a preset first mutual information value and smaller than a preset second mutual information value, to obtain a selected feature set S; S1036: Set the minimum redundancy condition min W and the minimum correlation condition min V : Wherein, |S| represents the number of features in the selected feature set; S1037: Combine the redundant condition W and the related condition V to determine the feature screening condition T: S1038: According to the screening conditions, redundant features in the joint features of the food to be identified are removed to obtain the deep features of the food to be identified.
5. The refrigerator intelligent control method based on image recognition according to claim 1 is characterized in that: The S105 is specifically as follows: S1051: Obtain a food sample data set, and train the improved support vector machine classifier until the classification accuracy of the improved support vector machine classifier reaches a preset classification accuracy, wherein the food sample data set includes the Food-101 data set, the UEC-Food 256 data set, the Food-5K data set, the ETHZ Food-101 data set, and the UNICT-FD889 data set.
6. The refrigerator intelligent control method based on image recognition according to claim 1, characterized in that: The S108 specifically includes: S1081: Obtaining the optimal storage temperature of the food category to be identified; S1082: Adjust the refrigeration temperature of the refrigerator to the optimal storage temperature.
7. The refrigerator intelligent control method based on image recognition according to claim 1, characterized in that: Also includes: S109: Setting an update period to verify the classification accuracy of the improved support vector machine classifier.
8. A smart refrigerator based on image recognition, characterized in that: To execute the refrigerator intelligent control method based on image recognition as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Intelligent identification method and device for sliced food materials
CN110795959A
Method and device for controlling temperature of refrigerator
CN110857831A
Operation and maintenance management and control platform fault feature extraction method
CN111242204A
Joint learning extraction method and system for salient regions
CN111666954A
Electrocardiogram anomaly recognition method and system based on combination of AlexNet and transfer learning
CN112006678A
