Room-type testing method and apparatuses therefor, computer device, and cleaning robot

Through the room type detection method, image data and classification models are used to calculate the weight of feature objects to determine the room type, which solves the problem of low cleaning efficiency of existing cleaning robots in different house types, achieving more efficient cleaning and better user experience. experience.

WO2024222747A1PCT designated stage expired Publication Date: 2024-10-31MIDEA ROBOZONE TECH CO LTD +1

Patent Information

Application Number
PCT/CN2024/089604
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-30
Filing Date
2024-04-24
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

Existing cleaning robots have low cleaning efficiency in rooms of different types, waste energy and have poor user experience, mainly because undifferentiated cleaning strategies cannot adapt to the characteristics of different rooms.

Method used

Through a room type detection method, image data and a preset room classification model are used to detect features in the target room and calculate their corresponding weights to determine the room type and formulate appropriate cleaning strategies. The method includes acquiring image data, detecting feature objects, calculating first weights and second weights of the feature objects, and determining a room type based on these weights.

Benefits of technology

It improves the cleaning efficiency of cleaning robots, reduces energy waste, and improves user experience. Through simple and clear classification logic and efficient algorithm operations, it avoids misclassification and algorithm complexity of complex furniture and home appliance displays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024089604_31102024_PF_FP_ABST
    Figure CN2024089604_31102024_PF_FP_ABST
Patent Text Reader

Abstract

A room-type testing method, a testing apparatus (300), a construction apparatus (100), an identification apparatus (200), a computer device, a cleaning robot (400), and a computer-readable storage medium. The method comprises: acquiring image data of a target room; and processing the image data on the basis of a preset room classification model, so as to determine the room type of the target room.
Need to check novelty before this filing date? Find Prior Art

Description

Room type detection method and device, computer equipment, and cleaning robot

[0001] Cross-references

[0002] This application claims priority and benefits of the patent application with patent application number "202310791324.0" filed with the State Intellectual Property Office of China on June 30, 2023 and the patent application with patent application number "202310446595.2" filed with the State Intellectual Property Office of China on April 24, 2023, and the entire text of which is incorporated herein by reference. Technical Field

[0003] The present application relates to the field of intelligent cleaning robots, and in particular to a room type detection method and device, computer equipment, a cleaning robot, and a computer-readable storage medium. Background Art

[0004] With the development of smart homes, people are increasingly turning to cleaning robots for household cleaning tasks, placing higher demands on their adaptability to different apartment types. When cleaning robots complete cleaning tasks in different room types, indiscriminate cleaning strategies lead to low cleaning efficiency, energy waste, and a poor user experience.

[0005] Summary of the Invention

[0006] The present application provides a room type detection method, a detection device, a construction device, an identification device, a computer device, a cleaning robot and a computer-readable storage medium, which can identify the room type.

[0007] The room type detection method of the embodiment of the present application is applied to a cleaning robot, and the method includes:

[0008] Obtain image data of the target room;

[0009] The image data is processed based on a preset room classification model to determine the room type of the target room.

[0010] In some embodiments, the processing of the image data based on a preset room classification model to determine the room type of the target room includes:

[0011] Detecting characteristic objects in the target room based on the image data to obtain a detection result; the detection result includes category information corresponding to each characteristic object in the target room;

[0012] Determine a first weight corresponding to each room type of at least one room type for each category feature in the detection result, and determine a second weight corresponding to each category feature in the detection result;

[0013] The room type of the target room is determined based on the detection result, the first weight, and the second weight.

[0014] In some embodiments, determining the room type of the target room based on the detection result, the first weight and the second weight includes: taking a weighted sum of the number of features of all categories in the detection result based on the first weight and the second weight to obtain a first numerical value corresponding to each room type of the target room; and determining the room type of the target room according to the first numerical value corresponding to each of the at least one room type.

[0015] In some embodiments, determining the first weight of each category of feature objects in the detection result corresponding to each room type in at least one room type includes: determining the first weight based on pre-acquired first weight information; wherein the first weight information includes the statistical probability of each feature object category corresponding to each room type in a first sample data set, the first sample data set includes sample images of multiple room types and first label data, the first label data includes at least room type information and feature object category information corresponding to the sample image; and / or, determining the second weight corresponding to each category of feature objects in the detection result includes: determining the second weight based on pre-acquired second weight information; wherein the second weight information includes the degree of correlation between each of the multiple category features and any type of room in the at least one room type.

[0016] In some embodiments, detecting the feature objects in the target room based on the image data to obtain the detection result includes: processing the image data through a first network to obtain a first processing result, and obtaining the detection result based on the first processing result; wherein, the first network is trained based on a second sample data set, the second sample data set includes sample images of multiple room types and second label data, and the second label data includes at least feature object category information corresponding to the sample image.

[0017] In some embodiments, the method further includes: obtaining location information corresponding to each feature object in the target room; obtaining the detection result based on the first processing result includes: fusing and / or deduplicating the first processing result according to the location information to obtain the detection result.

[0018] In some embodiments, the method further includes: performing image classification processing on the image data to obtain a second processing result; the second processing result includes the classification probability of the target room corresponding to each room type; determining the room type of the target room based on the detection result, the first weight and the second weight includes: determining the room type of the target room based on the second processing result, the detection result, the first weight and the second weight.

[0019] In some embodiments, determining the room type of the target room based on the second processing result, the detection result, the first weight and the second weight includes: taking a weighted sum of the number of features of all categories in the detection result based on the first weight and the second weight to obtain a first value corresponding to each room type of the target room; determining a second value corresponding to each room type of the target room according to the first value and the second processing result; and determining the room type of the target room according to the second value corresponding to each of the at least one room type.

[0020] In some embodiments, the first weight represents the probability that the feature of the corresponding category appears in the corresponding type of room, and the second weight represents the degree of relevance between the feature of the corresponding category and any type of room.

[0021] In a second aspect, an embodiment of the present application provides a room type detection device for use in a cleaning robot, the device comprising an image detection module, a weight acquisition module, and a classification decision module; wherein,

[0022] The image detection module is configured to detect characteristic objects in the target room based on the image data to obtain a detection result; the detection result includes category information corresponding to each characteristic object in the target room;

[0023] The weight acquisition module is configured to determine a first weight corresponding to each room type of at least one room type for each category feature in the detection result, and to determine a second weight corresponding to each category feature in the detection result;

[0024] The classification decision module is used to determine the room type of the target room based on the detection result, the first weight and the second weight.

[0025] In some embodiments, the classification decision module is used to perform a weighted summation on the number of features of all categories in the detection results based on the first weight and the second weight to obtain a first numerical value corresponding to each room type of the target room; and to determine the room type of the target room based on the first numerical value corresponding to each of the at least one room type.

[0026] In some embodiments, the weight acquisition module is used to determine the first weight based on pre-acquired first weight information; wherein, the first weight information includes the statistical probability that each feature object category in the first sample data set corresponds to each room type, and the first sample data set includes sample images of multiple room types and first label data, and the first label data includes at least room type information and feature object category information corresponding to the sample image; and / or, the weight acquisition module is used to determine the second weight based on pre-acquired second weight information; wherein, the second weight information includes the degree of correlation between each of multiple categories of feature objects and any type of room in the at least one room type.

[0027] In some embodiments, the image detection module is used to process the image data through a first network to obtain a first processing result, and obtain the detection result based on the first processing result; wherein, the first network is trained based on a second sample data set, and the second sample data set includes sample images of multiple room types and second label data, and the second label data includes at least feature object category information corresponding to the sample image.

[0028] In some embodiments, the image detection module is further used to obtain position information corresponding to each feature in the target room; and is also used to fuse and / or deduplicate the first processing result based on the position information to obtain the detection result.

[0029] In some embodiments, the classification decision module is further used to perform image classification processing on the image data to obtain a second processing result; the second processing result includes the classification probability of the target room corresponding to each room type; and is also used to determine the room type of the target room based on the second processing result, the detection result, the first weight and the second weight.

[0030] In some embodiments, the classification decision module is used to perform a weighted summation on the number of features of all categories in the detection results based on the first weight and the second weight to obtain a first value of the target room corresponding to each room type; determine a second value of the target room corresponding to each room type based on the first value and the second processing result; and determine the room type of the target room based on the second value corresponding to each of the at least one room type.

[0031] In some embodiments, the first weight represents the probability that the feature of the corresponding category appears in the corresponding type of room, and the second weight represents the degree of relevance between the feature of the corresponding category and any type of room.

[0032] In some embodiments, the room classification model is determined by model training, and the model training method includes:

[0033] Obtain pre-collected raw data of multiple room types of different apartment types;

[0034] Processing the original data according to preset rules to obtain a training sample set, wherein the training sample set includes data samples of multiple room types, and the data samples include original data of multiple room types;

[0035] The training sample set is trained using a preset model to generate the room classification model.

[0036] In some embodiments, processing the raw data according to preset rules to obtain a training sample set includes:

[0037] Performing data cleaning on the raw data according to the preset rules to obtain a data set;

[0038] The data set is divided according to a preset ratio to obtain the training sample set.

[0039] In some embodiments, dividing the data set according to a preset ratio to obtain the training sample set includes:

[0040] Classifying the cleaned data set according to room type, so as to divide data belonging to the same room type into the same sample subset;

[0041] Each sample subset is divided according to a preset ratio to obtain a plurality of training sample subsets, and the plurality of training sample subsets constitute the training sample set.

[0042] In some embodiments, the training sample set is trained using a preset model to generate the room classification model, including:

[0043] Performing data preprocessing on the training sample set;

[0044] The room classification model is generated by training the training sample set after data preprocessing through a preset model.

[0045] In some embodiments, the training sample set is trained using a preset model to generate the room classification model, including:

[0046] The training sample set is trained using a MobileNetv2 network training model to generate the room classification model.

[0047] In some embodiments, the step of training the data pre-processed training sample set using a preset model to generate the room classification model includes:

[0048] The training sample set after data preprocessing is trained using the preset model to obtain the initial model;

