Weight estimation device and teaching data generation method

The weight estimation device uses RGB and stereo cameras with a machine learning model to process color and depth images, addressing the challenge of estimating weights for non-solid objects with varying distances, enhancing accuracy.

JP2024140129AActive Publication Date: 2024-10-10PRIVATECH CO LTD +2
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
JP2023051129
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2024-10-10
Estimated Expiration
2043-03-28

AI Technical Summary

Technical Problem

Existing weight estimation devices struggle to accurately estimate the weight of objects with non-solid shapes or varying distances from the imaging unit, particularly for items like leafy vegetables, due to shape instability and fixed imaging distances.

Method used

A weight estimation device using an RGB camera and a stereo camera to capture color and depth images, combined with a machine learning model, which processes these images to estimate weight accurately by incorporating depth information and adjusting for varying object distances.

Benefits of technology

The device can accurately estimate the weight of objects with non-solid shapes and varying distances from the imaging unit, improving estimation accuracy by utilizing both color and depth data in the machine learning model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024140129000001_ABST
    Figure 2024140129000001_ABST
Patent Text Reader

Abstract

To provide a weight estimation device that can appropriately estimate the weight of an object even if the object is not limited to a solid body and even if the distance to the object is not fixed.SOLUTION: A weight estimation device 10 comprises: a machine learning model 22 that has been machine-learned so that it can estimate the weight of an object 12 on the basis of a color image and a depth data image created by an RGB camera 14a and a stereo camera 14b, respectively, for the object 12; and a weight estimation unit 18 that estimates the weight of the object 12 by using the machine learning model 22.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a weight estimation device that estimates the weight of an object in an image, and a method for creating training data used in machine learning for weight estimation. [Background technology]

[0002] Conventionally, there is known a device that can estimate the weight or mass of an object by capturing an image of the object using an imaging device. The weight of the object is estimated using a determination device using an image processing technique or a machine learning model.

[0003] For example, the mass estimation device in Patent Document 1 includes a conveying unit having a conveying surface for conveying an object to be estimated, an imaging unit fixed above the conveying unit, and a calculation unit connected to the imaging unit. When a certain amount of food scattered on the conveying surface is conveyed and stopped, the calculation unit estimates a partial mass of the food on the conveying surface. In particular, the calculation unit estimates the mass of the food contained within a predetermined area defined by a position identification marker within the imaging field of view that can be imaged by the imaging unit.

