A control method of an air conditioner, a control device of an air conditioner, and a storage medium
By improving the YOLOv5 algorithm and CSPDarknet53 network structure, and combining the self-attention mechanism and NWD loss function, the problem of misjudgment in the case of shading of smart air conditioners is solved, and more accurate intelligent control of air conditioners and a comfortable indoor environment are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NINGBO AUX ELECTRIC CO LTD
- Filing Date
- 2023-12-11
- Publication Date
- 2026-08-04
AI Technical Summary
Existing smart air conditioners have poor recognition capabilities, resulting in ineffective smart control. In particular, they are prone to misjudgment or missed recognition under the influence of factors such as light, angle, and obstruction.
An improved YOLOv5 algorithm is adopted, combined with the CSPDarknet53 network structure and SASA module. Image data of users in the air-conditioned area are obtained through the target detection model. The robustness of small target detection is improved by using the NWD loss function, and the occlusion problem is handled by the self-attention mechanism. User information is obtained to control the operation of the air conditioner.
It improves the air conditioner's intelligent recognition capabilities, avoids misjudgment or missed recognition when the user's view is obstructed, achieves more accurate intelligent control of the air conditioner, and provides a comfortable indoor environment.
Smart Images

Figure CN117433142B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of air conditioning technology, specifically to an air conditioning control method, an air conditioning control device, and a storage medium. Background Technology
[0002] An air conditioner is a device used to regulate indoor temperature and humidity, and is widely used in homes, offices, and commercial spaces. It can provide cooling or heating functions according to user needs, improving indoor temperature and comfort.
[0003] To provide users with a more comfortable experience, existing air conditioner manufacturers have developed smart air conditioners that utilize technologies such as sensors, cameras, and artificial intelligence to achieve intelligent control. However, the recognition effect of existing smart air conditioners is not good, resulting in poor intelligent control performance. Summary of the Invention
[0004] The problem solved by this invention is that existing smart air conditioners have poor recognition performance, resulting in poor smart control performance.
[0005] To address the above problems, the present invention provides a control method for an air conditioner, the control method comprising:
[0006] Acquire image data of the area where the air conditioner is located;
[0007] The image data is input into the target detection unit to obtain user information representing all users in the region. All users in the region include users whose images are occluded by other objects and users whose images are not occluded.
[0008] The operation of the air conditioner is controlled based on user information.
[0009] Technical effect: By inputting image data into the target detection model, user information on the status of all users in the area is obtained. The operation of the air conditioner is intelligently controlled based on the user information, which includes users whose images are obscured by other objects. This avoids misjudgment or missed identification due to user obstruction, improves the intelligent recognition capability of the air conditioner, and thus improves the accuracy of intelligent control of the air conditioner.
[0010] Optionally, the object detection unit includes an object detection model and an object acquisition module. The object detection model is trained by inputting multiple preset image data into a preset YOLOv5 algorithm. Inputting the image data into the object detection unit yields user information representing all users within the region, including:
[0011] Image data is input into the object detection model to obtain feature information of different categories of objects;
[0012] The feature information is input into the SASA module in the object detection model for processing to determine the feature map of the feature information that is occluded by other objects.
[0013] The feature map is input into the target acquisition module to obtain user information of users whose images are occluded by other objects, and the feature information is input into the target acquisition module to obtain user information of users whose images are not occluded by other objects.
[0014] Technical effect: By using the SASA module in the target detection model to solve the problem of users being occluded by other objects, the intelligent recognition capability of the air conditioner is improved, thereby improving the accuracy of intelligent control of the air conditioner.
[0015] Optionally, the feature information can be input into the SASA module of the object detection model for processing to determine the feature map containing features occluded by other objects, including:
[0016] Input the image data into the SASA module to obtain query features, keyword features, and value features;
[0017] The SASA module controls the acquisition of attention weights between each pixel and other pixels based on query features and keyword features, and then weights the attention weights of each pixel to the value features to obtain a feature map associated with each pixel.
[0018] Technical effect: By weighted summing of the value features of each pixel, a feature map associated with each pixel can be obtained. This process ensures that the object detection model focuses more on regions with high correlation to pixels, thereby improving the expressive power of the features.
[0019] Optionally, before inputting the feature information into the SASA module of the object detection model for processing to determine the feature map of feature information occluded by other objects, the control method further includes:
[0020] The feature information of different categories of objects is input into the NWD loss function of the object detection model so that the NWD loss function measures the similarity between the feature information of each object in all objects by distributing similarity.
[0021] Technical benefits: By using the NWD loss function, the similarity between detected small targets can be assessed more accurately, unaffected by changes in their scale. This helps improve the performance and robustness of target detection models in small target detection tasks.
[0022] Optionally, inputting image data into the object detection model to obtain feature information of different categories of objects includes:
[0023] Image data is input into the CSPDarknet53 network structure of the object detection model to extract feature information of all objects;
[0024] The CSPDarknet53 network structure includes a BasicRFB module in its spatial pooling layer, which is used to identify all objects.
[0025] Technical effect: It effectively improves the feature extraction capability of the target detection model, thus enabling the rapid and effective acquisition of feature information of different categories of objects and accelerating the response speed of the target detection model.
[0026] Optionally, user information includes the number of users, user location, and user actions. Controlling the operation of the air conditioner based on user information includes:
[0027] The average position and average posture are obtained based on the number of users, user locations, and user actions.
[0028] The target temperature is obtained based on the average position and average posture, as well as the preset temperature.
[0029] Adjust the air conditioner's compressor and fan according to the target temperature.
[0030] Technical benefits: By monitoring user information in real time and using intelligent algorithms to intelligently control the air conditioner's compressor and fan, the indoor temperature can be automatically adjusted without manual intervention, providing a more comfortable indoor environment and improving the user's quality of life.
[0031] This application embodiment also provides an air conditioner control device, the control device including:
[0032] The acquisition unit is used to acquire image data of the area where the air conditioner is located.
[0033] The target detection unit is connected to the acquisition unit and is used to input image data into the target detection unit to obtain user information representing the status of users in the region. Users in the region include users who are occluded by other objects in the image data and users who are not occluded.
[0034] The control unit is connected to the target detection unit and is used to control the operation of the air conditioner based on user information.
[0035] Technical effect: By acquiring image data through the acquisition unit and processing the image data through the target detection unit, user information of users in the area that are occluded by other objects and users that are not occluded can be obtained. This can avoid misjudgment or missed identification due to user occlusion, improve the intelligent recognition capability of the air conditioner, and thus improve the accuracy of intelligent control of the air conditioner.
[0036] Optionally, the target detection unit includes a target detection model and a target acquisition module. The target detection model is obtained by training a preset YOLOv5 algorithm with multiple preset image data. The target detection model is used to obtain feature maps and feature information based on the image input to the target detection unit. The target acquisition module is used to obtain user information based on the feature maps and feature information.
[0037] Technical effect: The preset YOLOv5 algorithm can improve the feature extraction ability of the object detection model.
[0038] Optional, object detection models include:
[0039] The Backbone layer includes the CSPDarknet53 network structure. The spatial pooling layer of the CSPDarknet53 network structure contains a BasicRFB module, which is used to extract feature information of all objects.
[0040] The Head layer includes the SASA module, which processes feature information to determine feature maps of features occluded by other objects.
[0041] The NWD loss function layer is used to classify the feature information of all objects by measuring the similarity between the feature information of each object in all objects through distribution similarity.
[0042] Technical effect: By optimizing the target detection model, it can respond promptly to changes in indoor personnel and achieve rapid temperature regulation.
[0043] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement any of the above-described control methods.
[0044] The air conditioner control method provided in this application obtains user information about the status of all users in the area by inputting image data into a target detection model. The air conditioner is then intelligently controlled based on the user information, which includes users whose images are obscured by other objects. This avoids misjudgment or missed identification due to user obstruction, improves the intelligent recognition capability of the air conditioner, and thus improves the accuracy of intelligent control of the air conditioner. Attached Figure Description
[0045] Figure 1 A flowchart illustrating the air conditioning control method provided in an embodiment of this application;
[0046] Figure 2 for Figure 1The diagram shows the process of obtaining user information for all users in the control method shown.
[0047] Figure 3 for Figure 1 The diagram shows a flow chart illustrating the control method that controls the operation of the air conditioner based on user information.
[0048] Figure 4 This is a schematic diagram of the structure of the air conditioner control device provided in the embodiments of this application;
[0049] Figure 5 for Figure 4 The diagram shows the structure of the target detection unit in the control device.
[0050] Explanation of reference numerals in the attached figures:
[0051] 100 - Control device, 10 - Acquisition unit, 20 - Target detection unit, 30 - Control unit;
[0052] 210 - Target detection model; 220 - Target acquisition module;
[0053] 211-Backbone layer, 212-Head layer, 213-NWD loss function layer, 214-Optimization layer; 2111-CSPDarknet53 network structure, 2121-SASA module. Detailed Implementation
[0054] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below.
[0055] Air conditioners can provide cooling or heating functions according to user needs, improving indoor temperature and comfort. However, traditional air conditioners usually require users to manually set the temperature and fan speed, or control them using external devices such as remote controls or smartphones. This not only causes inconvenience for users, but may also lead to low operating efficiency and wasted energy.
[0056] To address these issues, some air conditioner manufacturers have developed smart air conditioners, utilizing technologies such as sensors, cameras, and artificial intelligence to achieve intelligent control. However, existing smart air conditioners still have some shortcomings, such as:
[0057] 1) The recognition effect of the air conditioner's camera is affected by factors such as light, angle, and obstruction, which may result in misidentification or missed identification.
[0058] 2) The camera recognition algorithm of the air conditioner is complex and slow, and cannot respond to the user's needs in real time;
[0059] 3) The camera recognition algorithm for air conditioners has poor generalization ability for different scenarios and datasets, requiring a lot of training and optimization.
[0060] Therefore, this application provides an air conditioner control method and an air conditioner control device to solve the above-mentioned technical problems. See below for details.
[0061] Please see Figure 1 , Figure 1 This is a flowchart illustrating an air conditioner control method provided in an embodiment of this application. The embodiment of this application provides an air conditioner control method, which includes the following steps:
[0062] 110. Obtain image data of the area where the air conditioner is located.
[0063] The image data can be photos taken by a camera or photos obtained from videos captured by a camera.
[0064] It is understandable that the time for acquiring image data can be either by acquiring photos sequentially in the video according to time sequence, or by acquiring photos according to a preset time interval. The specific settings can be made according to the actual situation, and no specific restrictions are made here.
[0065] In illustrative terms, the camera captures video of the area where the air conditioning equipment is located. The electronic device acquires video of the area at preset intervals to obtain image data. The preset intervals can be 3 minutes, 5 minutes, 10 minutes, etc. The specific preset intervals can be set according to experimental data, historical data, or user habits, and no specific restrictions are imposed here.
[0066] 120. Input the image data into the target detection unit to obtain user information representing all users in the region. All users in the region include users whose images are occluded by other objects and users whose images are not occluded.
[0067] In some embodiments, the visual detection unit includes a target detection model and a target acquisition module. The target detection model is trained by inputting multiple preset user image samples into an improved YOLOv5 algorithm. The target acquisition module is mainly used to obtain user information from feature information and feature maps. In other words, this embodiment of the application detects image data using a target detection model based on the improved YOLOv5 algorithm and obtains user information through the target acquisition module.
[0068] The specific process of inputting image data into the target detection unit to obtain user information for all users within the represented area can be found in the following document. Figure 2 , Figure 2 for Figure 1The diagram illustrates the process of obtaining user information for all users in the control method shown. The specific process is as follows:
[0069] 121. Input the image data into the target detection model to obtain the feature information of different categories of objects.
[0070] The object detection model based on the improved YOLOv5 algorithm provided in this application embodiment can be a deep learning model for object detection. It can quickly identify objects of different categories in an image and provide the object's location and size. For example, by inputting image data into the object detection model, this application can quickly obtain feature information of different categories of objects, where the feature information includes the object's category, location, and shape.
[0071] Furthermore, in some embodiments, in order to improve the performance of the object detection model, this application uses the CSPDarknet53 network structure in the backbone layer of the YOLOv5 algorithm, and adds the BasicRFB module in the last spatial pooling layer of the CSPDarknet53 network structure, thereby effectively improving the feature extraction capability of the object detection model, thus enabling the rapid and effective acquisition of feature information of different categories of objects and accelerating the response speed of the object detection model.
[0072] 122. Input the feature information into the SASA module in the target detection model for processing to determine the feature map of the feature information that is occluded by other objects.
[0073] In some embodiments, a SASA module is provided in the Head layer of the object detection model. The SASA module is a fully self-attention module that can directly apply self-attention mechanisms to the image feature map without the assistance of convolutional layers. That is, the SASA module replaces each spatial convolution with local self-attention, thereby enhancing the information of each pixel in the feature map, enabling the capture of global information in the image and improving the model's ability to handle complex scenes. Therefore, by adding a SASA module to the Head layer of the object detection model in this embodiment, the object detection prediction model can focus more on the important parts of the face when extracting feature information, without being affected by occlusion or background interference, thus solving the problem of occlusion and reducing the number of model parameters.
[0074] For example, image data is input into the SASA module to obtain query features, keyword features, and value features; the SASA module obtains the attention weights between each pixel and other pixels based on the query features and keyword features, and weights the attention weights of each pixel to the value features to obtain a feature map associated with each pixel.
[0075] The SASA module treats each pixel in the input feature map as a sequence element and feeds it into a self-attention layer to obtain the attention weight for each pixel. By weighted summing of the value features of each pixel, a feature map associated with each pixel can be obtained. This process ensures that the object detection model focuses more on regions with high correlation to pixels, thereby improving the expressive power of the features.
[0076] In short, by utilizing these attention weights, the SASA module employs a carefully designed weighting mechanism to make the final feature map more focused on information relevant to each pixel, thereby improving the expressive power of the object detection model and its understanding of complex scenes.
[0077] For example, the input feature map is transformed into three feature maps through a set of linear transformations: query feature Q, key feature K, and value feature V. These three feature maps are used to calculate the attention weights, query feature, and value feature, respectively. These feature maps all have a shape of C×H×W, where C represents the number of channels, and H and W represent the height and width of the feature map, respectively. Next, for each pixel i, the attention weight between it and other pixels is calculated, which can be obtained using the following formula:
[0078]
[0079] Where, q i k represents the Query feature of pixel i. j This represents the Keys feature of pixel j. This attention weight is used to weight the value features, ultimately obtaining the feature representation of pixel i. The weight represents the square root of the feature dimension. This weight value is used to measure the correlation between pixel i and pixel j, while the denominator is a factor used to normalize these weights. Specifically, these attention weights are then used to weight the feature map to obtain the final output feature map.
[0080]
[0081] The main function of Formula 2 is to apply attention weights to the Values feature, thereby generating the final feature representation for each pixel. This helps to enhance the model's performance and characteristics.
[0082] In formula 2, a ij It is the attention weight between pixel i and pixel j, v jLet j be the value feature of pixel i. By weighted summing of the value features of each pixel j, we can obtain the final output feature of pixel i. This process ensures that the model focuses more on regions highly correlated with pixel i, thereby improving the expressive power of the features. In short, by utilizing these attention weights, the SASA module, through a carefully designed weighting mechanism, makes the final output feature map more focused on information related to each pixel, thereby improving the model's expressive power and understanding of complex scenes.
[0083] In some embodiments, before inputting feature information into the SASA module of the object detection model for processing to determine the feature map of feature information occluded by other objects, this application embodiment also utilizes the Normalized Gaussian Wasserstein Distance Loss (NWD) loss function to improve the robustness of the object detection model to small object detection, enabling the object detection model to better detect small objects.
[0084] The Non-Wait Loss (NWD) loss function is a loss function based on Wasserstein distance, which measures the similarity between two bounding boxes, rather than only considering their overlap as in traditional Intersection of Us (IoU). The NWD loss function can better handle positional biases of small objects and reduce errors in label assignment.
[0085] The formula for calculating the distance is as follows:
[0086]
[0087] Where N a N b W represents the number of ground truth boxes in the neighborhood of each predicted box, i.e., how many ground truth boxes surround each predicted box; 2 2 is a weighting parameter used to measure the relative importance between the ground truth box loss and the predicted box loss, where W 2 The expression for 2 is as follows:
[0088]
[0089] and These represent the center point coordinates and width and height of the two boxes, respectively.
[0090] For detected targets, regardless of whether they overlap, distributional similarity can be used to measure their similarity. In this case, Normalized Wasserstein Distance (NWD) is an effective metric. The NWD loss function is unaffected by the target scale, making it particularly suitable for evaluating the similarity between small targets.
[0091] Specifically, the NWD loss function is a method for comparing the differences between two probability distributions. In object detection, the feature distribution of each object can be viewed as a probability distribution, and the NWD loss function is used to quantify the similarity between these distributions. Because the NWD loss function is unaffected by the target scale, it is more robust when measuring the similarity between small objects.
[0092] Here, "small targets" can be understood as objects that are relatively small and have limited pixel information. The model may face challenges such as low resolution and a relatively small number of pixels. Because small targets have limited feature information, object detection models need to better handle these situations to ensure accurate detection. Therefore, this application embodiment uses the NWD loss function to more accurately evaluate the similarity between detected small targets, unaffected by their scale variations. This helps improve the performance and robustness of object detection models in small target detection tasks.
[0093] 123. Input the feature map into the target acquisition module to obtain user information of users whose images are occluded by other objects, and input the feature information into the target acquisition module to obtain user information of users whose images are not occluded by other objects.
[0094] Both feature maps and feature information are input into the target acquisition module to extract user information of occluded users and user information of users who are not occluded by other objects.
[0095] 130. Control the operation of the air conditioner based on user information.
[0096] User information includes the number of users, user location, and user actions. User actions include user postures, such as walking, lying down, sitting, etc.
[0097] For details on controlling the air conditioner's operation based on user information, please refer to [link / reference]. Figure 3 , Figure 3 for Figure 1 The diagram illustrates the process of controlling the air conditioner based on user information using the control method shown. The specific process is as follows:
[0098] 131. The average position and average posture are obtained based on the number of users, user locations, and user actions.
[0099] It is understandable that the number of people, their density, and their living conditions in the same space will affect the demand for air conditioning. Therefore, in this embodiment, the average location of the users is obtained based on the number of users and their locations, which is the density of the crowd. The higher the crowd density, the greater and more concentrated the heat dissipation, and the more cooling is required; conversely, the lower the crowd density, the less cooling is required.
[0100] The average posture is obtained based on the number of users and their actions, which gives us an idea of the living conditions of users in that area. For example, users who are moving around will generate more heat and require more cooling.
[0101] 132. The target temperature is obtained based on the average position, average posture, and preset temperature.
[0102] The initial temperature is obtained based on the average posture and average position. This initial temperature is then combined with a preset temperature to obtain the target temperature most suitable for the current environment and user needs. The preset temperature can be derived from a user-defined temperature range, user preferences, or energy-saving strategies; specific settings can be configured according to actual conditions, and no specific limitations are imposed here.
[0103] 133. Adjust the air conditioner compressor and fan according to the target temperature.
[0104] The system determines the operating mode and parameters based on the target temperature, and controls the operation of components such as the air conditioner's compressor and fan according to the operating mode and parameters, thereby achieving intelligent temperature regulation.
[0105] By monitoring user information in real time and using intelligent algorithms to intelligently control the air conditioner's compressor and fan, the indoor temperature can be automatically adjusted without manual intervention, providing a more comfortable indoor environment and improving the user's quality of life.
[0106] Please continue reading. Figure 4 , Figure 4This is a schematic diagram of the structure of an air conditioner control device provided in an embodiment of this application. This application also provides an air conditioner control device 100, which includes an acquisition unit 10, a target detection unit 20, and a control unit 30. The acquisition unit 10 acquires image data of the area where the air conditioner is located. The target detection unit 20 inputs the image data into a target detection model to obtain user information representing the status of users within the area. Users within the area include users obscured by other objects and users not obscured in the image data. The control unit 30 controls the operation of the air conditioner based on the user information. This application embodiment acquires image data through the acquisition unit 10 and processes the image data through the target detection unit 20 to obtain user information of users obscured by other objects and users not obscured within the area. This avoids misjudgment or missed identification due to user obscuration, improves the intelligent recognition capability of the air conditioner, and thus improves the accuracy of intelligent control of the air conditioner.
[0107] The acquisition unit 10 can be a camera installed on the air conditioner or a camera installed independently of the air conditioner. The specific configuration can be determined according to the actual situation, as long as the camera can cover most of the indoor area.
[0108] The target detection unit 20 includes a target detection model 210 and a target acquisition module 220. The target detection model 210 is obtained by training multiple preset user image samples using a preset YOLOv5 algorithm. The target detection model 210 includes a SASA module 2121, which is used to obtain the feature map and feature information of the occluded user. Thus, the target acquisition module 220 can extract the user information of the unoccluded user and the user information of the occluded user based on the feature map and feature information.
[0109] Please continue reading. Figure 5 , Figure 5 for Figure 4 The diagram shows the structure of the target detection unit in the control device. The target detection model 210 includes a backbone layer 211, which includes a CSPDarknet53 network structure 212 for feature extraction. In some embodiments, the spatial pooling layer of the CSPDarknet53 network structure 212 is equipped with a BasicRFB module to enhance the ability to extract feature information of all objects.
[0110] In some embodiments, the target detection model 210 further includes a Head layer 212, which includes a SASA module 2121 for processing feature information to determine feature maps of feature information occluded by other objects, so as to solve the occlusion problem and reduce the number of parameters.
[0111] In some embodiments, the object detection model 210 further includes an NWD loss function layer 213, which is used to measure the similarity between the feature information of each object in all objects by distributing similarity to classify the feature information of all objects, so that the object detection model 210 can better detect small objects. This may include weighting terms for small objects, adaptive loss weights, etc.
[0112] In some embodiments, the object detection model 210 further includes an optimization layer 214. The optimization layer 214 optimizes the improved YOLO v5 network by reducing the number of intermediate channel neurons and adjusting the learning rate, thereby avoiding model overfitting. Overfitting refers to the phenomenon where the object detection model 210 performs well on training data but poorly on test data. To prevent overfitting, the complexity and number of parameters of the object detection model 210 can be reduced, and appropriate learning rates and regularization methods can be used.
[0113] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement any of the above control methods.
[0114] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.
Claims
1. A method for controlling an air conditioner, characterized in that, The control method includes: Acquire image data of the area where the air conditioner is located; The image data is input into the target detection unit to obtain user information representing all users in the region. All users in the region include users whose images are occluded by other objects and users whose images are not occluded. The operation of the air conditioner is controlled based on the user information; The target detection unit includes a target detection model and a target acquisition module. The target detection model is obtained by training a preset YOLOv5 algorithm with multiple preset image data. The process of inputting the image data into the target detection unit to obtain user information representing all users within the region includes: The image data is input into the target detection model to obtain feature information of different categories of objects; The feature information is input into the SASA module in the target detection model for processing to determine the feature map of the feature information occluded by other objects. The SASA module replaces each spatial convolution with local self-attention; The feature map is input into the target acquisition module to obtain user information of users whose images are occluded by other objects, and the feature information is input into the target acquisition module to obtain user information of users whose images are not occluded by other objects. The step of inputting the feature information into the SASA module of the target detection model for processing to determine the feature map of feature information occluded by other objects includes: The feature information is input into the SASA module to obtain query features, keyword features, and value features; The SASA module is controlled to obtain the attention weight between each pixel and other pixels based on the query features and the keyword features, and the attention weight of each pixel is weighted to the value features to obtain a feature map associated with each pixel. Before inputting the feature information into the SASA module of the target detection model for processing to determine the feature map of feature information occluded by other objects, the control method further includes: The feature information of the different categories of objects is input into the NWD loss function of the target detection model, so that the NWD loss function measures the similarity between the feature information of each object in all objects by distributing similarity.
2. The control method according to claim 1, characterized in that, The step of inputting the image data into the target detection model to obtain feature information of different categories of objects includes: The image data is input into the CSPDarknet53 network structure of the target detection model to extract feature information of all objects; The CSPDarknet53 network structure includes a BasicRFB module in its spatial pooling layer, which is used to identify all objects.
3. The control method according to claim 1, characterized in that, The user information includes the number of users, user locations, and user actions. Controlling the operation of the air conditioner based on the user information includes: The average position and average posture are obtained based on the number of users, the user locations, and the user actions. The target temperature is obtained based on the average position, the average posture, and the preset temperature. The compressor and fan of the air conditioner are adjusted according to the target temperature.
4. A control device for an air conditioner, said control device being applicable to the control method as described in any one of claims 1-3, characterized in that, The control device includes: The acquisition unit is used to acquire image data of the area where the air conditioner is located; A target detection unit, connected to the acquisition unit, is used to input the image data into the target detection unit to obtain user information representing all users in the region, wherein all users in the region include users whose images are occluded by other objects and users whose images are not occluded. A control unit, connected to the target detection unit, is used to control the operation of the air conditioner based on the user information.
5. The control device according to claim 4, characterized in that, The target detection unit includes a target detection model and a target acquisition module. The target detection model is obtained by training a preset YOLOv5 algorithm with multiple preset image data. The target detection model is used to input the image data into the target detection model to obtain feature maps and feature information. The target acquisition module is used to obtain user information based on the feature maps and feature information.
6. The control device according to claim 5, characterized in that, The target detection model includes: The Backbone layer includes a CSPDarknet53 network structure, and the spatial pooling layer of the CSPDarknet53 network structure is equipped with a BasicRFB module for extracting feature information of all objects. The Head layer includes a SASA module for processing feature information to determine feature maps of feature information occluded by other objects. The NWD loss function layer is used to classify the feature information of all objects by measuring the similarity between the feature information of each object in all objects through distribution similarity.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the control method as described in any one of claims 1 to 3.