[0049] The initial model is subjected to model conversion processing to generate the room classification model that can be deployed and run on the cleaning robot.

[0050] In some embodiments, the method further comprises:

[0051] When the cleaning robot first performs a cleaning task and establishes a spatial map, it obtains image information of the current space;

[0052] determining the room type of the current room according to the pre-established room classification model and the image information;

[0053] The constructed space map is labeled with room types according to the room types.

[0054] In some embodiments, determining the type of the current room according to the pre-established room classification model and the image information includes:

[0055] Calculating the room type probability of the current room according to the pre-established room classification model and current frame image information;

[0056] The room type corresponding to the probability value greater than a preset threshold and having the largest value in the calculation result is determined as the type of the current room.

[0057] In some embodiments, the method further comprises:

[0058] When the calculation results are all smaller than the preset threshold, the current frame image is discarded.

[0059] In this way, calculations can be performed based on the room classification model and the current frame image information, and the current frame image whose calculation results do not meet the standards will be discarded, thereby improving the accuracy of room type judgment.

[0060] In some embodiments, determining the type of the current room according to the pre-established room classification model and the image information includes:

[0061] After the spatial map of the current room is constructed, the type of the current room is determined according to the statistical results of the room types of the current room determined in the process of constructing the map.

[0062] The room type detection device of the embodiment of the present application is applied to a cleaning robot, and the device includes an image detection module, a weight acquisition module and a classification decision module; wherein,

[0063] The image detection module is configured to detect characteristic objects in the target room based on the image data to obtain a detection result; the detection result includes category information corresponding to each characteristic object in the target room;

[0064] The weight acquisition module is configured to determine a first weight corresponding to each room type of at least one room type for each category feature in the detection result, and to determine a second weight corresponding to each category feature in the detection result;

[0065] The classification decision module is used to determine the room type of the target room based on the detection result, the first weight and the second weight.

[0066] The device for constructing the room classification model of the present application includes:

[0067] An acquisition module is used to obtain pre-collected raw data of room types of multiple different apartment types;

[0068] a processing module, configured to process the raw data according to preset rules to obtain a training sample set, wherein the training sample set includes data samples of multiple room types, and the data samples include raw data of multiple room types that can be manually labeled by room type;

[0069] The training module is used to train the training sample set using a preset model to generate the room classification model.

[0070] The room category identification device of this application includes:

[0071] An acquisition module is used to acquire image information of the current space when the cleaning robot performs a cleaning task for the first time and establishes a space map;

[0072] a confirmation module, configured to determine the room type of the current room based on the pre-established room classification model and the image information;

[0073] a labeling module, configured to label the constructed spatial map with room types according to the room types; and detect user behavior in the vehicle cabin;

[0074] The computer device of the present application includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the method in any of the above embodiments is implemented.

[0075] The cleaning robot of the present application includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the method in any of the above embodiments is implemented.

[0076] The computer-readable storage medium of the present application stores a computer program, and when the computer program is executed by one or more processors, the method in any of the above embodiments is implemented.

[0077] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become obvious from the description below, or will be learned through practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] The above and / or additional aspects and advantages of the embodiments of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0079] FIG1 is a flow chart of a room type detection method according to an embodiment of the present application;

[0080] FIG2 is a second flow chart of a room type detection method according to an embodiment of the present application;

[0081] FIG3 is a third flow chart of the room type detection method according to an embodiment of the present application;

[0082] FIG4 is a flowchart illustrating an example of a room type detection method according to an embodiment of the present application applied to a residential scenario;

[0083] FIG5 is a schematic diagram of the processing flow of each logic module in the room type detection method according to an embodiment of the present application;

[0084] FIG6( a ) is a schematic diagram of a processing flow of a data acquisition module according to an embodiment of the present application;

[0085] FIG6( b ) is a schematic diagram of the processing flow of the data preprocessing module according to an embodiment of the present application;

[0086] FIG6( c ) is a schematic diagram of the processing flow of the target detection network model optimization and reasoning module according to an embodiment of the present application;

[0087] FIG6( d ) is a first schematic diagram of the processing flow of the contribution and feature weight acquisition module according to an embodiment of the present application;

[0088] FIG6( e ) is a second schematic diagram of the processing flow of the contribution and feature weight acquisition module according to an embodiment of the present application;

[0089] FIG7 is a second example flow chart of the room type detection method according to an embodiment of the present application applied to a residential scenario;

[0090] FIG8 is a schematic diagram of the structure of a room type detection device according to an embodiment of the present application;

[0091] FIG9 is a schematic structural diagram of a cleaning robot according to an embodiment of the present application;

[0092] FIG10 is a flow chart of the room type detection method of the present application;

[0093] FIG11 is a module diagram of the room type detection method of the present application;

[0094] FIG12 is a flow chart of the room type detection method of the present application;

[0095] FIG13 is a flow chart of the room type detection method of the present application;

[0096] FIG14 is a flow chart of the room type detection method of the present application;

[0097] FIG15 is a schematic diagram of a training sample set for the room classification model of the present application;

[0098] FIG16 is a flow chart of the room type detection method of the present application;

[0099] FIG17 is a flow chart of the room type detection method of the present application;

[0100] FIG18 is a flow chart of the room type detection method of the present application;

[0101] FIG19 is a flow chart of the room type detection method of the present application;

[0102] FIG20 is a module diagram of the room type detection method of the present application;

[0103] FIG21 is a flow chart of the room type detection method of the present application;

[0104] FIG22 is a flow chart of the room type detection method of the present application;

[0105] FIG23 is a flow chart of the room type detection method of the present application. DETAILED DESCRIPTION

[0106] The following further describes the embodiments of the present application in conjunction with the accompanying drawings. The same or similar reference numerals in the accompanying drawings represent the same or similar elements or elements with the same or similar functions.

[0107] In addition, the embodiments of the present application described below in conjunction with the accompanying drawings are exemplary and are only used to explain the embodiments of the present application and should not be understood as limiting the present application.

[0108] Please refer to FIG1 , which is a flow chart of a room type detection method according to an embodiment of the present application. The present application provides a room type detection method applied to a cleaning robot, the method comprising:

[0109] Step 001: Acquire image data of the target room;

[0110] In this embodiment, the target room may be, for example, a room in which a household appliance, cleaning device, or the like (e.g., a robot vacuum, a robot scrubber, a sweeping and mopping robot, etc.) is currently located or a room that is accessible. The image data may be, for example, image data acquired in real time by the household appliance, cleaning device, etc. while exploring a home environment, or image data captured by a camera, such as a home camera, or image data pre-stored by the household appliance, cleaning device, etc., or other storage device. This application does not limit the method for acquiring the image data of the target room.

[0111] Step 002: Based on a preset room classification model, the image data is processed to determine the room type of the target room.

[0112] For the method of determining the room type of the target room, please refer to Figures 2 and 3, Figures 19 and 21 of this application, and their detailed descriptions.

[0113] As an emerging appliance in smart homes, cleaning robots can autonomously clean the home environment. Their intelligence also means they can independently explore the home environment and determine the room classification, thereby developing different cleaning strategies.

[0114] Existing technologies require users to define room types themselves, or enumerate the various furniture display situations in the room based on the recognition results to derive a logical relationship between the furniture in the room and the room type. However, enumerating furniture display situations is cumbersome and complex, making it difficult to cover all situations. Moreover, the implementation in the algorithm is not concise and complex. If additional recognition categories need to be added later, maintenance costs will increase.

[0115] In some embodiments, FIG2 is a second flow chart of a room type detection method according to an embodiment of the present application. As shown in FIG2 , step 002 includes:

[0116] Step 101: Detect characteristic objects in the target room based on the image data to obtain a detection result; the detection result includes category information corresponding to each characteristic object in the target room;

[0117] Step 102: Determine a first weight corresponding to each room type of at least one room type for each category feature in the detection result, and determine a second weight corresponding to each category feature in the detection result;

[0118] Step 103: Determine the room type of the target room based on the detection result, the first weight, and the second weight.

[0119] In some embodiments, the cleaning robot is a device with a cleaning function. For example, the cleaning robot can be a sweeping robot, or an autonomous mobile robot (AMR). For the sake of brevity, this application uses a sweeping robot as an example. The principles of other types of robots are similar and will not be further described here.

[0120] In one embodiment, the feature objects may include furniture, household appliances, etc., for example, a bed, a sofa, a dining table, a refrigerator, a television, a range hood, a washbasin, etc.

[0121] Optionally, detecting features in the target room based on the image data to obtain a detection result may include: processing the image data based on a trained object detection network, and determining the detection result based on the processing result; the object detection network may be used to detect features in the image data. The detection result may also include information on the number of features in each category.

[0122] In step 102, each feature type has multiple first weights, namely, first weights corresponding to each room type. These first weights are used to measure the contribution of a particular feature type to a particular room type. For example, room types may include living rooms, bedrooms, kitchens, bathrooms, and studies. A sofa is often more likely to appear in a living room than in other room types, so the sofa has a higher first weight for the living room, while the first weights for other room types, such as bedrooms, kitchens, bathrooms, and studies, are lower. Each feature type has only one second weight. This second weight is used to measure the significant correlation between a particular feature type and the room type. This second weight can be understood as the feature weight of the feature type. If a particular feature type has a strong correlation with any room type, the feature weight of this feature type is larger. For example, if a bed has a strong correlation with a bedroom, the second weight of the bed is larger than the second weight of features with less correlation to the room, such as a television and a refrigerator. Optionally, the first and second weights can be determined using weight information pre-stored in the cleaning robot.

[0123] In one embodiment, the first weight may represent the probability of a feature of the corresponding category appearing in a room of the corresponding type, and the second weight may represent the degree of relevance of the feature of the corresponding category to any room type. That is, the first weight of each category feature corresponding to each room type represents the probability of the feature of that category appearing in a room of that type, and the second weight of each category feature represents the degree of relevance of the feature of that category to any room type.

