A method and device for commodity recognition and posture estimation
By combining artificial intelligence and traditional algorithms, training recognition models and using local area templates for pose estimation, the problem of product recognition and pose estimation for robots in complex environments is solved and the applicability of robots in the retail industry is improved. range and operational efficiency.
Patent Information
- Application Number
- CN202110710231.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-25
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-06-25
AI Technical Summary
It is difficult for existing robots in the retail industry to accurately identify a large number of product types and estimate product postures in complex environments, resulting in limited functionality and inability to effectively replace manual labor for product picking and stacking.
Using a method that combines artificial intelligence and traditional algorithms, the recognition model is trained to identify product types and location features in pictures, and pose estimation is performed through local area templates to assist robot operations.
It achieves accurate identification of product types and postures in complex environments, improves the scope of application and operational efficiency of robots in the retail industry, especially for deformable goods, and overcomes the problems of low calculation accuracy and inoperability of traditional algorithms.
Smart Images

Figure CN113344108B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of robotics technology, and in particular to a commodity recognition and posture estimation method and device. Background Art
[0002] With the booming development of robotics technology, more and more industries are choosing to use suitable intelligent robots to replace a large number of labor-intensive production work links. In the traditional retail industry, people push carts to fixed shelves to stack and pick goods, which is a time-consuming, labor-intensive and inefficient job. In order to improve efficiency, a large number of intelligent robots that assist humans in picking goods have emerged in the retail industry. However, most of the existing product picking robots are limited to picking goods from shelves due to the limitations of machine vision algorithms, and more complex classification and stacking requirements are not involved.
[0003] In order to further expand the scope of use of intelligent robots in the retail industry, machine vision is urgently needed to provide more reliable technical support for intelligent robots, so that they have more powerful and universal functions. In order to realize the automatic picking and stacking of goods by robots in the retail industry and other environments, machine vision needs to accurately provide the robot with the following information: the type of goods in the material frame or on the shelf, the actual grasping position of the robot, and the positive orientation of the goods, that is, the posture of the goods, which is necessary to grasp the goods from the material frame in the correct way and place them stably on the goods shelf.
[0004] In summary, in order to realize the above functions, there are the following technical difficulties:
[0005] (1) Accurately identify a large number of commodity categories. As we all know, with the development of the retail industry, the variety of commodities is increasing. To replace human labor with robots, they need to have visual capabilities similar to those of humans. Traditional visual algorithms are unable to perform a large number of category judgments in complex environments. The present invention uses emerging artificial intelligence algorithms to provide robots with reliable, efficient and stable commodity category recognition capabilities.
[0006] (2) Accurate estimation of the posture of the product. The posture estimation problem has always been a key problem in the field of computer vision. It is extremely challenging to efficiently and accurately calculate the specific posture of an object. The present invention combines artificial intelligence with traditional algorithms, which overcomes the disadvantage that artificial intelligence algorithms require a large amount of training data, and also improves the calculation accuracy of traditional posture estimation algorithms, so that the entire algorithm can accurately estimate the actual orientation of a specific product at a specific location for the robot. Summary of the invention
[0007] In view of the defects and problems existing in the visual algorithms used by existing robots, the present invention provides a method for commodity recognition and posture estimation.
[0008] The embodiment of the present invention provides a commodity recognition and posture estimation method, including:
[0009] A commodity recognition model is obtained by training to at least recognize the type of commodity in the picture and the location characteristics of the area where the commodity is located, wherein the picture is obtained by taking a picture of the actual environment where the commodity is located;
[0010] Determine a local area template corresponding to each of the commodities, wherein the local area template is used to reflect the posture of the commodity in the actual environment at different observation angles;
[0011] Inputting an actual scene picture containing a target product into the product recognition model, and obtaining the type of the target product and the regional position of the target product in the actual scene picture output by the product recognition model;
[0012] Determining a target area template matching the target product based on the type and area location of the target product;
[0013] Determining a posture estimation result of the target commodity based at least on the target area template;
[0014] The robot is assisted in operating the target commodity based on the posture estimation result.
[0015] Optionally, it also includes:
[0016] Obtaining a first number of the pictures;
[0017] Marking the type and outline of the product in the picture;
[0018] The first number of images are processed based on a target processing method to generate a second number of images, and the target processing method includes one or more of a data synthesis method for synthesizing new images, a method for scaling the size of products in images to generate new images, and a method for changing the position and posture of products in images to generate new images.
[0019] Optionally, the training obtains a commodity recognition model that can at least recognize the type of commodity in the image and the location characteristics of the region where the commodity is located, including:
[0020] adjusting the size of the second number of images;
[0021] Determining detection areas on the adjusted second number of images with a fixed ratio and size standard;
[0022] Training a neural network model using the second number of pictures in which the detection areas are determined to be present, so that the neural network model can identify whether the commodity is present in each of the detection areas;
[0023] The detection areas judged by the neural network model to contain the product are merged using a non-maximum suppression algorithm and input into the neural network model to train the neural network model's ability to recognize the type of product in the merged detection areas and the location of the product, thereby forming a product recognition model that can determine the type of product in the image and the location of the product in the image.
[0024] Optionally, the determining a local area template corresponding to each of the commodities includes:
[0025] Obtaining pictures of the product at different observation angles in the actual scene;
[0026] Determine the target position having the target corner feature on the surface of the product in each of the images based on the corner detection algorithm;
[0027] Extracting a first picture containing an area adjacent to the target position from the picture;
[0028] The first image is processed based on an affine transformation algorithm to generate the local area template.
[0029] Optionally, inputting the actual scene picture containing the target product into the product recognition model to obtain the type of the target product and the regional position of the target product in the actual scene picture output by the product recognition model includes:
[0030] Obtain an actual scene image containing the target product based on the robot's field of view;
[0031] The actual scene picture containing the target product is input into the product recognition model to obtain the type of the target product and the regional position of the target product in the actual scene picture.
[0032] Optionally, the determining a target area template matching the target product based on the type and area location of the target product includes:
[0033] Performing corner point detection in the area of the actual scene image based on the area position of the target product to determine the corner point position;
[0034] Determine an area in the actual scene image that is adjacent to the corner point position as an area to be detected;
[0035] Determining the area template with the same commodity type based on the type of the target commodity;
[0036] Calculating the matching degree between the area to be detected and the determined area template;
[0037] The target area template is determined based at least on the matching degree.
[0038] Optionally, determining the target area template at least based on the matching degree includes:
[0039] The target area template is determined based on the matching degree and a random sampling consensus algorithm.
[0040] Optionally, determining the pose estimation result of the target commodity at least based on the target area template includes:
[0041] Determining orientation information of the target product in the actual scene image based on the target area template;
[0042] Determine a normal vector of a position to be grasped based on the obtained depth map of the actual scene, where the position to be grasped is related to the position of the target product;
[0043] A posture estimation result of the target product is determined based on the normal vector and the orientation information of the target product.
[0044] Optionally, the robot has a mechanical arm, and the step of assisting the robot in operating the target commodity based on the posture estimation result includes:
[0045] Converting the posture estimation result into data in the coordinate system of the robotic arm;
[0046] The robot is controlled to operate the target product based on the converted data.
[0047] Another embodiment of the present invention also provides an electronic device, including:
[0048] A training module, used for training a commodity recognition model that can at least recognize the type of commodity in a picture and the location characteristics of the area where the commodity is located, wherein the picture is obtained by taking a picture of the actual environment where the commodity is located;
[0049] A first determination module is used to determine a local area template corresponding to each of the commodities, wherein the local area template is used to reflect the posture of the commodity in the actual environment at different observation angles;
[0050] An acquisition module, used to input an actual scene picture containing a target commodity into the commodity recognition model, and obtain the type of the target commodity output by the commodity recognition model and the regional position of the target commodity in the actual scene picture;
[0051] A second determination module, configured to determine a target area template matching the target product according to the type and area location of the target product;
[0052] A third determination module, configured to determine a posture estimation result of the target commodity based at least on the target area template;
[0053] The fourth determination module is used to assist the robot in operating the target product according to the posture estimation result.
[0054] Based on the disclosure of the above embodiments, it can be known that the beneficial effects of the embodiments of the present invention include that the execution process of the method of the present application is simple, by training the neural network model to identify the area where the product is located in the picture, and then using the local area matching algorithm to accurately estimate the posture of the product, the process is completely unaffected by the deformability of the product, even for bagged products, its actual position can be accurately estimated, so that the robot can successfully grasp or place the product, successfully overcoming the problems of low calculation accuracy and inability to be used in complex environments in traditional algorithms, especially for deformable products, the method of the present application effectively overcomes the problem that the robot cannot successfully operate the product, and broadens the scope of application of the robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 The figure is a flow chart of a commodity recognition and posture estimation method in an embodiment of the present invention.
[0056] Figure 2 The flowchart is a method for commodity recognition and posture estimation in another embodiment of the present invention.
[0057] Figure 3 The flowchart is a method for commodity recognition and posture estimation in another embodiment of the present invention.
[0058] Figure 4 The flowchart is a method for commodity recognition and posture estimation in another embodiment of the present invention.
[0059] Figure 5 is a structural block diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0060] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings, but are not intended to limit the present invention.
[0061] It should be understood that various modifications may be made to the embodiments disclosed herein. Therefore, the following description should not be considered as limiting, but merely as an example of an embodiment. Other modifications within the scope and spirit of the present disclosure will occur to those skilled in the art.
[0062] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the general description of the present disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the present disclosure.
[0063] These and other characteristics of the invention will become apparent from the following description of a preferred form of embodiment given as a non-limiting example, with reference to the accompanying drawings.
[0064] It should also be understood that, although the invention has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the invention that have the characteristics recited in the claims and are therefore within the scope of protection defined thereby.
[0065] The above and other aspects, features and advantages of the present disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.
[0066] Specific embodiments of the present disclosure are described hereinafter with reference to the accompanying drawings; however, it should be understood that the disclosed embodiments are merely examples of the present disclosure, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid obscuring the present disclosure with unnecessary or redundant details. Therefore, the specific structural and functional details disclosed herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present disclosure in a variety of ways with substantially any suitable detailed structure.
[0067] This specification may use the phrases "in one embodiment," "in another embodiment," "in a further embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present disclosure.
[0068] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0069] like Figure 1 As shown, an embodiment of the present invention provides a commodity recognition and posture estimation method, including:
[0070] A product recognition model is trained to at least recognize the type of product in the picture and the location characteristics of the area where the product is located, where the picture is taken of the actual environment where the product is located;
[0071] Determine a local area template corresponding to each product, where the local area template is used to reflect the posture of the product in the actual environment at different observation angles;
[0072] Inputting an actual scene image containing a target product into a product recognition model, and obtaining the type of the target product and the regional position of the target product in the actual scene image output by the product recognition model;
[0073] Determine a target area template matching the target product based on the type and area location of the target product;
[0074] Determine a pose estimation result of the target product based at least on the target area template;
[0075] The posture estimation results are used to assist the robot in operating the target product.
[0076] For example, when implementing the method of this embodiment, the system can train a commodity recognition model based on a large number of pictures containing different commodities, so that the model can be based on the pictures containing different commodities and the actual environment in which the commodities are located, so as to identify the types of commodities in each picture and the regional positions of commodities. Then, a local area template corresponding to the identified commodity is determined, and the posture of the identified commodity in the picture can be determined based on the local area template. Different regional templates can be used to reflect the postures of different commodities at different observation angles in the actual environment. After the commodity recognition model and the regional template are determined, the actual scene picture containing the target commodity is recognized using the commodity recognition model to obtain the type of the target commodity output by the commodity recognition model and the regional position of the target commodity in the actual scene picture. After that, the target regional template matching the target commodity is determined based on the type and regional position of the target commodity, and then the system gives the target regional template to determine the posture estimation result of the target commodity, that is, to determine the posture of the target commodity. At this time, the system can assist the robot in grasping or placing the target commodity based on the actual posture and position of the determined target commodity.
[0077] Based on the disclosure of the above embodiments, it can be known that the execution process of the method disclosed in this embodiment is simple and fast. By training a neural network model to identify the area where the goods are located in the picture, the posture of the goods can be accurately estimated by using a local area matching algorithm. This process is completely unaffected by the deformability of the goods. Even for bagged goods, its actual position can be accurately estimated, so that the robot can successfully grab or place the goods, successfully overcoming the problems of low calculation accuracy and inability to be used in complex environments in traditional algorithms. Especially for deformable goods, the method of this application effectively overcomes the problem that the robot cannot successfully operate the goods, and broadens the scope of application of the robot. For example, in retail industries such as shopping malls and supermarkets, based on the method provided in this embodiment, the robot can accurately and efficiently stack or grab goods, providing convenience for customers.
[0078] In order to prove that the method of this embodiment can effectively improve the robot's visual ability and assist it in stacking and grabbing goods, the method of this embodiment is actually tested. For example, the method of this embodiment is applied to the automatic picking and stacking system of supermarket goods. A total of 20 kinds of goods in the supermarket are selected as test products, including boxed goods, bottled goods and bagged goods. The test items include the sorting of goods from material frame to material frame, the collection of goods from shelf to material frame, and the stacking of goods from material frame to shelf. Through a large number of functional tests on these 20 categories of goods, the average category recognition accuracy is 98.5%, the posture estimation accuracy of boxed items is about 97.6%, the posture estimation accuracy of bottled objects is about 95.3%, and the posture estimation accuracy of deformable objects such as bags is about 96.2%; the average category discrimination time is about 500ms, and the time taken by the posture estimation algorithm is about 200ms. Therefore, based on the method disclosed in this embodiment, the time efficiency and accuracy of the robot operation basically meet the real-time and accuracy requirements of the intelligent robot.
[0079] Furthermore, the method in this embodiment also includes:
[0080] Get a first number of pictures;
[0081] Label the types and outlines of the products in the pictures;
[0082] A first number of images are processed based on a target processing method to generate a second number of images, wherein the target processing method includes one or more of a data synthesis method for synthesizing new images, a method for scaling the size of products in images to generate new images, and a method for changing the position and posture of products in images to generate new images.
[0083] Specifically, a large amount of commodity image data that needs to be sorted, picked, and stacked can be collected manually or by machine, and the commodity data can be labeled. The labeling includes:
[0084] (1) Clearly mark the outlines of each product in the image;
[0085] (2) Mark the category name corresponding to each product;
[0086] Since data labeling is a tedious and time-consuming process, in actual application, a first number of pictures can be collected and data labeled, and then the first number of labeled pictures can be used for data synthesis. By scaling the size of the labeled goods, changing the position of the goods in the picture, the posture of the goods in the picture, and the background of the goods, a second number of pictures are prepared by artificial synthesis, and training data for training the neural network model is formed based on the second number of pictures. Among them, the outline of the goods on each picture in the second number of pictures and the type of goods are also determined, which can be obtained from the labeled data in the first number of pictures.
[0087] Furthermore, if Figure 2 As shown, in this embodiment, the commodity recognition model trained to at least recognize the type of commodity in the picture and the location characteristics of the region where the commodity is located includes:
[0088] adjusting the size of the second number of images;
[0089] Determining detection areas on the adjusted second number of images with a fixed ratio and size standard;
[0090] Training the neural network model using the second number of images with detection areas determined, so that the neural network model can identify whether there is a commodity in each detection area;
[0091] The detection areas judged by the neural network model to contain goods are merged using the non-maximum suppression algorithm and input into the neural network model to train the neural network model's ability to recognize the types of goods in the merged detection areas and the locations of the goods, thereby forming a product recognition model that can determine the types of goods in the picture and the locations of the goods in the picture.
[0092] For example, the neural network model can be trained by combining the second number of pictures and the "two-stage" image semantic segmentation neural network algorithm, so that the robot can have a relatively accurate and efficient ability to distinguish the types of goods based on the neural network model, such as accurately segmenting all the goods in the robot's field of view picture, and more accurately marking the pixel area occupied by the goods in the picture; the timeliness is high, and it can meet the requirements for the efficiency of the recognition algorithm in the actual production process. The specific application includes the following steps:
[0093] (1) scaling the size of the second number of images for input into the neural network model so that they can meet the computational requirements of the neural network model;
[0094] (2) On the scaled image, a detection area of fixed proportion and size is generated for pixels in a specific area. For example, if the area where the product is located is a specific area, a detection area of fixed proportion and size is generated based on the pixels in the area, and then a neural network model is used to determine whether there is an object to be detected in the detection area;
[0095] (3) Screening all detection areas generated in the above step (2), merging the areas that are identified as having objects to be detected in the above step using a non-maximum suppression algorithm (NMS), and re-inputting them into the neural network model for further calculation, such as inputting the merged data into the second half of the neural network model for further calculation;
[0096] (4) The merged region in step (3) is subjected to category discrimination, and specific category information of the region, such as commodity category information, is output through a neural network model, and the location of the region containing such objects is calculated to output more accurate location information of the commodity in the image. The neural network model formed through the above training and testing is the commodity recognition model in this embodiment.
[0097] Furthermore, in this embodiment, determining a local area template corresponding to each commodity includes:
[0098] Obtain pictures of the product at different viewing angles in the actual scene;
[0099] Based on the corner detection algorithm, the target position with target corner features on the surface of the product in each image is determined;
[0100] Extracting a first picture containing an area adjacent to the target position from the picture;
[0101] The first image is processed based on an affine transformation algorithm to generate a local area template.
[0102] For example, you can use different observation angles for various products, or determine the main observation angle based on the robot position, and then generate a two-dimensional image template of the local area for the corresponding product based on different observation angles to prepare data for subsequent posture calculation. The specific implementation steps can be referred to as follows:
[0103] (1) Collect pictures of the product from the main viewing angles. For example, people mostly view products from the front, side, and back, so you can collect pictures of the product from these four angles.
[0104] (2) Using a corner detection algorithm on the product images collected at different angles, detect locations on the product surface with significant corner feature information, i.e., corner locations;
[0105] (3) according to the corner point position detected in step (2), extract the image of the area around the corner point position in the picture, generate a picture with the image of the local area, and use it as the original template for subsequent steps;
[0106] (4) Since the regional image extracted in step (3) will usually undergo an arbitrary affine transformation each time the product is observed, the position and size of the product will differ from the original local regional image / original template. Therefore, in order to make the generated regional template highly accurate and effectively assist the robot in determining the actual product posture, this embodiment uses the image affine transformation method to randomly generate a large number of transformed local regional images, such as about 10,000 transformed local regional images, and use these images as regional templates for posture estimation calculations in subsequent steps;
[0107] (5) In actual application, the above steps (2) to (4) can be repeated until a sufficient number of local area templates are generated for images collected from all main observation angles of all products.
[0108] Furthermore, if Figure 3 As shown, in this embodiment, an actual scene picture containing a target product is input into a product recognition model, and the type of the target product output by the product recognition model and the regional position of the target product in the actual scene picture are obtained, including:
[0109] Obtain an actual scene image containing the target product based on the robot's field of view;
[0110] The actual scene image containing the target product is input into the product recognition model to obtain the type of the target product and the regional position of the target product in the actual scene image.
[0111] For example, a 3D camera can be used to obtain an actual scene image containing the target product in the robot's field of view, and then the image can be input into the product model to obtain the type and regional position of the product in the image. When the subsequent system determines the grasping position based on the regional position, the system can determine the 3D position of the grasping point in the camera coordinate system based on the depth map obtained by the 3D camera. Then, the coordinate transformation method can be used to convert the above 3D position into the robot base coordinate system, thereby assisting in determining the position of the product to be grasped.
[0112] Furthermore, if Figure 4 As shown, in this embodiment, determining a target area template matching the target product based on the type and area location of the target product includes:
[0113] Perform corner point detection based on the target product's area location in the actual scene image to determine the corner point location;
[0114] Determine the area adjacent to the corner point position in the actual scene image as the area to be detected;
[0115] Determine the regional templates with the same product category based on the target product category;
[0116] Calculate the matching degree between the area to be detected and the determined area template;
[0117] A target region template is determined based at least on the degree of matching.
[0118] Wherein, determining the target area template at least based on the matching degree includes:
[0119] The target area template is determined based on the matching degree and the random sampling consensus algorithm.
[0120] Furthermore, after determining the target area template, this embodiment determines a posture estimation result of the target commodity at least based on the target area template, including:
[0121] Determine the orientation information of the target product in the actual scene image based on the target area template;
[0122] Determine the normal vector of the position to be grasped based on the depth map of the actual scene obtained, where the position to be grasped is related to the position of the target product;
[0123] The pose estimation result of the target product is determined based on the normal vector and the orientation information of the target product.
[0124] For example, the system needs to calculate the specific posture of the product based on the obtained product area location and type information, and use this posture to guide the robot to grasp the product in the correct grasping direction. The specific implementation can refer to the following steps:
[0125] (1) Perform corner point detection based on the target product's regional location in the actual scene image and calculate the corner point location;
[0126] (2) Selecting the surrounding area of the product area located at the corner point in the actual scene image as the area to be detected that needs to be matched and detected;
[0127] (3) By obtaining the commodity category to which this commodity area belongs, the template information generated in step 2 is extracted, and the region template is matched with the region to be detected by the normalized cross-correlation matching (NCC) algorithm. Since a large number of region templates under different affine transformations are generated in the previous step, in order to determine the optimal template, that is, the target region template, the region to be detected and the template are successfully matched if the score based on the NCC algorithm in this step exceeds the threshold. The region template that successfully matches is the target region template, wherein the threshold can be set to 0.8, 0.85, 0.7, etc.;
[0128] (4) Since there are many corner points in the product area in the robot's field of view, a large number of matching results will be obtained after the matching in the above step (3). Therefore, the RANSAC algorithm can be used to filter these results and eliminate erroneous information;
[0129] (5) Since the matching algorithms used are all two-dimensional algorithms, the algorithms here can only obtain the orientation information of the product in the picture. Therefore, the system needs to calculate the specific three-dimensional posture of the product. It is necessary to use the depth map of the three-dimensional camera to calculate the normal vector of the position to be grasped, and based on the calculated product orientation information, calculate and restore the posture information of the specific grasping position of the target product;
[0130] (6) Repeat steps (1) to (5) to obtain the pose information of all products in the field of view of the intelligent robot, i.e., the pose estimation result
[0131] Furthermore, the robot in this embodiment has a robotic arm. Since the position coordinates of the robot and the robotic arm are different, the robot is assisted in operating the target commodity based on the posture estimation result in this embodiment, including:
[0132] Convert the posture estimation result into data in the coordinate system of the robot;
[0133] Control the robot's operation on the target product based on the converted data.
[0134] For example, according to the above calculation steps, the grasping position and posture of the product to be grasped based on the robot base in the robot's field of view are obtained. Since most robots require special product grippers, such as robotic arms, in order to determine a more accurate grasping position, the calibrated tool end coordinate transformation data can be used to calculate the specific grasping position and posture of the robot's robotic arm, thereby ensuring that the robot can perform accurate stacking or grasping operations on the target product.
[0135] like Figure 5 As shown, another embodiment of the present invention also provides an electronic device, including:
[0136] A training module is used to train a commodity recognition model that can at least recognize the type of commodity in the picture and the location characteristics of the area where the commodity is located, and the picture is obtained by taking a picture of the actual environment where the commodity is located;
[0137] A first determination module is used to determine a local area template corresponding to each product, where the local area template is used to reflect the posture of the product in the actual environment at different observation angles;
[0138] An acquisition module, used to input an actual scene image containing a target product into a product recognition model, and obtain the type of the target product output by the product recognition model and the regional position of the target product in the actual scene image;
[0139] A second determination module is used to determine a target area template matching the target product according to the type and area location of the target product;
[0140] A third determination module, configured to determine a posture estimation result of a target commodity based at least on the target area template;
[0141] The fourth determination module is used to assist the robot in operating the target product according to the posture estimation result.
[0142] Optionally, it further includes a second obtaining module, which is used to obtain a first number of the pictures and mark the types and outlines of the commodities in the pictures;
[0143] A processing module processes the first number of images based on a target processing method to generate a second number of images, wherein the target processing method includes one or more of a data synthesis method for synthesizing new images, a method for scaling the size of products in images to generate new images, and a method for changing the position and posture of products in images to generate new images.
[0144] Optionally, the training obtains a commodity recognition model that can at least recognize the type of commodity in the image and the location characteristics of the region where the commodity is located, including:
[0145] adjusting the size of the second number of images;
[0146] Determining detection areas on the adjusted second number of images with a fixed ratio and size standard;
[0147] Training a neural network model using the second number of pictures in which the detection areas are determined to be present, so that the neural network model can identify whether the commodity is present in each of the detection areas;
[0148] The detection areas judged by the neural network model to contain the product are merged using a non-maximum suppression algorithm and input into the neural network model to train the neural network model's ability to recognize the type of product in the merged detection areas and the location of the product, thereby forming a product recognition model that can determine the type of product in the image and the location of the product in the image.
[0149] Optionally, the determining a local area template corresponding to each of the commodities includes:
[0150] Obtaining pictures of the product at different observation angles in the actual scene;
[0151] Determine the target position having the target corner feature on the surface of the product in each of the images based on the corner detection algorithm;
[0152] Extracting a first picture containing an area adjacent to the target position from the picture;
[0153] The first image is processed based on an affine transformation algorithm to generate the local area template.
[0154] Optionally, inputting the actual scene picture containing the target product into the product recognition model to obtain the type of the target product and the regional position of the target product in the actual scene picture output by the product recognition model includes:
[0155] Obtain an actual scene image containing the target product based on the robot's field of view;
[0156] The actual scene picture containing the target product is input into the product recognition model to obtain the type of the target product and the regional position of the target product in the actual scene picture.
[0157] Optionally, the determining a target area template matching the target product based on the type and area location of the target product includes:
[0158] Performing corner point detection in the area of the actual scene image based on the area position of the target product to determine the corner point position;
[0159] Determine an area in the actual scene image that is adjacent to the corner point position as an area to be detected;
[0160] Determining the area template with the same commodity type based on the type of the target commodity;
[0161] Calculating the matching degree between the area to be detected and the determined area template;
[0162] The target area template is determined based at least on the matching degree.
[0163] Optionally, determining the target area template at least based on the matching degree includes:
[0164] The target area template is determined based on the matching degree and a random sampling consensus algorithm.
[0165] Optionally, determining the pose estimation result of the target commodity at least based on the target area template includes:
[0166] Determining orientation information of the target product in the actual scene image based on the target area template;
[0167] Determine a normal vector of a position to be grasped based on the obtained depth map of the actual scene, where the position to be grasped is related to the position of the target product;
[0168] A posture estimation result of the target product is determined based on the normal vector and the orientation information of the target product.
[0169] Optionally, the robot has a mechanical arm, and the step of assisting the robot in operating the target commodity based on the posture estimation result includes:
[0170] Converting the posture estimation result into data in the coordinate system of the robotic arm;
[0171] The robot is controlled to operate the target product based on the converted data.
[0172] Furthermore, another embodiment of the present invention also provides an electronic device, comprising:
[0173] one or more processors;
[0174] a memory configured to store one or more programs;
[0175] When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned commodity recognition and posture estimation method.
[0176] An embodiment of the present application further provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned commodity recognition and posture estimation method is implemented. It should be understood that each solution in this embodiment has the corresponding technical effect in the above-mentioned method embodiment, which will not be repeated here.
[0177] Furthermore, an embodiment of the present invention also provides a computer program product, which is tangibly stored on a computer-readable medium and includes computer-readable instructions, and when the computer-executable instructions are executed, at least one processor executes the commodity recognition and posture estimation method in the above-described embodiment. It should be understood that each solution in this embodiment has the corresponding technical effect in the above-described method embodiment, which will not be repeated here.
[0178] It should be noted that the computer storage medium of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access storage medium (RAM), a read-only storage medium (ROM), an erasable programmable read-only storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only storage medium (CD-ROM), an optical storage medium, a magnetic storage medium, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program configured to be used by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, antenna, optical cable, RF, etc., or any suitable combination of the above.
[0179] It should be understood that although the present application is described according to various embodiments, not every embodiment contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0180] The above embodiments are only exemplary embodiments of the present invention and are not intended to limit the present invention. The protection scope of the present invention is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present invention, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present invention.
Claims
1. A commodity recognition and posture estimation method, characterized in that: include: A product recognition model is obtained by training to at least recognize the type of products in a picture and the location of the products, wherein the picture is obtained by taking a picture of the actual environment where the products are located; Determine a local area template corresponding to each of the commodities, wherein the local area template is used to reflect the posture of the commodity in the actual environment at different observation angles; Inputting an actual scene picture containing a target commodity into the commodity recognition model, and obtaining the type of the target commodity and the regional position of the target commodity in the actual scene picture output by the commodity recognition model; Determining a target area template matching the target product based on the type and area location of the target product; Determining a posture estimation result of the target commodity based at least on the target area template; Assisting the robot to operate the target product based on the posture estimation result; The method further comprises: Obtaining a first number of the pictures; Marking the type and outline of the product in the picture; Processing the first number of pictures based on a target processing method to generate a second number of pictures, wherein the target processing method includes one or more of a data synthesis method for synthesizing new pictures, a method of scaling the size of products in pictures to generate new pictures, and a method of changing the position and posture of products in pictures to generate new pictures; The training obtains a commodity recognition model that can at least recognize the type of commodity in the picture and the location characteristics of the area where the commodity is located, including: adjusting the size of the second number of images; Determining detection areas on the adjusted second number of images with a fixed ratio and size standard; Training a neural network model using the second number of pictures in which the detection areas are determined to be present, so that the neural network model can identify whether the commodity is present in each of the detection areas; The detection areas judged by the neural network model to contain the product are merged using a non-maximum suppression algorithm and input into the neural network model to train the neural network model's ability to recognize the type of product in the merged detection areas and the location of the product, thereby forming a product recognition model that can determine the type of product in the image and the location of the product in the image.
2. The method according to claim 1, characterized in that The determining of the local area template corresponding to each of the commodities includes: Obtaining pictures of the product at different observation angles in the actual scene; Determine the target position having the target corner feature on the surface of the product in each of the images based on the corner detection algorithm; Extracting a first picture containing an area adjacent to the target position from the picture; The first image is processed based on an affine transformation algorithm to generate the local area template.
3. The method according to claim 1, characterized in that: The step of inputting the actual scene picture containing the target commodity into the commodity recognition model to obtain the type of the target commodity and the regional position of the target commodity in the actual scene picture output by the commodity recognition model includes: Obtain an actual scene image containing the target product based on the robot's field of view; The actual scene picture containing the target commodity is input into the commodity recognition model to obtain the type of the target commodity and the regional position of the target commodity in the actual scene picture.
4. The method according to claim 1, characterized in that: The step of determining a target area template matching the target product based on the type and area location of the target product includes: Performing corner point detection in the area of the actual scene image based on the area position of the target product to determine the corner point position; Determine an area in the actual scene image that is adjacent to the corner point position as an area to be detected; Determining the area template with the same commodity type based on the type of the target commodity; Calculating the matching degree between the area to be detected and the determined area template; The target area template is determined based at least on the matching degree.
5. The method according to claim 1, characterized in that The step of determining the target area template at least based on the matching degree includes: The target area template is determined based on the matching degree and a random sampling consensus algorithm.
6. The method according to claim 1, characterized in that The step of determining a posture estimation result of the target commodity at least based on the target area template includes: Determining orientation information of the target product in the actual scene image based on the target area template; Determine a normal vector of a position to be grasped based on the obtained depth map of the actual scene, where the position to be grasped is related to the position of the target product; A posture estimation result of the target product is determined based on the normal vector and the orientation information of the target product.
7. The method according to claim 1, characterized in that The robot has a mechanical arm, and the method of assisting the robot in operating the target commodity based on the posture estimation result includes: Converting the posture estimation result into data in the coordinate system of the robotic arm; The robot is controlled to operate the target product based on the converted data.
8. An electronic device, characterized in that: include: A training module, used for training a commodity recognition model that can at least recognize the type of commodity in a picture and the location characteristics of the area where the commodity is located, wherein the picture is obtained by taking a picture of the actual environment where the commodity is located; A first determination module is used to determine a local area template corresponding to each of the commodities, wherein the local area template is used to reflect the posture of the commodity in the actual environment at different observation angles; An acquisition module, used to input an actual scene picture containing a target commodity into the commodity recognition model, and obtain the type of the target commodity output by the commodity recognition model and the regional position of the target commodity in the actual scene picture; A second determination module, configured to determine a target area template matching the target product according to the type and area location of the target product; A third determination module, configured to determine a posture estimation result of the target commodity based at least on the target area template; A fourth determination module, used to assist the robot in operating the target commodity according to the posture estimation result; A second obtaining module is used to obtain a first number of the pictures and mark the types and outlines of the commodities in the pictures; a processing module, processing the first number of pictures based on a target processing method to generate a second number of pictures, wherein the target processing method includes one or more of a data synthesis method for synthesizing new pictures, a method of scaling the size of goods in the pictures to generate new pictures, and a method of changing the position and posture of goods in the pictures to generate new pictures; The training module is further used to adjust the size of the second number of pictures; Determining detection areas on the adjusted second number of images with a fixed ratio and size standard; Training a neural network model using the second number of pictures in which the detection areas are determined to be present, so that the neural network model can identify whether the commodity is present in each of the detection areas; The detection areas judged by the neural network model to contain the product are merged using a non-maximum suppression algorithm and input into the neural network model to train the neural network model's ability to recognize the type of product in the merged detection areas and the location of the product, thereby forming a product recognition model that can determine the type of product in the image and the location of the product in the image.
Citation Information
Patent Citations
Robot control apparatus, robot control method and robot system
CN106945035A
Robot intelligent grabbing control method and system based on 3D vision
CN111275063A