[0004] The mass estimation algorithm uses a machine learning-based system that automatically constructs an estimation formula from past data. A convolutional neural network is used for the machine learning. In addition, since the position identification marker can identify which area of ​​the conveying surface the mass was measured in, it is easy to extract the required amount of the estimation target by accumulating the partially measured mass (Patent Document 1 / paragraphs 0023, 0024, 0037, Figures 1 and 2). [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Patent Publication No. 2021-139775 Summary of the Invention [Problem to be solved by the invention]

[0006] However, since Patent Document 1 is a method for estimating weight and the like by recognizing the overall shape from each viewpoint when the object is moved, there is a problem that it is difficult to accurately estimate physical quantities unless the object is a solid object with a solid shape. For example, leafy vegetables such as lettuce are fluffy and unstable in shape, and may have gaps inside. Therefore, even if the two-dimensional shape and size as seen from the imaging unit are the same, the weight may differ greatly.

[0007] Furthermore, the mass estimation device of Patent Document 1 images an object being transported on a transport surface when it reaches a predetermined position, so the distance between the imaging unit and the object when the image is captured is fixed. Therefore, when estimating the mass of an object where the distance between the imaging unit and the object is not fixed, the estimation accuracy is low.

[0008] The present invention has been made in consideration of the above circumstances, and aims to provide a weight estimation device and a teacher data creation method that can appropriately estimate the weight of an object, even if the object is not limited to a solid object and even if the distance to the object is not fixed. [Means for solving the problem]

[0009] The weight estimation device of the present invention comprises: an RGB camera capable of capturing a color image of an object; A stereo camera capable of capturing a depth data image including depth information to the object; A machine learning model that is trained to estimate the weight of the object based on the color image and the depth information of the object; a weight estimation unit that estimates a weight of the object using the machine learning model when the captured color image and the depth data image are input; It is equipped with:

[0010] The teaching data creation method of the present invention includes the steps of: A method for creating teacher data for machine learning from a color image of an object captured by an RGB camera and a depth data image including depth information to the object captured by a stereo camera, comprising: a first object extraction step of extracting a first image portion surrounding an outer periphery of the object from the color image; a first image pasting step of pasting the first image portion cut out by the first object cutting step, without processing, into a frame of a predetermined size; a second object extraction step of extracting a second image portion from the depth data image, the second image portion having the same shooting range as the first image portion; a second image pasting step of pasting the second image portion cut out by the second object cutting step, without processing, into a new frame of the predetermined size; It is equipped with: Effect of the Invention

[0011] According to the weight estimation device of the present invention, the machine learning model estimates the weight of the object using the depth data image in addition to the color image, which allows the weight of the object to be properly estimated even if the distance to the object is not fixed, and even if each part of the object is at a different distance from the imaging unit.

[0012] According to the teaching data creation method of the present invention, in creating machine learning data, first and second image portions that surround the periphery of the object and have the same shooting range are cut out from the color image and the depth data image, and are pasted into respective frames of the same predetermined size without processing, i.e., without normalizing the size. This makes it possible to generate an appropriate machine learning model for weight estimation even for an object whose distance from the RGB camera varies depending on the part. [Brief description of the drawings]

[0013] [Figure 1] FIG. 1 is a schematic diagram of a weight estimation device equipped with a machine learning model to estimate the weight of an object. [Diagram 2]This is a diagram showing the layout of a working device that creates color images and depth data images of training data when a machine learning model performs machine learning. [Diagram 3] FIG. 1 is a diagram showing various color images used as training data during machine learning of a machine learning model. [Figure 4] FIG. 1 shows pairwise color images and depth data images at multiple coordinate positions of an object. [Diagram 5] FIG. 13 shows color images of objects with different weights. [Figure 6] 11 is an explanatory diagram of a depth data interpolation process for a first depth data image. FIG. [Figure 7] 13 is an explanatory diagram of depth data interpolation processing for a second depth data image. FIG. [Figure 8] 13 is an explanatory diagram of depth data interpolation processing for a third depth data image. FIG. [Figure 9] 1 is a process diagram illustrating a process for extracting an image area of ​​an object from a color image to create final training data. [Figure 10] 13A to 13C are diagrams showing the process of pasting cut-out regions from a color image and a depth data image onto the corresponding canvases. [Figure 11] FIG. 11 is an explanatory diagram of the expansion of teacher data by increasing or decreasing the depth. [Figure 12] This is a graph examining the relationship between epoch and MSE and MAE when a machine learning model is trained. [Figure 13] This is a graph showing the relationship between Epoch and MSE and MAE when tuning of a specific Epoch in Figure 12 is performed separately from a specific number of times and machine learning is performed from the first time. [Figure 14] This is a graph that examines the relationship between Epoch and MSE and MAE when a machine learning model is trained on only RGB out of the pairwise RGB and depth. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] Hereinafter, an embodiment of the present invention will be described. It goes without saying that the present invention is not limited to the embodiment. Note that the same reference numerals will be used to designate components common to a plurality of embodiments.

[0015] (Embodiment) 1 is a schematic diagram of a weight estimation device 10 that estimates the weight of an object 12. The weight estimation device 10 includes a compound camera 14, a weight estimation unit 18, a weight display 20, and a machine learning model 22.

[0016] In this example, the object 12 is lettuce, a leafy vegetable. The overall color of this lettuce is almost entirely green (G). The fact that the object 12 is green is utilized in creating a mask 60a, which will be described later. The object 12, which is lettuce, has gaps inside, is fluffy overall, and is unstable in shape and size compared to solid objects. It is difficult to estimate the weight of such an object 12 compared to a solid object. The weight estimation device 10 constructs a machine learning model 22 that can appropriately perform weight estimation even for an object 12 such as lettuce.

[0017] The compound camera 14 includes an RGB camera 14a and a stereo camera 14b. As the compound camera 14, for example, a commercially available camera known as RealSense (registered trademark), which is a depth camera manufactured by Intel (registered trademark), can be used.

[0018] The RGB camera 14a and the stereo camera 14b generate a color image (specifically, composed of three images of red R, green G, and blue B) and a depth data image, respectively. The weight estimation unit 18 detects the coordinate position of each part of the object 12 in the visual coordinate space 16 of the compound camera 14 based on the color image and the depth data image.

[0019] In the figure, for the sake of simplicity, the X-axis, Y-axis, and Z-axis in the visual coordinate space 16 are drawn in Cartesian coordinates. However, in detail, the coordinate position detected by the compound camera 14 for each part of the subject in the visual coordinate space 16 is the coordinate position assigned to the angle portion that the photographed part of each pixel occupies in the horizontal direction, the front-back direction (depth direction), and the vertical direction by dividing the visual angle in the horizontal direction, the front-back direction (depth direction), and the vertical direction as seen from the compound camera 14 by an angle corresponding to one pixel of the RGB camera 14a or the stereo camera 14b.