[0124] In one embodiment, step 103 may include: determining the weight of the target room corresponding to each room type in the at least one room type based on the detection result, the first weight, and the second weight, and determining the room type of the target room based on the weight. It will be understood that in this embodiment, feature information in the target room is detected and obtained through image data acquired in real time by the cleaning robot while exploring the home environment. Specifically, the feature information may include category information of the feature objects and the number of feature objects in each category. The weight of the target room belonging to each room type is further calculated by combining the first weight and the second weight of each category of feature objects. The room type corresponding to the maximum weight may be determined to be the room type of the target room.

[0125] The room classification detection method provided in the embodiment of the present application has a simple and clear classification logic. There is no need to additionally establish a decision tree between feature objects in the room and the room type. The contribution value of the feature objects with strong characteristics to the determination of the room type is amplified directly based on the probability that the feature objects may appear in each type of room and the degree of correlation between the feature objects and the room. This reduces the misclassification of special furniture and appliance display situations in actual home scenes, avoids the problem of enumerating and calculating special display situations one by one, resulting in a lengthy and complicated algorithm. Moreover, if it is necessary to add furniture and appliance recognition categories and room recognition types in the later stage, it is only necessary to recalculate the first weight and second weight of the newly added furniture and appliance categories, and there is no need to re-establish a decision tree between furniture and appliance items and room types. This also avoids the problem of adding multiple furniture and appliance display situations due to adding one more category of furniture and appliances, which further increases the complexity of the algorithm.

[0126] In an optional embodiment of the present application, determining the room type of the target room based on the detection result, the first weight and the second weight may include: taking a weighted sum of the number of feature objects of all categories in the detection result based on the first weight and the second weight to obtain a first numerical value corresponding to each room type of the target room; and determining the room type of the target room according to the first numerical value corresponding to each of the at least one room type.

[0127] In this embodiment, the first value of the target room for all room types is calculated based on the first weight and the second weight, and the room type corresponding to the largest first value can be taken as the type of the target room. For example, the calculation method of the first value can be: Among them, k represents the number of feature categories that can be detected (or identified) in the target room, count i represents the number of features of type i in the target room, wcontrib,i,j represents the first weight of the features of type i corresponding to the room of type j, and w feature,i Indicates the second weight of the i-th type feature. Thus, the first value of each room type in the at least one room type corresponding to the target room can be obtained, and the room type corresponding to the largest first value can be taken as the type of the target room, that is, The corresponding room type is the room type of the target room, where R c represents the largest first value, and l represents the number of classified room types.

[0128] This embodiment uses image data acquired in real time by the cleaning robot while exploring the home environment to detect or identify characteristic object information of the current room, including the category and number of characteristic objects. The weight of the current room belonging to each room type is calculated by combining the contribution weight of the characteristic objects to each room type with the characteristic weight of the characteristic objects. The room type corresponding to the maximum weight can be determined as the current room type. The classification logic is simple and clear, and the algorithm operation efficiency is high.

[0129] As an optional embodiment, determining the first weight of each category of feature objects in the detection result corresponding to each room type in at least one room type may include: determining the first weight based on pre-obtained first weight information; wherein the first weight information includes the statistical probability of each feature object category corresponding to each room type in a first sample data set, the first sample data set includes sample images of multiple room types and first label data, the first label data includes at least room type information and feature object category information corresponding to the sample images; and / or, determining the second weight corresponding to each category of feature objects in the detection result may include: determining the second weight based on pre-obtained second weight information; wherein the second weight information includes the degree of correlation between each of the multiple categories of feature objects and any type of room in the at least one room type.

[0130] Exemplarily, this embodiment can count the room type information and feature object category information in the first sample data set, and count the number of times each feature object category appears in each type of room, normalize the contribution weight of each feature object category to each room type, and form the first weight information; at the same time, based on common sense logic, the furniture feature weight can be determined by judging the correlation strength between each feature object and the room type to characterize the characteristic strength of the furniture, thereby forming the second weight information.

[0131] Specifically, taking furniture as an example, the number of times all furniture categories appear in each type of room can be counted, such as counting the cumulative number of times a sofa appears in the living room, bedroom, kitchen, dining room, bathroom and other types of rooms in all sample images. Finally, the number of times each furniture category appears in each type of room is normalized to obtain the contribution weight of each furniture category to each room type (i.e., the first weight). For example, the number of times a sofa appears in the room type scenes included in all sample images can be normalized to obtain the contribution weight of the sofa to the living room, bedroom, kitchen, dining room, and bathroom respectively. In addition, it can also be based on common sense logic, that is, furniture and room The strength of the correlation between the types determines the feature weight of the furniture (i.e., the second weight). Specifically, the initial feature weight of each piece of furniture can be set to 1. If a piece of furniture is strongly correlated with the room type, the feature weight of this furniture is increased. For example, a bed can be strongly correlated with a bedroom. If a bed appears in the current room, it can be completely determined that the room type is a bedroom. The feature weight of the bed is increased. It can be set to 10, 5, 2, etc., without any restriction. For another example, a range hood is strongly correlated with a kitchen. If a range hood appears in the current room but no bed, it can be completely determined that the current room is a kitchen. The feature weight of the range hood is increased. It can be set to 10, 5, 2, etc., without any restriction.

[0132] In one embodiment, the first sample data set may also be used to train a target detection network, and the target detection network may be used to process image data of a target room to obtain a detection result.

[0133] The room classification detection method provided in the embodiment of the present application has a simple and clear classification logic. There is no need to additionally establish a decision tree for the feature object categories in the room and the room type. The contribution weight of each feature object to the room type can be directly obtained from the data set. The calculation method is simple. At the same time, common sense logic is used to specify the feature weight of each feature object. Later, when furniture and appliance identification categories and room types are added, it is only necessary to recalculate the contribution weight and feature weight of the newly added furniture and appliance categories. There is no need to re-establish a decision tree for furniture and appliance and room types. This also avoids the problem of adding multiple furniture display situations due to adding one more category of furniture, which further increases the complexity of the algorithm.

[0134] In an optional embodiment of the present application, the room classification model includes a first network, and the detecting of the feature objects in the target room based on the image data to obtain the detection result may include: processing the image data through the first network to obtain a first processing result, and obtaining the detection result based on the first processing result; wherein, the first network is trained based on a second sample data set, and the second sample data set includes sample images of multiple room types and second label data, and the second label data includes at least feature object category information corresponding to the sample image.

[0135] In one embodiment, the first network may also be trained based on the first sample dataset, which includes sample images of various room types and first label data, wherein the first label data includes at least room type information and feature object category information corresponding to the sample images. It will be appreciated that in this embodiment, the second sample dataset may be the same as the first sample dataset, meaning that either the first sample dataset or the second sample dataset may be used to train the first network and obtain the first weight information.

[0136] As an example, the first sample data set or the second sample data set is generated by, for example: using a camera to capture multiple room types including multiple apartment types, so as to include as many characteristic object display methods as possible, cleaning each acquired image, deleting blurred images and images that cannot clearly identify the room type of the current scene, annotating the cleaned images, annotating the room type corresponding to each image, and annotating the corresponding characteristic object information in each type of room scene, and the annotated information and the image together constitute the second sample data (or the first sample data set). It should be noted that the model of the camera can be consistent with the model of the camera installed on the cleaning robot, and the height of the camera can also be consistent with the cleaning robot (or the height of the camera of the cleaning robot) when collecting data, so as to ensure that the sample images in the first sample data set or the second sample data set are consistent with the images obtained when the cleaning robot is actually running.

[0137] In this embodiment, the first network is used to perform target detection on image data. A lightweight target detection network model can be used to reduce the computational overhead and memory usage of the cleaning robot caused by an overly large network model. The first network can be, for example, a trained YOLO-v5, single-shot multi-box target detection (SSD), CenterNet or other target detection networks or their corresponding backbone networks.

[0138] As an optional implementation, the training based on the second sample data set (obtaining the first network) may include: constructing an initial model of the first network, inputting the sample images in the second sample data set into the initial model, and obtaining the prediction results corresponding to the sample images; determining the loss of the prediction results and the second label data based on the loss function, and adjusting the parameters of the initial model based on the loss. The prediction results may include prediction confidence, prediction anchor boxes, and prediction categories, such as predicted furniture categories, pixel coordinates of the four corner points of the anchor box, prediction scores, etc. During the training process, a score threshold can be set to eliminate prediction results with low prediction scores to reduce the impact of misidentification on the final classification results. The threshold can be set to 0.99, 0.98, 0.97, etc. The specific setting can be based on demand and is not limited here.

[0139] For example, the loss function may be loss=L obj +L box +L cls , where L obj Represents the prediction confidence loss, which is the cross entropy loss between the prediction result confidence and the true value, L box Represents the predicted anchor box loss, which is the intersection over union (IOU) loss between the predicted anchor box and the true value, or it can also be called overlap loss, L cls Represents the prediction category loss, which is the cross entropy loss between the predicted category and the true value.

[0140] The embodiment of the present application does not limit the training process of the first network to be performed by the cleaning robot. In actual applications, the trained first network can be deployed in the cleaning robot.

[0141] The room type detection method of the embodiment of the present application collects images of various apartment types and various room types, annotates room type information and feature object category information in the room, constructs a sample data set, and establishes a first network based on the sample data set. After optimizing the training model so that it can pass the test conditions, the trained first network is finally deployed on a cleaning robot. The image data is captured in real time by the camera on the cleaning robot and input into the first network to obtain feature object detection results. The room type to which the current room belongs is further determined by combining the contribution weights of the feature object categories to each type of room calculated based on the sample data set and the feature weights of each feature object.

[0142] In one embodiment, the method may further include: obtaining location information corresponding to each feature object in the target room; obtaining the detection result based on the first processing result may include: fusing and / or deduplicating the first processing result according to the location information to obtain the detection result.

[0143] In this embodiment, obtaining the position information corresponding to each feature in the target room may include determining the position information corresponding to each feature based on a monocular ranging algorithm. In this embodiment, the monocular ranging algorithm may be combined to determine the coordinates of each detection target (i.e., feature) in the machine coordinate system, and based on this, duplicate prediction results for a single detection target in the first processing result are merged and / or deduplicated to avoid duplicate counting of features.

[0144] The present application also provides a room type detection method, which is applied to a cleaning robot. FIG3 is a flow chart of the room type detection method according to the present application embodiment. As shown in FIG3 , the method includes:

[0145] Step 201: Acquire image data of a target room, and detect characteristic objects in the target room based on the image data to obtain a detection result; the detection result includes category information corresponding to each characteristic object in the target room;

[0146] Step 202: Determine a first weight for each category feature in the detection result corresponding to each room type in at least one room type, and determine a second weight for each category feature in the detection result;

[0147] Step 203: Perform image classification processing on the image data to obtain a second processing result; the second processing result includes the classification probability of the target room corresponding to each room type;

[0148] Step 204: Determine the room type of the target room based on the second processing result, the detection result, the first weight, and the second weight.

[0149] In the embodiment of the present application, the detailed description of steps 201 to 202 can refer to the specific description of steps 101 to 102 in the aforementioned embodiment, and will not be repeated here to save space.

[0150] In one embodiment, the first weight represents the probability that the feature of the corresponding category appears in the corresponding type of room, and the second weight represents the degree of correlation between the feature of the corresponding category and any type of room.

[0151] Optionally, the room classification model further includes a second network. The image classification processing of the image data may include: processing the image data via a second network, wherein the second network is configured to classify the image. The second network may be trained based on the first sample data (or second sample data) in the aforementioned embodiment. This embodiment, combined with image classification, further optimizes the results. Image classification can be used to obtain a base probability of the target room corresponding to each room type, which can be normalized to obtain the second processing result.

[0152] As an optional implementation, step 204 may include: performing weighted summation on the number of features of all categories in the detection results based on the first weight and the second weight to obtain a first value corresponding to each room type of the target room; determining a second value corresponding to each room type of the target room based on the first value and the second processing result; and determining the room type of the target room based on the second value corresponding to each of the at least one room type.

[0153] The calculation method of the first value can refer to the above embodiment. In this embodiment, the second processing result obtained by image classification can be multiplied by the first value obtained by considering the contribution of furniture features in the above embodiment to obtain the final optimized second value corresponding to each room type. The type corresponding to the largest second value is taken as the optimized room type. For example, the calculation method of the second value can be: Among them, R classify,j represents the classification probability corresponding to the jth room in the second processing result, k represents the number of feature categories that can be detected (or identified) in the target room, count i represents the number of features of type i in the target room, wcontrib,i,j represents the first weight of the features of type i corresponding to the room of type j, and w feature,i Indicates the second weight of the i-th type feature. Thus, the second value of the target room corresponding to each room type in at least one room type can be obtained, and the room type corresponding to the largest second value can be taken as the type of the target room, that is, The corresponding room type is the room type of the target room, where R o It represents the second largest value, and l represents the number of room types classified.

[0154] The room type detection method of the embodiment of the present application combines the calculation results obtained based on the contribution weight of each feature object corresponding to each room type and the feature weight of each feature object with the room classification results of image classification, which can further optimize the classification results.

[0155] The room type detection solution of the embodiment of the present application is described in detail below with reference to specific application examples.

[0156] Figure 4 is an example flow chart 1 of the room type detection method of an embodiment of the present application applied to a residential scenario. In this example, furniture is used as a feature object, and the specific process includes: first, room images are collected, and the room type and furniture category of each image are labeled to obtain a room information image sample set (i.e., the aforementioned first sample data set); on the one hand, by statistically annotating the data, the feature weight (i.e., the first weight information) and contribution weight (i.e., the second weight information) of the furniture category can be obtained and deployed or stored in the cleaning robot; on the other hand, the furniture detection neural network model can be trained and tested based on the room information image sample set, and the (trained) tested furniture detection neural network model can be deployed in the cleaning robot; the cleaning robot can obtain image data of the current room in real time during the process of exploring the home environment, and the obtained image data can be processed by the furniture detection neural network model to obtain furniture recognition results in the current room. Combined with the feature weight and contribution weight of each furniture in the current room, the room type weight corresponding to the current room can be determined, and the current room type is determined based on the weight.

[0157] The application example process shown in Figure 4 can be logically divided into five core modules: a data acquisition module, a data preprocessing module, a target detection network model optimization and reasoning module, a contribution and feature weight acquisition module, and a room classification decision module. Figure 5 is a schematic diagram of the processing flow of each logic module in the room type detection method of an embodiment of the present application. In conjunction with Figure 4, the data acquisition module is used to collect room images, and the data preprocessing module is used to preprocess the collected room images to obtain a set of room information image samples; the target detection network model optimization and reasoning module is used to train and test the target detection network model. The tested target detection network model can be deployed in a cleaning robot to process the image data obtained in real time by the cleaning robot to obtain furniture recognition results; the contribution and feature weight acquisition module is used to determine the contribution weight of each piece of furniture to the room type and the feature weight of each piece of furniture; the room classification decision module is used to determine the room type based on the furniture recognition results, the contribution weight of each piece of furniture, and the feature weight. It should be noted that the above logic modules are not limited to being deployed in the same device.

[0158] The following is a detailed description of each logic module in conjunction with Figures 65(a) to 65(e).

[0159] Figure 65(a) illustrates the processing flow of the data acquisition module in an embodiment of the present application. As shown in Figure 65(a), the data acquisition module can be implemented using a camera and a custom height-raising stand. The camera model can be consistent with the camera model installed on the cleaning robot, and the camera height can be aligned with the height of the cleaning robot during data acquisition to ensure that the training images are consistent with the images captured during actual operation of the cleaning robot. This data acquisition module collects images of various apartment types and room types, including various furniture display arrangements, to ensure the diversity of the target detection network database and the reliability of the contribution weights of each furniture category.

[0160] Figure 65(b) illustrates the processing flow of the data preprocessing module in an embodiment of the present application. As shown in Figure 65(b), the data preprocessing module cleans the initial images of the room and furniture acquired by the data acquisition module, deleting blurred images and images where the current room type is unclear. The cleaned images are then annotated, with each image labeled with the room type and the corresponding furniture information within the room scene. The annotated information and images constitute a sample set of room information images. Specifically, different furniture can be annotated for different room types based on the different furnishings. For example, the labeled furniture for a bedroom could be beds, nightstands, wardrobes, etc.; the labeled furniture for a living room could be sofas, coffee tables, televisions, etc.; the labeled furniture for a kitchen could be cabinets, range hoods, etc.; the labeled furniture for a dining room could be dining tables, refrigerators, etc.; and the labeled furniture for a bathroom could be toilets, sinks, etc. Furthermore, depending on the furniture placement, the labeled furniture for each room type may overlap. For example, a television can appear in both the living room and bedroom, and a refrigerator can appear in the dining room, kitchen, and living room. Furthermore, as room types are added, new furniture categories can be added, without limitation.

[0161] Figure 65(c) is a schematic diagram of the processing flow of the target detection network model optimization and reasoning module of an embodiment of the present application. As shown in Figure 65(c), the target detection network model optimization and reasoning module uses the furniture annotation information and image data in the room information image sample set to train a preset furniture target detection neural network. For the preset furniture target detection neural network, you can choose YOLOv5, SSD, CenterNet or other networks or their backbone networks, without limitation. The return prediction information of the preset furniture target detection neural network can be the category of the detected furniture, the pixel coordinates of the four corner points of the anchor box, the prediction score, etc. By calculating the loss between the return prediction information and the true value of the preset target detection network, the network is optimized through reverse iteration, and the network performance is evaluated using the target detection neural network evaluation indicator mAP. The network performance is optimized by adjusting the network hyperparameters, network optimizer, loss function, etc., and finally the optimal network model (i.e., the first network) is obtained. In practical applications, it can also be combined with a monocular ranging algorithm to return the coordinates of each detected target in the machine coordinate system, and based on this, the repeated prediction results of a single target furniture are fused to avoid repeated counting. Finally, by setting the score threshold, the prediction results with low prediction scores are eliminated to reduce the impact of misidentification on the final classification results. The threshold can be set to 0.99, 0.98, 0.97, etc., and can be set according to needs. There is no restriction here.

[0162] The contribution and feature weight acquisition module uses the furniture annotation information and room type information in the room information image sample set to calculate the room type contribution weight of each furniture category and determine the feature weight of each furniture category through common sense logic. Figure 65(d) is a schematic diagram of the processing flow of the contribution and feature weight acquisition module of an embodiment of the present application. As shown in Figure 65(d), the number of times all furniture categories appear in each room type is counted. For example, the cumulative number of times a sofa appears in the living room, bedroom, kitchen, dining room, and bathroom scenes in all images is counted. Finally, the number of times each furniture category appears in each room type scene is normalized to obtain the contribution weight of each furniture category to each room type. For example, by normalizing the number of times a sofa appears in the room type scene in all images, the contribution weight of the sofa to the living room, bedroom, kitchen, dining room, and bathroom can be obtained. Figure 65(e) is a second schematic diagram of the processing flow of the contribution and feature weight acquisition module of the embodiment of the present application. As shown in Figure 65(e), the contribution and feature weight acquisition module also determines the feature weight of the furniture based on common sense logic, that is, the strength of the correlation between the furniture and the room type. Specifically, the initial feature weight of each piece of furniture can be set to 1. If the existence of a piece of furniture is strongly correlated with the room type, the feature weight of this furniture is increased. For example, a bed can be strongly correlated with a bedroom. The presence of a bed in the current room can completely determine that the room type is a bedroom. The feature weight of the bed is increased and can be set to 10, 5, 2, etc., without any restriction here. For another example, a range hood is strongly correlated with a kitchen. If a range hood appears in the current room but no bed appears, it can be completely determined that the current room is a kitchen. The feature weight of the range hood is increased and can be set to 10, 5, 2, etc., without any restriction here. It should be noted that this embodiment is applied to smart homes. The feature weight of any furniture that is strongly related to the room, except for the bed, can be set to be smaller than the feature weight of the bed, because the fundamental function of a house is to be used for users to rest and adjust, that is, a bedroom. For example, a common one-bedroom apartment, even if it has furniture and functions related to a kitchen and a study, is more logical and reasonable to classify it as a bedroom. However, if the room type detection method in this embodiment is used for room classification in other scenarios, such as room classification in office scenarios, the feature weights of various types of furniture are not restricted here.