[0020] The weight estimation unit 18 detects the X and Z coordinates of each part of the object 12 as a subject from the color image of the object 12, and detects the Y coordinate (depth) of each part of the object 12 as a subject from the depth data image of the object 12. In detail, the color image has data of three colors, R (red), G (green), and B (blue), for each coordinate position corresponding to the pixel of the RGB camera 14a.

[0021] In this example, the pixels of the RGB camera 14a and the pixels of the stereo camera 14b correspond to each other in a 1:1 relationship. However, the correspondence between the pixels of the RGB camera 14a and the pixels of the stereo camera 14b may be a 1:multiple or multiple:1 relationship. When the correspondence between the pixels of the RGB camera 14a and the pixels of the stereo camera 14b is 1:multiple, the depth (distance from the compound camera 14) of the area corresponding to each pixel of the RGB camera 14a in the color image is determined to be any one of the depths of the multiple corresponding pixels in the stereo camera 14b (e.g., minimum depth, average depth, maximum depth, or arbitrary). When the correspondence between the pixels of the RGB camera 14a and the pixels of the stereo camera 14b is multiple:1, the depth of the area corresponding to the multiple pixels of the RGB camera 14a in the color image is commonly determined to be the depth of one pixel in the stereo camera 14b corresponding to the multiple pixels.

[0022] The machine learning model 22 is constructed by machine learning based on color images and depth data images that are prepared in advance as training data, that is, the machine learning model 22 is incorporated into the weight estimation device 10 as a trained AI model.

[0023] The weight estimation unit 18 uses a machine learning model 22 to estimate the weight of the object 12 based on a color image and a depth data image of the object 12 whose weight is to be estimated.

[0024] The weight display device 20 has an object display section 20a and a weight display section 20b. The object display section 20a displays an image of the object 12 cut out from the color image generated by the RGB camera 14a. The weight display section 20b displays an estimated weight of the object 12 displayed on the object display section 20a.

[0025] (Teacher data) 2 is a layout diagram of a working device that creates color images and depth data images of teacher data (an example of data for machine learning) when machine learning is performed by the machine learning model 22. In order to create color images and depth data images of teacher data used for machine learning in the machine learning model 22, it is necessary to prepare a sufficient number of color images and depth data images of the object 48, whose parameters of relative position, size, shape, and weight in the visual coordinate space 16 are appropriately distributed within expected ranges for the object 12 whose weight is estimated by the weight estimation device 10.

[0026] It is not essential to detect the relative position of the object 12 in the visual coordinate space 16. This is because the object 12 is not extracted from the color image and the depth data image based on the relative position, but is extracted based on a judgment of which image portion of the object 12 is included in the color image and the depth data image. However, the "appearance variations" obtained by capturing the object 12 at different relative positions from the compound camera 14 are useful as training data.

[0027] The object 12 in Fig. 1 is an object whose weight is actually estimated by the weight estimation device 10. In contrast, the object 48 in Fig. 2 is an object for creating training data when machine learning is performed by the machine learning model 22. The object 48 is of the same type as the object 12 (e.g., lettuce), and is prepared for machine learning with each parameter (e.g., shape, size, weight, and coordinate position) widely distributed within the value range expected for the object 12 whose weight is to be estimated.

[0028] The X-axis, Y-axis, and Z-axis in Fig. 2 correspond to the X-axis, Y-axis, and Z-axis in the field of view coordinate space 16 in Fig. 1. In Fig. 1, the compound camera 14 is fixed in position, and the object 12 has various relative positions with respect to the compound camera 14. In contrast, in Fig. 2, the object 48 is fixed in position, and the compound camera 14 is adapted to change position with respect to the object 48 in a fixed position.

[0029] The camera stand 30 comprises a base 32 placed on the floor 28 so as to be movable in the X-axis and Y-axis directions, a strut 34 erected on the base 32, a vertical pipe 38 whose protrusion from the strut 34 is freely adjustable in the Z-axis direction, a horizontal pipe 40 fixed to the upper end of the vertical pipe 38, and the horizontal pipe 40 supported by a vertical head 36 so as to be freely displaced in the Y-axis direction. 24 is attached to the tip of the horizontal pipe 40 with the lens facing downward.

[0030] A rectangular nonwoven fabric 44 is placed on the floor 28 below the compound camera 14. A piece of construction paper 46 has the same shape and size as the nonwoven fabric 44 and is laid on top of the nonwoven fabric 44. An object 48 is placed at the center of the top surface of the construction paper 46.

[0031] The light stand 50 has a lamp 52 facing downward at its upper end. The light stand 50 is placed on the floor 28 outside the construction paper 46 so that the lamp 52 is directly above the center of the construction paper 46. The lamp 52 irradiates light toward the construction paper 46 so that the entire construction paper 46 has a substantially uniform brightness.