[0163] The room classification decision module inputs the optimal target detection model through the image data obtained in real time by the cleaning robot when exploring the home environment, obtains the furniture information of the current room, including the category and number of furniture, and combines the contribution weight of the furniture with the feature weight to calculate the weight (i.e., the first value) of each room type of the current room. The room type corresponding to the maximum weight is the current room type. The specific implementation can refer to the above embodiment and will not be repeated here.

[0164] FIG7 is a second example flow chart of the room type detection method of an embodiment of the present application applied to a residential scenario. As shown in FIG7 , this example is combined with an image classification algorithm based on the previous example. The basic probability of the current room belonging to each room type can be obtained by the image classification algorithm. By normalizing the basic probability, the basic weight of the current room corresponding to each room type (i.e., the second processing result) is obtained. By multiplying the weight of each room type (i.e., the first value) obtained by the room classification decision module, that is, multiplying the contribution value of each furniture feature with the basic weight, the weight of each room type is magnified or reduced by the furniture information. For example, if a bed appears in a bedroom, the corresponding basic weight of the bedroom will be magnified, while the basic weights of the toilet, kitchen, etc. will be reduced. By taking the maximum value of the multiplied scaled weights (i.e., the second value), the optimized category of the current room is obtained. The specific implementation method can refer to the aforementioned embodiment or the aforementioned application example, which will not be repeated here.

[0165] The present application also provides a room type detection device, which is used in a cleaning robot. FIG8 is a schematic diagram of the composition structure of the room type detection device of the present application embodiment. As shown in FIG8 , the room type detection device 300 includes an image detection module 301, a weight acquisition module 302, and a classification decision module 303.

[0166] The image detection module 301 is configured to acquire image data of a target room, detect characteristic objects in the target room based on the image data, and obtain a detection result; the detection result includes category information corresponding to each characteristic object in the target room;

[0167] The weight acquisition module 302 is configured to determine a first weight for each category feature in the detection result corresponding to each room type in at least one room type, and to determine a second weight for each category feature in the detection result;

[0168] The classification decision module 303 is configured to determine the room type of the target room based on the detection result, the first weight, and the second weight.

[0169] In an optional embodiment of the present application, the classification decision module 303 is used to perform a weighted summation on the number of feature objects of all categories in the detection results based on the first weight and the second weight to obtain a first numerical value corresponding to each room type of the target room; and determine the room type of the target room according to the first numerical value corresponding to each of the at least one room type.

[0170] In an optional embodiment of the present application, the weight acquisition module 302 is used to determine the first weight based on pre-acquired first weight information; wherein, the first weight information includes the statistical probability of each feature object category corresponding to each room type in the first sample data set, and the first sample data set includes sample images of multiple room types and first label data, and the first label data at least includes room type information and feature object category information corresponding to the sample image; and / or, the weight acquisition module 302 is used to determine the second weight based on pre-acquired second weight information; wherein, the second weight information includes the degree of correlation between each of multiple categories of feature objects and any type of room in the at least one room type.

[0171] In an optional embodiment of the present application, the image detection module 301 is used to process the image data through a first network to obtain a first processing result, and obtain the detection result based on the first processing result; wherein, the first network is trained based on a second sample data set, and the second sample data set includes sample images of multiple room types and second label data, and the second label data includes at least feature object category information corresponding to the sample image.

[0172] In an optional embodiment of the present application, the image detection module 301 is further used to obtain the position information corresponding to each feature object in the target room; and is also used to fuse and / or deduplicate the first processing results based on the position information to obtain the detection results.

[0173] In an optional embodiment of the present application, the classification decision module 303 is further used to perform image classification processing on the image data to obtain a second processing result; the second processing result includes the classification probability of the target room corresponding to each room type; and is also used to determine the room type of the target room based on the second processing result, the detection result, the first weight and the second weight.

[0174] In an optional embodiment of the present application, the classification decision module 303 is used to perform a weighted summation on the number of feature objects of all categories in the detection result based on the first weight and the second weight to obtain a first value of the target room corresponding to each room type; determine a second value of the target room corresponding to each room type based on the first value and the second processing result; and determine the room type of the target room based on the second value corresponding to each of the at least one room type.

[0175] In an optional embodiment of the present application, the first weight represents the probability that the feature of the corresponding category appears in the room of the corresponding type, and the second weight represents the degree of correlation between the feature of the corresponding category and any type of room.

[0176] In an embodiment of the present application, the image detection module 301, the weight acquisition module 302 and the classification decision module 303 in the room type detection device 300 can all be implemented by a central processing unit (CPU), a digital signal processor (DSP), a microcontroller unit (MCU) or a field-programmable gate array (FPGA) in a cleaning robot in actual applications.

[0177] It should be noted that the room type detection device provided in the above embodiment only uses the division of the aforementioned program modules as an example to illustrate room type detection. In actual applications, the aforementioned processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the aforementioned processing. In addition, the room type detection device provided in the above embodiment and the room type detection method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0178] FIG9 is a schematic diagram of the structure of a cleaning robot according to an embodiment of the present application. As shown in FIG9 , the cleaning robot 400 includes at least one processor 401 and a memory 402. The various components in the cleaning robot 400 are coupled together via a bus system 403. It is understood that the bus system 403 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 403 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the various buses are all labeled as the bus system 403 in FIG9 .

[0179] It is understood that memory 402 can be volatile memory or non-volatile memory, or can include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disk, or compact disc read-only memory (CD-ROM); magnetic surface memory can be magnetic disk memory or tape memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memory 402 described in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.

[0180] The memory 402 in the embodiment of the present application is used to store various types of data to support the operation of the cleaning robot 400. Examples of such data include: any computer program for operating on the cleaning robot 400, such as a program for implementing the method of the embodiment of the present application.

[0181] The methods disclosed in the above embodiments of the present application can be applied to processor 401 or implemented by processor 401. Processor 401 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by an integrated logic circuit of hardware in processor 401 or by instructions in the form of software. The above processor 401 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 401 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in memory 402. Processor 401 reads the information in memory 402 and completes the steps of the above method in combination with its hardware.

[0182] In an exemplary embodiment, the cleaning robot 400 can be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.

[0183] Artificial intelligence technology has driven the development of the smart home sector. More and more families are choosing to use cleaning robots, which has placed higher demands on the adaptability of cleaning robots to different apartment types. Currently, most cleaning robots use lidar or visual sensors to build a full-house map. Once the full-house map is established, the room area can be divided to achieve full-house cleaning and zoned cleaning functions. In related technologies, the room classification method of cleaning robots is mainly based on the detection or segmentation algorithm of specific target objects in different rooms. This places high demands on the computing power of the cleaning robots, which is actually difficult to meet. In addition, the accuracy of the cleaning robot's room classification is also affected by the user's habit of placing items.

[0184] Based on the above-mentioned problems that may be encountered, please refer to FIG10 . The room classification model of the present application is determined by model training. The model training method includes:

[0185] 01: Obtain pre-collected raw data of room types of multiple different apartment types;

[0186] 02: Process the original data according to the preset rules to obtain the training sample set;

[0187] 03: Train the training sample set using the preset model to generate a room classification model.

[0188] Please refer to Figure 11. The present application also provides a device 100 for constructing a room classification model. The room type detection method of the present application can be implemented by the device 100 for constructing a room classification model of the present application. Specifically, the device 100 for constructing a room classification model includes an acquisition module 101, a processing module 102, and a training module 103. Among them, the acquisition module 101 is used to obtain the original data of room types of multiple different types of apartments that have been collected in advance. The processing module 102 is used to process the original data according to preset rules to obtain a training sample set, and the training sample set includes data samples of multiple room types, and the data samples include original data of multiple room types that can be manually labeled based on room types. The training module 103 is used to train the training sample set through a preset model to generate a room classification model.

[0189] The present application also provides a computer device, which includes a memory and a processor. The room type detection method of the present application can be implemented by the computer device of the present application.

[0190] Specifically, a computer program is stored in the memory, and the processor is used to obtain pre-collected raw data of room types of multiple different apartment types, and process the raw data according to preset rules to obtain a training sample set, and train the training sample set through a preset model to generate a room classification model.

[0191] Specifically, the room type detection method proposed in this application, as shown in Figure 12, first requires collecting raw data on the room types of multiple different apartment types. Sources for the collected data include images captured by a cleaning robot specifically used for training, or two-dimensional images uploaded by other cleaning robots via a computer connected to the internet, among other sources, without limitation. Raw data refers to image data obtained through various channels that has not been manually annotated. In other words, raw data serves as the data foundation for subsequent manual annotation. Manual annotation can then be performed based on the raw image data, labeling the manually distinguishable image data with the corresponding room type. To facilitate image acquisition, a camera can be installed on the cleaning robot at a certain height above the ground, for example, approximately 6 cm, to ensure the robot's visual range and maximize the collection of valid data. The collected raw data can be RGB images of two-dimensional rooms. The apartment types collected can include one-bedroom, two-bedroom, three-bedroom, and higher-level apartments. The collected raw data set may include, for example, at least 100 two-dimensional images of different room types. As can be seen, the more raw image data, the more accurate the subsequent model training results.

[0192] After obtaining pre-collected raw data for different room types, to ensure the accuracy of the room classification results, the acquired data must be processed according to preset rules to generate a training sample set. For example, when classifying raw data by room type, residential room types can be broadly categorized into multiple types, such as living rooms, bedrooms, dining rooms, kitchens, bathrooms, and balconies. Furthermore, the classification of room types may differ in certain functional spaces, such as commercial spaces, offices, hospitals, and schools. The training sample set may include raw data for these multiple room types. Pre-set rules may also include discarding image data that does not meet any room classification criteria. For example, if a cleaning robot captures an outdoor scene or an image that does not contain any furniture, the image is discarded and excluded from subsequent model training. The raw data processed according to the preset rules constitutes data samples for multiple room types, which are then used to construct a training sample set for training the room classification model. This training set is divided from data that can be manually labeled with room types within the total raw data, and this data is further processed to generate the training sample set. In other words, the training sample set includes sample data for multiple room types, and the sample data includes raw data for multiple room types.

[0193] Finally, the training sample set must be trained using a preset model. The preset model can be selected from various deep learning models based on the Pytorch deep learning framework. By performing transfer learning on the model and continuously pre-training model parameters such as weights, the model is equipped with the ability to recognize commonalities in images, thereby generating a room classification model. The room classification model identifies the commonalities of some images in the training sample set and has autonomous learning capabilities, capable of classifying images with certain commonalities as images of the same type of room. In other words, the room classification model in the embodiments of this application has a certain degree of reasoning ability. Based on the data in the training sample set, it can summarize and deduce images of different types of rooms, autonomously identifying and learning the characteristics of different room types. Consequently, when performing actual room type recognition, even if the acquired image does not contain certain specific target objects, the room type can still be identified. For example, an image may not contain a bed, but other feature information in the image can be used to classify the image as a bedroom. The establishment of the room classification model enables the cleaning robot to determine the room type when entering a room it has never entered before to perform a cleaning task, adopt an appropriate cleaning strategy, improve cleaning efficiency, and facilitate user customization of personalized cleaning strategies.

[0194] It should be noted that in the embodiments of the present application, room labeling is no longer performed only on frames containing specific target objects. Instead, all frames whose room types can be manually identified are labeled. For example, in the related art, a frame is labeled as a bedroom only if it contains a target object such as a bed or wardrobe. However, in reality, due to factors such as different user placement habits, apartment layout, or the shooting angle of the cleaning robot, the target object may not be present in the captured image. In this case, the related art approach will not be able to quickly identify the room type. It may be necessary to identify the room type based on the second or third frames acquired later. It may even be impossible to identify the room type at all. In other words, in the related art, when subsequently classifying a room, a room type can only be confirmed if the target object is recognized in the spatial environment. In other words, the room type identification in the related art is based on a specific target object, and recognition will fail if the target object is not present in the image.

[0195] Optionally, the room classification model in this embodiment can be the aforementioned first network or second network. The process of constructing the room classification model is the same as the process of constructing the first network or the second network, which will not be described in detail here.

[0196] In the embodiment of the present application, for all the raw data acquired, during the manual labeling process, all frames of images whose room types can be manually identified are labeled, without being limited to labeling images that include target objects. For example, for a frame of image acquired of the current room, which contains features such as a bedside table and a dressing table that can be identified as a bedroom based on common sense, although the frame does not include target objects such as a bed and a wardrobe, it can still be confirmed or confirmed with a high probability that the room type is a bedroom. On this basis, further induction and deduction are performed based on the features in the images labeled as the same room type. In this way, in actual application, it is not necessary to be limited to specific target objects in the room to identify the room type, thereby maximizing the efficiency of room type recognition.

[0197] In summary, in this application, the original data of room types of different apartment types can be obtained, and the original data can be processed according to certain rules to obtain a training sample set. The data samples in the training sample set include a variety of room type original data that can be manually labeled based on room types. Finally, by training the training sample set, a room classification model is generated to distinguish the current room type. The room type detection method of the present application can be trained based on the original data captured by the cleaning robot camera to obtain a room classification model, so that the cleaning robot can quickly distinguish the current room type based on more possible features in the environment, and formulate appropriate cleaning strategies according to the room type, which is conducive to improving the cleaning efficiency of cleaning robots (such as sweepers) and improving user experience.

[0198] In some embodiments, referring to FIG. 13 , step 02 includes:

[0199] 021: Perform data cleaning on the original data according to the preset rules to obtain the data set;

[0200] 022: Divide the data set according to the preset ratio to obtain the training sample set.

[0201] In some embodiments, the processing module 102 is configured to perform data cleaning on the original data according to preset rules to obtain a data set, and to divide the data set according to a preset ratio to obtain a training sample set.

[0202] In certain embodiments, the processor is configured to perform data cleaning on the raw data according to preset rules to obtain a data set, and to divide the data set according to a preset ratio to obtain a training sample set.

[0203] Specifically, data cleaning is performed on the raw RGB image data of the room captured by the cleaning robot's camera to generate a dataset differentiated by room type. The data cleaning process can detect and correct identifiable errors in the data file, including checking data consistency and handling invalid and missing values.

[0204] In some examples, residential room classification methods can be roughly divided into six categories: living room, bedroom, dining room, kitchen, bathroom, and balcony. The room classification method can be selected based on the actual function of the room type. For example, when a cleaning robot is in a multi-story building such as a commercial venue, the room type needs to be differentiated between areas such as elevators and escalators to prevent the cleaning robot from falling due to improper routing, which could pose a safety hazard.

[0205] To highlight the characteristics of these room types, pre-set rules are implemented during the data cleaning process. In some examples, the room type classification method for residential residences is as follows: Each room type may include a predetermined number of relatively specific room type features. For example, a living room must simultaneously capture at least two objects, such as a sofa, coffee table, TV, TV stand, carpet, floor lamp, and recliner. A bedroom must simultaneously capture at least two objects, such as a bed, nightstand, full wardrobe, footstool, and table lamp. A dining room can capture the dining table and chairs, chandelier, candlestick, and vase. A kitchen can capture closets, range hoods, kitchen utensils, and appliances. A bathroom must capture the toilet, shower, and sink. A balcony must capture exterior views, railings, potted plants, and a laundry table. Furthermore, image data of captured partial scenes that cannot be manually annotated is filtered out as invalid values. It should be noted that the above examples are illustrative only, and the number of feature objects in the pre-set rules can be adjusted based on actual needs. Feature objects are not limited to the types disclosed in the above examples. As long as the room type can be accurately identified manually based on the feature objects, it falls into this category. It should be noted again that in the embodiments of the present application, in the process of identifying the room type based on the room classification model, it is not limited to the features included in the image marked as a certain room type in the manual annotation process. Instead, based on these features, the image marked as a certain room type can be further learned, and the room type can be identified based on features that are not present in the annotation process. That is, in the annotation process, although the room type is manually labeled based on certain features in the image, the machine can learn other features in the image labeled as the room type.

[0206] The dataset obtained after data cleaning is divided according to a preset ratio. If the dataset is small, for example, a dataset of 10,000 to tens of thousands of data points, the dataset can be divided into a training set and a validation set in a ratio of 8:2. If the dataset is large, for example, a dataset of millions of data points, a sufficient amount of data can be reserved as a validation set, such as 10,000 data points. The ratio of the training set to the validation set can be arbitrarily selected within a range that does not affect the generalization of the model and is not limited here.

[0207] In this way, the data set obtained by cleaning the original data according to certain rules can be divided into a certain proportion to obtain training samples for subsequent model training.

[0208] In some embodiments, referring to FIG. 14 , step 022 includes:

[0209] 0221: Classify the cleaned dataset according to room type to divide data belonging to the same room type into the same sample subset;

[0210] 0222: Divide each sample subset according to a preset ratio to obtain multiple training sample subsets, and the multiple training sample subsets constitute a training sample set.

[0211] In some embodiments, the processing module 102 is used to classify the cleaned data set according to room type to divide data belonging to the same room type into the same sample subset, and divide each sample subset according to a preset ratio to obtain multiple training sample subsets, and multiple training sample subsets constitute a training sample set.

[0212] In some embodiments, the processor is used to classify the cleaned data set according to room type to divide data belonging to the same room type into the same sample subset, and divide each sample subset according to a preset ratio to obtain multiple training sample subsets, and multiple training sample subsets constitute a training sample set.

[0213] Specifically, after data cleaning, the resulting dataset is classified by room type, with data belonging to the same room type grouped into the same sample subset. This means that images belonging to the same room category after data cleaning are placed in the same directory. The folder name of the directory represents the true category of all images within that folder.

[0214] After classifying the dataset, each sample subset is divided according to a preset ratio. To enhance the generalization of the room type model, the training and validation sets should be divided according to the room type. That is, the data of all room types in the same apartment type should be classified as the training set or validation set at the same time. The data of different room types in the same apartment type cannot be classified into the training set and validation set separately. For example, if the data of the "balcony" of "room type A" is included in the training set, then the data of all room types of "room type A", such as "bedroom" and "dining room", should also be included in the training set.

[0215] In addition, the selection of the preset ratio does not change according to the room type corresponding to the sample subset. For example, when the ratio of the training set to the validation set of the "balcony" type data is 8:2, the ratio of the training set to the validation set corresponding to the data of all room types such as "bedroom" and "dining room" should also be 8:2.

[0216] In particular, in the dataset, the ratio of the training set to the validation set can be arbitrarily selected within the range that does not affect the generalization of the model and is not limited here.

[0217] Finally, the training sample set is composed of multiple training sample subsets divided into training sets and validation sets according to a certain ratio, as shown in Figure 15, which is a possible training sample.

[0218] In this way, the cleaned data set can be classified according to room type, and the data belonging to the same room type can be divided according to a preset ratio to obtain a training sample set consisting of multiple sample subsets, which can be used as training data to generate a room classification model.

[0219] In some embodiments, referring to FIG. 16 , step 03 includes:

[0220] 031: Perform data preprocessing on the training sample set;

[0221] 032: Use the preset model to train the training sample set after data preprocessing to generate a room classification model.

[0222] In some embodiments, the training module 103 is configured to perform data preprocessing on the training sample set, and train the preprocessed training sample set using a preset model to generate a room classification model.

[0223] In some embodiments, the processor is configured to perform data preprocessing on the training sample set, and train the preprocessed training sample set using a preset model to generate a room classification model.

[0224] Specifically, to adapt the image data to the training model and achieve optimal training results, the training sample set requires data preprocessing. First, the training set images are uniformly scaled to 256×256×3 dimensions, meaning that the image's height and width are both 256 pixels, and each pixel contains three colors, indicating that the image is an RGB image. Simultaneously, the validation set images are also uniformly scaled to 256×256×3 dimensions.