[0032] To create a color image and a depth data image of the teacher data, the worker places the object 48 at the center of the construction paper 46, moves the base 32 of the camera stand 30 in the X-axis and Y-axis directions, and displaces the vertical head 36 in the Z-axis direction. The orientation of the compound camera 14 is maintained directly below. In this way, the relative position between the compound camera 14 and the object 48 changes in various ways. The worker operates the compound camera 14 at multiple relative positions between the compound camera 14 and the object 48, and creates paired color images and depth data images of the same object 48 at different relative positions as teacher data.

[0033] After creating training data for one object 48, the worker changes the object 48 to another object 48 having different parameters (e.g., shape, size, weight) or their values, and creates training data in the same manner. The training data created in this way is used for machine learning in the machine learning model 22.

[0034] (Color image / position for training data) Fig. 3 is a diagram showing various color images used as training data during machine learning of the machine learning model 22. Note that, although each color image shown in Fig. 3 is one, the color image is actually composed of three images of red R, green G, and blue B. In the drawing, for the sake of simplicity, the three images of red R, green G, and blue B are shown as one image.

[0035] For the object 48 to be used as training data for generating a learning model for estimating the weight of the object 12, it is preferable to collect a sufficient number of captured images (color images and depth data images) as training data, in which the essential parameter is weight and the value range of each parameter, including multiple other parameters (e.g., shape and size), is widely distributed.

[0036] Then, for each object 48, a color image and a depth data image of the teacher data are created at various coordinate positions within the visual field coordinate space 58. In the drawings, the color images are shown in grayscale.

[0037] In FIG. 3, the field of view coordinate space 58 is defined for the compound camera 14 in FIG. 2, but is defined identically to the field of view coordinate space 16 in FIG. 1, assuming that the compound camera 14 is common to the compound camera 14 of the weight estimation device 10 in FIG. 1.

[0038] The X-axis, Y-axis, and Z-axis of the visual field coordinate space 58 in Fig. 3 correspond to the X-axis, Y-axis, and Z-axis in Fig. 2. The visual field coordinate space 58 is equally divided into three in the directions of the X-axis, Y-axis, and Z-axis. As a result, the visual field coordinate space 58 is divided into a total of 27 cell spaces, 3 x 3 x 3. To distinguish between the cell spaces, the subscripts a, b, and c are added to each cell space in the directions of the X-axis, Y-axis, and Z-axis from the side closest to the origin O. The coordinates of each cell space correspond to the coordinates of the center of the cell space.

[0039] When a portion corresponding to each pixel of the compound camera 14 is defined for the surface of the object 48 facing the compound camera 14, an X coordinate, a Y coordinate, and a Z coordinate are defined for each portion. The center coordinates of each cell space in FIG. 3 are used only to simply indicate the position of the object 48 in the photograph of the color image and the depth data image in the drawing, and in actual machine learning and weight estimation, the coordinates of each pixel as a portion of the surface of the object 12 or the object 48 are determined.

[0040] In the visual coordinate space 58, the coordinates of the cell space closest to the origin O are represented by (Xa, Ya, Za). The coordinates of the cell space farthest from the origin O are represented by (Xc, Yc, Zc). The coordinates of the cell space at the center of the visual coordinate space 58 are represented by (Xb, Yb, Zb).

[0041] 3, the compound camera 14 is placed on the (Xb, Ya, Zb) side of the visual field coordinate space 58 in the Y-axis direction, and the optical axis of the lens of the compound camera 14 is parallel to the Y-axis toward (Xb, Ya, Zb). Ya, Yb, and Yc are the distances on the optical axis from the compound camera 14, and are Y coordinates that are, for example, 42 cm, 47 cm, and 57 cm.

[0042] 3 is the same object 48, the size of the object 48 in the color image becomes larger when the object 48 is placed in the cell space closer to the compound camera 14. Also, the position of the object 48 in each color image moves to the right, left, up or down with respect to the center of the cell space (Xb, Yb, Zb) of the field of view coordinate space 58 as seen from the compound camera 14, depending on whether the object 48 is to the right, left, up or down.

[0043] (Pairwise color and depth images) Fig. 4 shows paired color images and depth data images at multiple coordinate positions of an object 48. The paired color images and depth data images refer to color images and depth data images captured simultaneously by the RGB camera 14a and the stereo camera 14b at the same coordinate position of the same object 48. In Fig. 4, the color images and depth data images at the same level in the vertical direction are in a paired relationship.

[0044] The color image is actually in color, but is shown in grayscale in Fig. 4. The depth data image is generated as a grayscale image without color in the illustration. The depth (distance) from the compound camera 14 to the object 48 is represented by the degree of gray of each part in the illustrated depth data image.