[0225] Furthermore, the training set images and test set images need to undergo image enhancement and normalization operations to mitigate the loss of image features caused by image scaling.

[0226] After the data preprocessing of the training sample set, the processed training samples are trained through the preset model. In some examples, the Pytorch deep learning framework can be used to load the training weights of deep learning models in other fields through transfer learning, and use them as pre-training weights for image recognition in this solution, so that the preset model has the ability to recognize the common features of images in the training sample set. The optimizer of the above deep learning model can be Adam, and the learning rate decay coefficient is set to 0.5. The number of data passed to the model for training each time (batch_size) is 64, and the number of iterations (epoch) is 200. Each iteration represents a traversal of the training set, and it ends after 200 traversals. Among them, the parameters of the model are updated once an iteration is performed. Parameters such as model optimizer, learning rate decay coefficient, and number of iterations can be changed according to the specific training sample set.

[0227] After data preprocessing, the training sample set is trained using a pre-set model to generate a room classification model. The pre-set model is then converted on the computer and ultimately converted into a storage format that can be deployed on the cleaning robot.

[0228] In addition, in order to further improve the accuracy of the room classification model in the room classification process, it is necessary to further verify the accuracy of the model on the cleaning robot and make appropriate optimizations.

[0229] In this way, the preprocessed training sample set can be trained through the preset model to generate a room classification model so that the cleaning robot has the ability to identify the room type when working.

[0230] In some embodiments, referring to FIG. 17 , step 03 includes:

[0231] 033: Train the training sample set through the MobileNetv2 network training model to generate a room classification model.

[0232] In some embodiments, the training device 100 is used to train the training sample set using the MobileNetv2 network training model to generate a room classification model.

[0233] In some embodiments, the processor is configured to train the training sample set using a MobileNetv2 network training model to generate a room classification model.

[0234] Specifically, model training relies on server computing power. In some examples, a training sample set can be batch-loaded into the MobileNetv2 network training model, forward propagation is performed, and the network loss during forward propagation is calculated. Backward propagation and gradient calculation are then performed using the loss function to update all neuron weights, resulting in a trained room classification model.

[0235] In this way, the training sample set can be trained through the MobileNetv2 network training model to generate a room classification model so that the cleaning robot has the ability to identify the room type when working.

[0236] In some embodiments, referring to FIG. 18 , step 032 includes:

[0237] 0321: Train the training sample set after data preprocessing through the preset model to obtain the initial model;

[0238] 0322: Perform model conversion on the initial model to generate a room classification model that can be deployed and run on a cleaning robot.

[0239] In some embodiments, the training module 103 is used to train the training sample set after data preprocessing through a preset model to obtain an initial model, and perform model conversion processing on the initial model to generate a room classification model that can be deployed and run on a cleaning robot.

[0240] In some embodiments, the processor is used to train the training sample set after data preprocessing using a preset model to obtain an initial model, and perform model conversion processing on the initial model to generate a room classification model that can be deployed and run on a cleaning robot.

[0241] Specifically, the training samples after data preprocessing can be trained using a preset model to obtain an initial model. The initial model is used to store the trained model so that different deep learning frameworks (such as Pytorch) can use the same format to store model data. It is an intermediate expression format for the migration model process. The initial model is converted to generate a room classification model that can directly run the cleaning robot.

[0242] In certain embodiments of the present application, the specific steps for converting and deploying the preset model are as follows: Step 1, convert the Pytorch model into an ONNX model on a computer that has configured the ONNX and onnxruntime environments. ONNX is an open file format designed for machine learning and is used to store trained Pytorch models. The room classification prediction results of the ONNX model should be consistent with Pytorch. Step 2, convert the ONNX model into an RKNN model that can perform reasoning on the cleaning robot, that is, generate a room classification model. The establishment of the room classification model enables the cleaning robot to determine the room type and adopt appropriate cleaning strategies to improve cleaning efficiency when entering a room it has never entered to perform a cleaning task.

[0243] Furthermore, the room classification model proposed in this application uses int8 quantization for deployment, which offers the advantages of small data size and fast computation, making it suitable for end-to-end computing. This application evaluated the total runtime and total memory usage of the quantized model. In one example, the estimated total runtime was 17ms and the total memory usage was 4.44MB, meeting the computational requirements for a cleaning robot.

[0244] In this way, the preset model can be stored to obtain the initial model, and a room classification model that can be run in the cleaning robot is generated based on the initial model to distinguish the current room type and formulate a suitable cleaning strategy.

[0245] Please refer to FIG19 , the room type detection method of the present application includes:

[0246] 04: When the cleaning robot first performs a cleaning task and establishes a spatial map, it obtains image information of the current space;

[0247] 05: Determine the room type of the current room based on the pre-established room classification model and image information;

[0248] 06: Label the constructed space map with room types according to the room types.

[0249] Please refer to Figure 20. The present application also provides a room category identification device 200. The room category identification device of the present application can be implemented by the room category identification device 200 of the present application. Specifically, the room category identification device 200 includes an acquisition module 201, a confirmation module 202 and a labeling module 203. Among them, the acquisition module 201 is used to obtain image information of the current space when the cleaning robot performs a cleaning task for the first time to establish a space map. The confirmation module 202 is used to determine the room type of the current room based on a pre-established room classification model and image information. The labeling module 203 is used to label the constructed space map with room type according to the room type.

[0250] The cleaning robot of the present application includes a memory and a processor. The room type detection method of the present application can be implemented by the cleaning robot of the present application. Specifically, the memory stores a computer program, and the processor is used to obtain image information of the current space during the process of the cleaning robot performing a cleaning task for the first time to establish a space map, and to determine the room type of the current room based on a pre-established room classification model and image information, and to label the constructed space map with the room type according to the room type.

[0251] Specifically, when a cleaning robot performs its first cleaning task, it needs to create a spatial map to obtain image information of the current space. After the cleaning robot departs from the base station, it begins the mapping task, keeping its onboard camera powered on to capture room images.

[0252] After acquiring a room image, the current room's type can be determined based on a pre-established room classification model. In certain embodiments of this application, residential rooms can be broadly categorized into six categories: living room, bedroom, dining room, kitchen, bathroom, and balcony. The room type detection method can be found in the explanations provided in the related embodiments above and will not be further elaborated here.

[0253] After determining the room type, each room needs to be labeled on the constructed space map. For example, the room type can be labeled with specific text at the corresponding location on the terminal application's interactive interface, allowing users to independently select and customize a cleaning mode through the terminal application.

[0254] In this way, when the cleaning robot performs the cleaning task for the first time and establishes the space map, the room type can be determined and marked on the map, avoiding the influence of different object layouts on the room classification results.

[0255] In some embodiments, referring to FIG. 21 , step 05 includes:

[0256] 051: Calculate the room type probability of the current room based on the pre-established room classification model and the current frame image information;

[0257] 052: Determine the room type corresponding to the probability value greater than a preset threshold and with the largest value in the calculation result as the type of the current room.

[0258] In some embodiments, the confirmation module 202 is used to calculate the room type probability of the current room based on a pre-established room classification model and the current frame image information, and determine the room type corresponding to the probability value greater than a preset threshold and with the largest value in the calculation result as the type of the current room.

[0259] In some embodiments, the processor is used to calculate the room type probability of the current room based on a pre-established room classification model and current frame image information, and determine the room type corresponding to the probability value greater than a preset threshold and with the largest value in the calculation result as the type of the current room.

[0260] Specifically, the MobileNetv2 network training model can be used to train the training sample set to generate a room classification model. To ensure the accuracy of the model, it is necessary to use the trained model to predict and evaluate new room images to enhance the model's generalization ability.

[0261] The probability of the current room's room type can be calculated based on the image information read from the current frame, including various features included in the current frame. For example, if a bed, nightstand, and a complete wardrobe appear in the current frame, the room is likely a bedroom. Furthermore, in some unique apartment designs, a bed, nightstand, and other items may appear in a living room, so there's a certain probability that the current frame also represents the living room. Therefore, a threshold is set and the current room type is determined based on the relative relationship between the probability of the current frame's corresponding room type and the threshold.

[0262] In one example, the threshold can be set to 0.8. If the calculated probability that the current room is a bedroom is 0.85 and the probabilities of other room types are all less than 0.8, the current room can be determined to be a bedroom. If the threshold is set to 0.5, if the calculated probability that the current room is a bedroom is 0.85 and the probability of it being a balcony is 0.6, the bedroom, which has the larger calculated probability, is used as the current room type.

[0263] In this way, calculations can be performed based on the room classification model and the current frame image information, and the room type of the current room can be determined based on whether the calculation results meet certain standards, thereby improving the accuracy of room type judgment.

[0264] In certain embodiments, referring to FIG. 22 , the method further comprises:

[0265] 07: If all calculation results are less than the preset threshold, the current frame image is discarded.

[0266] In some embodiments, as shown in FIG. 20 , the recognition device 200 further includes a storage module 204 , which is configured to discard the current frame image when all calculation results are smaller than a preset threshold.

[0267] In some embodiments, the processor is configured to discard the current frame image when all calculation results are less than a preset threshold.

[0268] Specifically, if the calculation results for all room types are less than the threshold, it is impossible to determine the specific room location of the cleaning robot when the current frame was captured. In one example, if the current frame only contains an atypical object, such as an air purifier, or if a living object obscures the camera, preventing the camera from capturing a specific object in the room, the calculation result is likely less than the threshold, making it impossible to determine the room type of the cleaning robot based on the image, and the current frame must be discarded.

[0269] Furthermore, when a cleaning robot is at the junction of two types of rooms, it may capture only a portion of the scene. For example, a current frame may contain both a partial image of a bathroom toilet and a partial image of a bedroom bed. Since the current frame doesn't contain a complete object, the calculated result is likely less than the threshold. Therefore, the room type cannot be determined based on this image, and the current frame must be discarded.

[0270] In this way, calculations can be performed based on the room classification model and the current frame image information, and the current frame image whose calculation results do not meet the standards will be discarded, thereby improving the accuracy of room type judgment.

[0271] In some embodiments, referring to FIG. 23 , step 05 includes:

[0272] 053: After completing the construction of the spatial map of the current room, determine the type of the current room according to the statistical results of the room type of the current room determined in the process of map building.

[0273] In some embodiments, the confirmation module 202 is configured to determine the type of the current room according to statistical results of the room type of the current room determined during the map building process after completing the construction of the spatial map of the current room.

[0274] In some embodiments, the processor is configured to determine the type of the current room according to statistical results of the room type of the current room determined during the map building process after completing the construction of the spatial map of the current room.

[0275] Specifically, after the cleaning robot completes the construction of the space map of the current room, it can mark the room name on the map according to the type of the current room determined during the map construction process.

[0276] When a room's spatial map appears in the terminal app, it displays "tags" with the room names, showing the divided rooms and their types. This allows users to easily select and customize their cleaning modes through the terminal app. After the cleaning robot completes the spatial map, it needs to update and save the map. For the same apartment, the robot can use the saved map directly when cleaning again, without having to rebuild the map.

[0277] In this way, the current room type can be determined based on the statistical results of the construction of the room type, thereby improving the operating efficiency of the cleaning robot.

[0278] The computer device of the present embodiment includes a processor and a memory. The memory stores a computer program executable on the processor. When executed by the processor, the program implements the various processes of the above-described embodiment of the room type detection method, achieving the same technical effects. To avoid repetition, the details are not described here.

[0279] Optionally, the room type detection method in the embodiment of the present application can be executed by a computer device, which can be at least one of a server and a terminal device, that is, the method can be executed by the server or the terminal device alone, or by the server and the terminal device together.

[0280] Among them, terminal devices may include but are not limited to: smart phones (such as Android phones, IOS phones, etc.), tablets, laptops, desktop computers, smart speakers, smart watches, portable personal computers, mobile Internet devices (Mobile Internet Devices, abbreviated as MID), intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, wearable devices, etc., and the embodiments of this application do not limit this.

[0281] The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The embodiments of this application do not limit this.

[0282] The present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by one or more processors, the method for identifying the room category described above is implemented.

[0283] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0284] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0285] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0286] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0287] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0288] In addition, all functional units in the embodiments of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0289] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, ROM, RAM, disks or optical disks, etc. Various media that can store program codes.

[0290] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0291] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A room type detection method, applied to a cleaning robot, comprising: Acquire image data of the target room; Based on a preset room classification model, the image data is processed to determine the room type of the target room.

2. The room type detection method according to claim 1, wherein the processing of the image data based on a preset room classification model to determine the room type of the target room comprises: Detecting features in the target room based on the image data to obtain a detection result; The detection result includes category information corresponding to each feature object in the target room; Determine a first weight corresponding to each room type in at least one room type for each category feature in the detection result, and determine a second weight corresponding to each category feature in the detection result; Based on the detection result, the first weight, and the second weight, a room type of the target room is determined.

3. The method according to claim 2, wherein determining the room type of the target room based on the detection result, the first weight and the second weight comprises: Performing a weighted summation of the number of feature objects of all categories in the detection result based on the first weight and the second weight to obtain a first value of the target room corresponding to each room type; The room type of the target room is determined according to the first numerical value corresponding to each of the at least one room type.

4. The method according to claim 2, wherein determining a first weight of each category feature in the detection result corresponding to each room type in at least one room type comprises: The first weight is determined based on first weight information obtained in advance; wherein the first weight information includes a statistical probability that each feature object category in a first sample data set corresponds to each room type, the first sample data set includes sample images of multiple room types and first label data, and the first label data includes at least room type information and feature object category information corresponding to the sample image; and / or, The determining of the second weight corresponding to each category feature in the detection result includes: The second weight is determined based on pre-acquired second weight information; wherein the second weight information includes the degree of correlation between each of the multiple category features and any type of room in the at least one room type.

5. The method according to claim 2, wherein the detecting the feature in the target room based on the image data to obtain the detection result comprises: The image data is processed by a first network to obtain a first processing result, and the detection result is obtained based on the first processing result; wherein the first network is trained based on a second sample data set, and the second sample data set includes sample images of multiple room types and second label data, and the second label data The data at least includes feature object category information corresponding to the sample image.

6. The method according to claim 5, further comprising: Obtaining location information corresponding to each feature object in the target room; The obtaining the detection result based on the first processing result includes: The first processing result is fused and / or deduplicated according to the position information to obtain the detection result.

7. The method according to any one of claims 2 to 6, further comprising: Performing image classification processing on the image data to obtain a second processing result; The second processing result includes the classification probability of the target room corresponding to each room type; The determining the room type of the target room based on the detection result, the first weight, and the second weight includes: The room type of the target room is determined based on the second processing result, the detection result, the first weight, and the second weight.

8. The method according to claim 7, wherein determining the room type of the target room based on the second processing result, the detection result, the first weight, and the second weight comprises: Performing a weighted summation of the number of feature objects of all categories in the detection result based on the first weight and the second weight to obtain a first value of the target room corresponding to each room type; Determine a second value of the target room corresponding to each room type according to the first value and the second processing result; The room type of the target room is determined according to the second numerical value corresponding to each of the at least one room type.

9. According to the method according to any one of claims 2 to 6, the first weight represents the probability that the feature of the corresponding category appears in the corresponding type of room, and the second weight represents the degree of correlation between the feature of the corresponding category and any type of room.

10. According to the method of claim 1, the room classification model is determined by model training, and the model training method comprises: Obtaining pre-collected raw data of room types of multiple different apartment types; Processing the original data according to preset rules to obtain a training sample set, wherein the training sample set includes data samples of multiple room types, and the data samples include original data of multiple room types; The training sample set is trained using a preset model to generate the room classification model.

11. The method according to claim 10, wherein the processing of the original data according to a preset rule to obtain a training sample set comprises: Performing data cleaning on the raw data according to the preset rules to obtain a data set; The data set is divided according to a preset ratio to obtain the training sample set.

12. The method according to claim 11, wherein dividing the data set according to a preset ratio to obtain the training sample set comprises: Classifying the cleaned data set according to room type, so as to divide the data belonging to the same room type into the same sample subset; Each sample subset is divided according to a preset ratio to obtain a plurality of training sample subsets, and the plurality of training sample subsets constitute the training sample set.

13. The method according to claim 10, wherein the training sample set is trained by a preset model to generate the room classification model, comprising: Performing data preprocessing on the training sample set; The room classification model is generated by training the training sample set after data preprocessing through a preset model.

14. The method according to claim 10, wherein the training sample set is trained by a preset model to generate the room classification model, comprising: The training sample set is trained by using a MobileNetv2 network training model to generate the room classification model.

15. The method according to claim 10, wherein the step of training the training sample set after data preprocessing by using a preset model to generate the room classification model comprises: The training sample set after data preprocessing is trained by the preset model to obtain the initial model; The initial model is subjected to model conversion processing to generate the room classification model that can be deployed and run on the cleaning robot.

16. The method according to any one of claims 10 to 15, comprising: When the cleaning robot performs a cleaning task for the first time and establishes a spatial map, image information of the current space is obtained; Determining the room type of the current room according to the pre-established room classification model and the image information; The constructed space map is labeled with room types according to the room types.

17. The method according to claim 16, wherein determining the type of the current room according to the pre-established room classification model and the image information comprises: Calculating the room type probability of the current room according to the pre-established room classification model and current frame image information; The room type corresponding to the probability value that is greater than a preset threshold and has the largest value in the calculation result is determined as the type of the current room.

18. The method according to claim 17, further comprising: When the calculation results are all smaller than the preset threshold, the current frame image is discarded.

19. The method according to claim 17, wherein determining the type of the current room according to the pre-established room classification model and the image information comprises: After completing the construction of the space map of the current room, the type of the current room is determined according to the statistical results of the room types of the current room determined in the process of building the map.

20. A room type detection device, which is applied to a cleaning robot, and comprises an image detection module, a weight acquisition module and a classification decision module; wherein: The image detection module is used to detect the characteristic objects in the target room based on the image data to obtain a detection result; the detection result includes the category information corresponding to each characteristic object in the target room; The weight acquisition module is used to determine a first weight corresponding to each room type in at least one room type for each category feature in the detection result, and to determine a second weight corresponding to each category feature in the detection result; The classification decision module is used to determine the room type of the target room based on the detection result, the first weight and the second weight.

21. A device for constructing a room classification model, comprising: An acquisition module, used to acquire pre-collected raw data of room types of multiple different apartment types; A processing module, configured to process the raw data according to a preset rule to obtain a training sample set, wherein the training sample set includes data samples of multiple room types, and the data samples include raw data of multiple room types that can be manually labeled by room type; The training module is used to train the training sample set through a preset model to generate the room classification model.

22. A room category recognition device, comprising: An acquisition module is used to acquire image information of the current space when the cleaning robot performs a cleaning task for the first time to establish a space map; A confirmation module, used to determine the room type of the current room according to a pre-established room classification model and the image information; The labeling module is used to label the constructed space map with room types according to the room types.

23. A computer device, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method according to any one of claims 1 to 19 is implemented.

24. A cleaning robot, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method described in any one of claims 1 to 19 is implemented.

25. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by one or more processors, the method according to any one of claims 1 to 19 is implemented.

Citation Information

Patent Citations

  • Construction method of an inference network for inferring room types according to indoor articles by robot through common sense

    CN109783652A

  • Ground cleaning method and device, intelligent cleaning equipment and storage medium

    CN111543902A

  • Cleaning robot control method and device based on scene information and cleaning robot

    CN111657798A

  • Room attribute identification method and device, sweeping robot and storage medium

    CN111973076A

  • Robot, pile searching method and device thereof and storage medium

    CN116009560A

Cited By

  • Multi-scene-oriented robot collaborative path intelligent scheduling system and method

    CN122044107A

  • Robot with body and room attribute classification method and room attribute classification system thereof

    CN122493177A

  • Smart home system reliability detection method and device, and storage medium

    CN122698478A