[0045] In each depth data image in Fig. 4, the depth acquisition unavailable area is black. The depth acquisition unavailable area is likely to occur in the back leaves that are in the shadow of the front leaves in the object 48 such as leafy vegetables. Since the depth data image having the depth acquisition unavailable area is not preferable as the training data, it is preferable to interpolate it by the appropriate depth data.

[0046] (Color image / weight for training data) 5 is a diagram showing color images of objects 48 with different weights. While keeping the object 48 in a predetermined cell space in the visual field coordinate space 58, the worker tears off the leaves of the object 48 (e.g., lettuce) little by little to reduce the weight stepwise, and create a total of four objects 48 with different weights (depth data images are omitted in FIG. 5).

[0047] In this example, the initial weight of the object 48 is 10.5g, and then changes to 7.5g, 5.5g, and 3.9g. At this time, not only the weight but also the size and shape of the object 48 change. If these four objects 48 with different weights are arranged in a total of nine cell spaces of the visual coordinate space 58, a total of 36 (=9×4) paired color images and depth data images can be added as teacher data. The total of nine in the visual coordinate space 58 means that the shooting positions of the compound camera 14 with respect to the object 48 are three, 42cm, 47cm, and 52cm in the Y-axis direction (depth direction), and three, left, center, and right in the X-axis direction (horizontal direction), and there are 3×3=9 combinations of relative positions.

[0048] (Depth data interpolation) 6-8 are explanatory diagrams of the depth data interpolation process for different depth data images. As mentioned above, in a depth data image, areas where depth data could not be acquired are displayed in black. A depth data image that remains black reduces the value of the training data. Depth data interpolation addresses this issue.

[0049] The feature of the depth data interpolation adopted in the embodiment is to use a mask derived from a color image. Specifically, for a paired color image and depth data image, a mask of the object 48 is created based on the color image, and the depth data image is divided into an object area (object area) within the mask and an object outside area (background area) outside the mask based on the created mask. Then, the missing values ​​(depth of the depth acquisition unavailable area) of the object area and the object outside area are interpolated based only on the depth (depth value) of the adjacent depth acquisition area only in the object area and the object outside area.

[0050] In Figures 6 to 8, the points of interest (e.g., the parts where interpolation processing is to be performed or has been performed) are circled. In Figures 6 and onwards, "RGB" means a color image, and "depth" means a depth data image.

[0051] In Fig. 6 to Fig. 8, the images are arranged in three vertical rows. Of the three rows, the image in the first row from the top is a color image, and the images in the second and third rows are depth data images that are paired with the color image in the first row. The depth data image in the second row is the depth data image as it is output from the image captured by the stereo camera 14b, that is, before depth interpolation processing. The two images in the third row are depth data images after depth interpolation is performed on the depth data image in the second row. The depth data images on the left and right sides are the result data obtained by performing the interpolation processing of distant view extension interpolation and object interior interpolation, respectively.

[0052] In Fig. 6, a depth acquisition unavailable region occurs in the color image to the left of the object 48. In Fig. 7, a depth acquisition unavailable region occurs in the part of the rear leaf of the object 48 that is hidden by the front leaf.

[0053] In FIG. 8, the object 48 is placed in a transparent glass cup and photographed from the open side of the glass cup. The light is reflected by the glass cup, and the area where the incident light and reflected light are mixed is the depth acquisition unavailable area. Note that in FIG. 8, the object 48 is placed in the glass cup, but this is because the object 48 is small in size and would fall over, so the glass cup is used to photograph the object 48 in an upright position. Even if the object 48 is photographed in a glass cup, the depth acquisition unavailable area can be interpolated.

[0054] In distant view extended interpolation (the left image of the two images in the bottom row of Figs. 6-8), the black area of ​​the depth acquisition impossible area (the image before interpolation in the second row from the top) is changed to a shade equal to the shade of the depth area of ​​the depth acquisition area adjacent to the black area. In Figs. 6 and 7, the dashed circle is a mark added to draw attention to the depth acquisition impossible area.

[0055] In Fig. 8, an object 48 is placed in a cup. In each image in Fig. 8, two objects 48 are included, a large one on the left and a small one on the right. The reason is that the object 48 is actually located on the right, but is small and difficult to see, so it has been enlarged to make it easier to see as the object 48 on the left.

[0056] In the background extension interpolation, each black region is surrounded by a plurality of depth acquisition regions with different depths. In the background interpolation, each depth acquisition unavailable region is changed by interpolation to the depth of one of the plurality of depth acquisition regions with different depths surrounding it. For example, each depth acquisition unavailable region may be interpolated to change to the maximum depth, minimum depth, or average depth of the plurality of depth acquisition regions with different depths surrounding it. Furthermore, the depth of each position in each depth acquisition unavailable region may be interpolated to change to the depth of the adjacent depth acquisition region closest to the position.

[0057] In the object interior interpolation (the right image of the two images in the bottom row of Figs. 6-8), a mask is used. The mask uses the circumferential contour of the object 48 from the color image as the boundary line, and the inside of the boundary line as the interpolation processing area. In the embodiment, lettuce is selected as the object 48 as an example. Since lettuce is green, when creating a mask, for example, pixels with a certain or higher ratio of G from the R:G:B ratio in pixel (picture element) are simply set as pixels where the object 48 exists, and the area of ​​the pixels is used as the mask. In addition, a mask can also be created using a model (such as semantic segmentation) that detects an object area in an input image and outputs a label of the object detected for each pixel.

[0058] In a specific example of object interior completion, (a) the entire depth data image is subjected to dilation processing using a square filter of a specified size to fill in areas with a value of zero (areas where depth cannot be acquired). Also, (b) pixels that originally had values ​​are overwritten with the values ​​before the dilation processing so that they do not change due to the dilation processing. Then, by repeating (a) and (b) above, all areas where depth cannot be acquired are completed. For areas where depth cannot be acquired, it is possible to select whether "the value changes due to the influence of the dilation processing with each repetition" or "once a value other than zero is entered, the value is fixed in the same way as areas where depth can be acquired" as the dilation processing is repeated, and which method is more appropriate depends on the situation and task.

[0059] (How to create teacher data) 9 is a process diagram for extracting the image area of ​​the object 48 from a color image to create the final training data. A cutout area 62a is determined in the color image using a mask 60a (the top image in FIG. 9). The cutout area 62a is defined as a rectangular area that is expanded by adding a margin of 20 pixels to the outside of each side of the smallest rectangle that contains the mask 60a.

[0060] The cropped area 62a in STEP 1, which is the second from the top in Fig. 9, is an enlarged version of the cropped area 62a in the first from the top in Fig. 9. In STEP 2, the cropped area 62a is cropped from the color image and pasted in the center of the canvas 64a. The canvas 64 has a pixel count of 480 x 480. The closer the object 48 in the color image is to the coordinate position of the compound camera 14, the larger the size of the color image and the larger the size of the cropped area 62a. The 480 x 480 size of the canvas 64 is set as a size that ensures that the cropped area 62a of the maximum expected size is pasted inside.

[0061] FIG. 10 shows STEPs 2 and 4, in which cut-out regions 62a and 62b cut out from a color image and a depth data image, respectively, are pasted onto corresponding canvases 64a and 64b. The color image includes images of three colors, R, G, and B, so the amount of information expressed in terms of length, width, and number of images is (480, 480, 3). The amount of information in a depth data image is expressed as (480, 480, 1). Therefore, one set of (480, 480, 4) constitutes one training data.

[0062] STEPs 1, 2, and 4 correspond to the first object cutting step, the first image pasting step, and the second image pasting step of the present invention, respectively. Although not shown, the second object cutting step of the present invention is merely a case where the cut-out area 62a in STEP 1 in Fig. 8 is replaced with a cut-out area for a depth data image. In addition, the mask for the depth data image commonly uses a mask 60a created by extracting a contour as an edge by differential processing of a color image of a predetermined color (G in this embodiment).

[0063] (Expanding training data) FIG. 11 is an explanatory diagram of training data expansion (data expansion) by increasing or decreasing depth (increasing or decreasing distance). Data expansion is a method of padding data by using data obtained by applying transformation to original training data as training data. Generally, data expansion methods include (a) a method of performing learning with a data set in which the amount of data is increased by adding data obtained by applying transformation to the original training data in advance to the training data, and (b) a method of using a generator that applies random transformation to the training data.

[0064] In (b), the number of original learning data is not changed, but instead a random transformation is performed on the original data for each epoch during learning. This allows the model to be given different data generated from the original data for each epoch. Typical examples of using generators include left-right flipping, where the probability of performing the process is 50% for each, and random shifting, where the entire image is translated in the vertical and horizontal directions by a range of -50 to +50 pixels. These are examples of binary selections or numerical values ​​with a range being set as parameters. In this case, different values ​​are randomly applied to each data within the same epoch.

[0065] In this embodiment, as a special example of data extension using the generator (b), the depth is increased or decreased by a setting value (random distance) randomly generated from the range of the original learning data -100 to +100 mm. Then, for the existing color image (original color image) and depth data image (original depth data image) in a paired relationship (image without distance correction in the center in the horizontal direction in FIG. 11), the distance of all pixels of the original depth data image is uniformly changed by the random distance, and the data of a new color image and a new depth data image (images of data extension at the left and right ends in the horizontal direction in FIG. 11) that are enlarged or reduced based on the changed distance are generated as extension data.

[0066] In detail, in Fig. 11, "RGB" and "depth" mean a color image and a depth data image, respectively. In addition, in the three columns of RGB and depth pairs in the left-right direction of Fig. 11, the center column (original) is the original image (an image generated from actual shooting by the compound camera 14). The images in the left column (-100 mm) and the right column (+100 mm) of the center column are newly created extended images based on the assumed size and shape of the object 48 when the compound camera 14 and the object 48 are moved 100 mm closer and farther away from each other than the original image.

[0067] In the expansion of the teacher data by increasing or decreasing the depth, the ratio Lb / La of the expanded distance (the distance between the compound camera 14 and the object 48 in the expanded image) Lb to the original distance (the distance between the compound camera 14 and the object 48 in the original image) La is multiplied by the original dimension (the dimension of the object 48 in the original image) of the object 48 to change the expanded dimension (the dimension of the object 48 in the image to be expanded of the teacher data). Therefore, the center coordinates of the original image and the expanded image are the same, and the shapes are similar.

[0068] The depth of the object 48 due to the depth increase or decrease is written into each depth data image. This is therefore distinct from the well-known expansion of training data by simply expanding and reducing the object 48 without changing the depth.

[0069] In this example, the training data is expanded only by increasing or decreasing the depth. However, the training data can be expanded by increasing or decreasing the depth in combination with one or more of the well-known training data expansions, such as image rotation, left / right translation, up / down translation, left / right flip, up / down flip, and brightness adjustment.

[0070] (Notes on data expansion) When applying well-known data augmentation, it is important to note that the target to be transformed must be appropriately selected depending on the nature of the method. For example, in data augmentation that focuses on the luminance of color images, such as adjusting brightness, it is inappropriate to transform only the color image and include the depth data image as a transformation target. On the other hand, in data augmentation that changes the concept of position, such as left-right flipping, random rotation, and translation, similar processing must be performed on the color image and the depth data image. Although not used this time, when using data augmentation that converts part of the data into random noise, such as random erasing, applying random values ​​independently to the color image and the depth data image, it is possible to infer the noise area from each other's information, which may improve the inference accuracy.

[0071] (verification) Figure 12 is a graph examining the relationship between epochs (number of epochs) and MSE (mean squared error; set as the loss function) and MAE (mean absolute error; equivalent to the error in grams of weight) when machine learning model 22 was trained. As mentioned above, the data used for training this time was obtained from a single plant by changing the photography method, removing leaves, etc. When training the model, in order to properly check the generalization performance, it was ensured that data from the same plant was not mixed between the training data and validation data.

[0072] In this machine learning, as shown below, learning was performed in two steps (steps R1 and R2), with 1000 epochs as one step. RMSprop was used as the optimizer in both steps R1 and R2, but the learning rate was set to 0.001 in step R1 and 0.1 times that of step R1, 0.0001, in step R2. Learning was performed for 1000 epochs in step R1, and the weights at the point where the loss value (MSE) for the validation data was minimized were saved. In step R2, the weight parameters saved in step R1 were set as the initial values ​​of the model, the optimizer settings were initialized, and re-learning was performed for 1000 epochs. The model equipped with the weight parameters at the point where the loss value for the validation data was minimized in step R2 was used as the final model for evaluation.

[0073] 12 to 14, the solid and dashed lines indicate the characteristics for the training data and the validation data, respectively. As the epoch progresses, the MSE and MAE of the validation data both exponentially decrease, indicating that the weight estimation device 10 can properly train the machine learning model 22. In the machine learning of FIG. 12, both pairwise RGB (color image) and depth (depth data image) are used as training data.

[0074] Figure 13 is a graph that examines the relationship between Epoch and MSE and MAE when machine learning is performed separately from Epoch=1 using the tuning of Epoch=735 in Figure 12 as the initial value. Note that the scale interval of the vertical axis in Figure 13 is wider than that in Figure 12. It can be seen that the learning effect is higher in Figure 13 than in Figure 12. Note that the reason why Epoch=735 was selected is that the loss (1.77) for the validation data for the 735 epoch model in step R1 was the smallest.

[0075] Fig. 14 is a graph showing the relationship between Epoch and MSE and MAE when machine learning model 22 is trained using only RGB out of the pairwise RGB and depth. Specifically, the same verification test as in Fig. 12 was performed.

[0076] To add a little more about Figure 14, training in step R2 (from 1001 epoch onwards) is actually performed using the weight parameters at 822 epoch, which had the smallest loss on the validation data among the 1000 epochs of step R1. Therefore, although it looks like 1000->1001 epochs are performed consecutively in Figure 14, in reality, after 1001 epoch, the training restarts with the weight parameters from 822 epochs. In the validation using only RGB images, steps R1 and R2 were performed consecutively, so the graphs are merged due to the continuous recording.

[0077] Comparing Fig. 14 with Fig. 12, for RGB+depth in Fig. 12, the loss is 0.79 from 735 epochs (step R1) -> +677 epochs (step R2). Also, for RGB only in Fig. 14, the loss is 1.47 from 822 epochs (step R1) -> +107 epochs (step R2). From the above, comparing the loss on the validation data, RGB+depth is much lower, which shows that the depth information contributes to improving generalization performance.

[0078] (Modification) The weight estimation device 10 estimates the weight of only one specific type of object 12 (e.g., lettuce). However, the weight estimation device of the present invention can estimate the weight of multiple types of objects as long as they are clearly distinguished by color (e.g., green lettuce, orange mandarins, purple eggplants, yellow bananas, and red apples).

[0079] The weight estimation device 10 estimates the weight of only one specific type of object 12 (e.g., lettuce). However, the weight estimation device 10 can also be used to estimate the weight of multiple types of object 12 (e.g., lettuce, broccoli, and Chinese cabbage) by providing multiple machine learning models 22 trained by machine learning for each type and allowing a person to manually switch between the machine learning models 22 corresponding to the different types of object 12. Of course, a single machine learning model can also be used to estimate the weight of multiple types of objects by training the single machine learning model on multiple types of objects.

[0080] In the weight estimation device 10, the background expansion interpolation and the object interior interpolation (FIGS. 6 to 8) are performed as the interpolation of the depth data image used as the teacher data during the machine learning of the machine learning model 22. In the weight estimation device of the present invention, during the actual weight estimation, the background expansion interpolation and the object interior interpolation processes can also be performed on the depth data image of the object (e.g., the object 12 of the weight estimation device 10) whose weight is to be estimated.

[0081] The weight estimation device may perform the interpolation during actual weight estimation only during actual weight estimation, not during learning. Alternatively, the weight estimation device may perform the interpolation on the depth data image both as teacher data during color image learning and during actual weight estimation. [Explanation of symbols]

[0082] 10···Weight estimation device, 12,48···Object, 14a···RGB camera, 14b··Stereo camera, 16···Viewing coordinate space, 18···Weight estimation unit, 22···Machine learning model, 60a···Mask, 62a···Cropped region, 64a···Canvas.

Claims

1. An RGB camera capable of capturing a color image of an object; A stereo camera capable of capturing a depth data image including depth information to the object; A machine learning model that is trained to estimate the weight of the object based on the color image and the depth information of the object; a weight estimation unit that estimates a weight of the object using the machine learning model when the captured color image and the depth data image are input; A weight estimation device comprising:

2. The weight estimation device of claim 1, wherein the machine learning of the machine learning model divides the depth data image into an area inside the object and an area outside the object based on a mask created from a color image that is paired with the depth data image, and uses a depth data image that is interpolated based on the depth of a depth acquisition area adjacent to the depth acquisition area in the object area as data for machine learning for the area inside the object where depth cannot be acquired.

3. The machine learning model is a random distance setting unit that sets the randomly generated increase or decrease distance as a random distance; an extended data generating unit which regards an existing paired color image and depth data image as an original color image and an original depth data image, respectively, and uniformly changes the depth of all pixels of the original depth data image by an amount corresponding to the random distance, and generates, as extended data, data corresponding to a new color image and a new depth data image obtained by enlarging or reducing the original color image and the original depth data image to a size corresponding to the changed depth; The weight estimation device according to claim 1 , comprising:

4. A method for creating teacher data for machine learning from a color image of an object captured by an RGB camera and a depth data image including depth information to the object captured by a stereo camera, comprising: a first object extraction step of extracting a first image portion surrounding an outer periphery of the object from the color image; a first image pasting step of pasting the first image portion cut out by the first object cutting step, without processing, into a frame of a predetermined size; a second object extraction step of extracting a second image portion from the depth data image, the second image portion having the same shooting range as the first image portion; a second image pasting step of pasting the second image portion cut out by the second object cutting step, without processing, into a new frame of the predetermined size; A teacher data creation method comprising:

5. The training data creation method of claim 4, wherein the machine learning data includes data corresponding to new color images and new depth data images obtained by uniformly increasing or decreasing the depth of all pixels of an existing paired color image and depth data image by an amount equivalent to a randomly generated random distance, and enlarging or reducing the original color image and original depth data image to a size corresponding to the changed depth, as extended data.

Citation Information

Patent Citations

  • Real-time 3d reconstruction using power-efficient depth sensors

    JP2016514384A

  • Work-piece information processing system and work-piece recognition method

    JP2019057250A

  • Image processing device, content processing device, content processing system, and image processing method

    JP2019114842A

  • Image processing apparatus, image processing method, and program

    JP2019192022A

  • Recognition method and recognition device of head-forming center of head-forming vegetable, and harvester

    JP2020155060A