Method, system and device for generating image of disorderly stacked packages
By generating simulated packages and automatically stacking, photographing and labeling them in an orderly manner, it solves the problem in the existing technology that the image generation of disorderly stacked packages relies on manual labor, and achieves efficient and automatic image generation and neural network model training.
Patent Information
- Application Number
- PCT/CN2024/073631
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-06
- Filing Date
- 2024-01-23
- Publication Date
- 2024-09-12
AI Technical Summary
In the existing disorderly stacked package grabbing system based on machine vision, the generation of disordered stacked package images for neural network model training is too dependent on manual labor, which is time-consuming and labor-intensive.
By generating simulated packages based on pre-collected real package feature data, and using physics engine algorithms to perform disordered stacking operations, a virtual camera is called to take pictures to replace the background of the real logistics scene image, adjust brightness, and automatically mark the grabbing surface of the package.
It greatly reduces the dependence on manual work, improves the automation efficiency and accuracy of image generation, reduces the dependence on manual generated images, and improves the efficiency of neural network model training.
Smart Images

Figure CN2024073631_12092024_PF_FP_ABST
Abstract
Description
Method, system and device for generating disordered stacked package images Technical Field
[0001] The present invention belongs to the field of intelligent parcel sorting and image generation, and more specifically, relates to a method, system and device for generating images of disorderly stacked parcels with grab marks. Background Art
[0002] In recent years, with the rapid development of machine vision technology, its application in logistics and sorting has become increasingly widespread. Against this backdrop, machine vision-based grasping technology for randomly stacked packages has gradually become a research hotspot in the logistics and sorting field. Existing machine vision-based grasping systems for randomly stacked packages primarily consist of a controller, a robotic arm, and an image acquisition module. The image acquisition module is used to capture images of randomly stacked packages in real time. The controller, based on a neural network model deployed within it, processes these images to identify the graspable surfaces of the randomly stacked packages. It then controls the robotic arm to grasp the graspable packages, thereby enabling individual grasping of the randomly stacked packages.
[0003] The construction process of the neural network model used by the above-mentioned controller involves a model training phase. In the model training phase, a batch of disordered stacked package images with grasping marks are needed to train the neural network model to be trained, so that the actual output of the neural network model approaches the expected output. However, the existing disordered stacked package images used for neural network model training are too dependent on manual generation. Specifically, the generation phase of the disordered stacked package images further includes: first, stacking multiple packages in disorder; second, taking pictures of the disordered stacked packages with a 3D camera to obtain the disordered stacked package images to be marked; and finally, selecting the graspable surfaces of each graspable package in the marked disordered stacked package images based on human experience. It can be seen that the generation phase of the above-mentioned disordered stacked package images is highly dependent on manual labor and is time-consuming and labor-intensive.
[0004] Summary of the Invention
[0005] The purpose of the present invention is to solve the problem in the related art that the generation of disordered stacked package images with grab marks is too dependent on manual labor, which is time-consuming and labor-intensive.
[0006] In order to achieve the above objectives, the present invention provides a method, system and device for generating images of disorderly stacked packages with grab marks.
[0007] According to a first aspect of the present invention, a method for generating an image of unordered stacked packages with grab marks is provided, the method comprising the following steps:
[0008] Generate multiple simulated packages based on pre-collected real package feature data;
[0009] performing a disorderly stacking operation on the plurality of simulated packages;
[0010] Photograph multiple simulated packages stacked in disorder, replace the background of the photographed image with a selected real-world logistics scene image, and randomly adjust the brightness of the background-replaced image within a predetermined brightness adjustment range to obtain an image of the disordered stacked packages.
[0011] Mark the grabbable packages in the image of the disorderly stacked packages.
[0012] Preferably, generating a plurality of simulated packages based on pre-collected real package feature data includes:
[0013] Acquire feature data of a target real package, where the target real package is a rectangular package, and the feature data includes size data, color, and texture pattern of the target real package;
[0014] A simulated package is generated according to the characteristic data, and the simulated package is copied to obtain a plurality of simulated packages.
[0015] Preferably, the disorderly stacking operation on the multiple simulated packages is implemented based on a physical engine algorithm.
[0016] Preferably, the photographing of the plurality of simulated packages stacked in disorder is achieved by calling a virtual camera.
[0017] Preferably, the method for selecting the real logistics scene image includes:
[0018] Randomly select an image to be judged from the pre-established real logistics scene image library;
[0019] Determining the similarity between the portion of the current image to be judged that is intended to be used as the replacement background and the foreground of the image obtained by the photograph;
[0020] determining whether the similarity is within a predetermined similarity range,
[0021] If so, the current image to be judged is used.
[0022] If not, return to randomly select the next image to be judged.
[0023] Preferably, marking the grabbable packages in the image of the disorderly stacked packages includes:
[0024] Draw a line segment from the center point of the virtual camera to the currently traversed pixel point in the unordered stacked wrapped image;
[0025] Determining a target package that first intersects the line segment in the unordered stacked package image;
[0026] determining a gripping surface of the target package;
[0027] Determine whether the grasping surface is a graspable surface without grasping obstacles, and if so, convert the coordinates of the four vertices of the grasping surface in the camera coordinate system into coordinates in the image coordinate system;
[0028] The contour of the gripping surface is marked according to the coordinates of the four vertices of the gripping surface in the image coordinate system.
[0029] Preferably, the determining whether the grasping surface is a graspable surface without grasping obstacles comprises:
[0030] Acquire multiple pixel points in the grasping surface by using a uniform sampling method;
[0031] Draw a line segment from each pixel to the center point of the virtual camera;
[0032] According to the ray tracing algorithm, it is determined whether there is an obstacle on each line segment.
[0033] If there is no obstacle on each line segment, the grasping surface is judged to be a graspable surface.
[0034] Otherwise, the graspable surface is determined to be an ungraspable surface.
[0035] Preferably, the contour of the gripping surface is marked according to the coordinates of the four vertices of the gripping surface in the image coordinate system as follows:
[0036] A marking frame is formed on the contour of the grasping surface according to the coordinates of the four vertices of the grasping surface in the image coordinate system, and the color of the marking frame is a color that has never appeared in the image of the disordered stacked packages.
[0037] According to a second aspect of the present invention, a system for generating an image of unordered stacked packages with grab marks is provided, the system comprising the following functional modules:
[0038] A simulated package generation module is used to generate multiple simulated packages based on pre-collected real package feature data;
[0039] a disordered stacking implementation module, configured to perform a disordered stacking operation on the plurality of simulated packages;
[0040] The module for acquiring an image of disorderly stacked packages is configured to photograph multiple simulated packages stacked in disorder, replace the background of the photographed image with a selected image of a real logistics scene, and adjust the brightness of the image after background replacement within a predetermined brightness adjustment range to obtain an image of the disorderly stacked packages.
[0041] The package marking module is used to mark the grabbable packages in the image of the disorderly stacked packages.
[0042] According to a third aspect of the present invention, there is provided a device for generating an image of unordered stacked packages with grab marks, the device comprising a processor and a memory, wherein the processor implements any of the above-mentioned methods for generating an image of unordered stacked packages with grab marks when executing a computer program stored in the memory.
[0043] The beneficial effects of the present invention are:
[0044] The method for generating an image of disorderly stacked packages with grab marks of the present invention first generates multiple simulated packages based on pre-collected real package feature data; secondly, the multiple simulated packages are randomly stacked; thirdly, the multiple simulated packages are photographed, the background of the photographed image is replaced with a selected real logistics scene image, and the brightness of the background-replaced image is adjusted within a predetermined brightness adjustment range to obtain an image of the disorderly stacked packages; finally, grabbable packages in the image of the disorderly stacked packages are marked.
[0045] As can be seen from the above, the present invention provides a method for automatically generating images of randomly stacked packages. While the preparatory work required for implementing the present method relies heavily on manual labor—namely, the collection of real package feature data and the acquisition of images of actual logistics scenarios—during the actual implementation of the present method, all steps are automatically performed by a computer. Therefore, compared to related methods for generating images of randomly stacked packages with grab marks, the present method significantly reduces manual labor, saving time and effort.
[0046] The system and device for generating images of disordered stacked packages with grab marks of the present invention and the method for generating images of disordered stacked packages with grab marks described above belong to the same general inventive concept and have at least the same beneficial effects as the method for generating images of disordered stacked packages with grab marks described above. Such beneficial effects are not further elaborated herein.
[0047] Other features and advantages of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The present invention may be better understood by referring to the following description taken in conjunction with the accompanying drawings, in which the same or similar reference numerals are used throughout the drawings to designate the same or similar parts.
[0049] FIG1 shows a flowchart of a method for generating an image of unordered stacked packages with grab marks according to an embodiment of the present invention;
[0050] FIG2 shows a structural block diagram of a system for generating an image of unordered stacked packages with grab marks according to an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to enable those skilled in the art to more fully understand the technical solution of the present invention, the exemplary embodiments of the present invention will be described in more comprehensive and detailed in conjunction with the accompanying drawings below. Obviously, the one or more embodiments of the present invention described below are only one or more of the specific ways of implementing the technical solution of the present invention, and are not exhaustive. It should be understood that other ways belonging to a general inventive concept can be used to implement the technical solution of the present invention, and should not be limited by the exemplary embodiments described. Based on one or more embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention.
[0052] Embodiment: FIG1 shows a flowchart of a method for generating an image of a randomly stacked package with a grab mark according to an embodiment of the present invention. Referring to FIG1 , the method for generating an image of a randomly stacked package with a grab mark according to an embodiment of the present invention includes the following steps:
[0053] Step S100: generating multiple simulated packages based on pre-collected real package feature data;
[0054] Step S200: performing a disorderly stacking operation on the plurality of simulated packages;
[0055] Step S300: photographing a plurality of simulated packages stacked in disorder, replacing the background of the photographed image with a selected real logistics scene image, and randomly adjusting the brightness of the background-replaced image within a predetermined brightness adjustment range to obtain an image of the disordered stacked packages;
[0056] Step S400: Mark the grabbable packages in the image of the disorderly stacked packages.
[0057] The method for generating images of disordered stacked packages with grab marks according to an embodiment of the present invention, firstly, generates multiple simulated packages based on real package feature data to improve the authenticity of the final acquired image of the disordered stacked packages; secondly, replaces the background in the image acquired by photographing with a selected real logistics scene image to further improve the authenticity of the final acquired image of the disordered stacked packages; thirdly, performs random brightness adjustment on the image after background replacement within a predetermined brightness adjustment range, which not only improves the brightness adaptability of the corresponding neural network model obtained through training, but also enables the acquisition of multiple images of the disordered stacked packages through multiple brightness adjustments.
[0058] Furthermore, in the embodiment of the present invention, the step S100 of generating multiple simulated packages based on the pre-collected real package feature data includes:
[0059] Acquire feature data of a target real package, where the target real package is a rectangular package, and the feature data includes size data, color, and texture pattern of the target real package;
[0060] A simulated package is generated according to the characteristic data, and the simulated package is copied to obtain a plurality of simulated packages.
[0061] Furthermore, in an embodiment of the present invention, the disorderly stacking operation of the multiple simulated packages in step S200 is implemented based on physical engine software.
[0062] Furthermore, in step S300 of the embodiment of the present invention, taking photos of the plurality of simulated packages stacked in disorder is achieved by calling a virtual camera.
[0063] Furthermore, in step S300 of the embodiment of the present invention, the method for selecting the real logistics scene image includes:
[0064] Randomly select an image to be judged from the pre-established real logistics scene image library;
[0065] Determining the similarity between the portion of the current image to be judged that is intended to be used as the replacement background and the foreground of the image obtained by the photograph;
[0066] determining whether the similarity is within a predetermined similarity range,
[0067] If so, the current image to be judged is used.
[0068] If not, return to randomly select the next image to be judged.
[0069] Specifically, in an embodiment of the present invention, the similarity between the portion of the real logistics scene image intended to be used as a replacement background and the foreground of the image obtained by photographing should be within a predetermined similarity range. When the similarity is higher than the upper threshold of the similarity range or lower than the lower threshold of the similarity range, the corresponding disordered stacked package images obtained are not conducive to the training of the neural network model.
[0070] Furthermore, in an embodiment of the present invention, the step S400 of marking the grabbable packages in the image of the disordered stacked packages includes:
[0071] Draw a line segment from the center point of the virtual camera to the currently traversed pixel point in the unordered stacked wrapped image;
[0072] Determining a target package that first intersects the line segment in the unordered stacked package image;
[0073] determining a gripping surface of the target package;
[0074] Determine whether the grasping surface is a graspable surface without grasping obstacles. If so, convert the coordinates of the four vertices of the grasping surface in the camera coordinate system into coordinates in the image coordinate system, and mark the contour of the grasping surface according to the coordinates of the four vertices of the grasping surface in the image coordinate system.
[0075] If not, traverse the next pixel in the unordered stacked wrapping image.
[0076] Specifically, in an embodiment of the present invention, during the execution of step S400, it is necessary to perform traversal calculations on each pixel point in the disordered stacked package image, that is, to draw a line segment from the center point of the virtual camera to each pixel point in the disordered stacked package image, and perform corresponding subsequent operations.
[0077] Specifically, in the embodiment of the present invention, the virtual camera is a 3D virtual camera, the center point of the virtual camera is the center point of the camera coordinate system, the camera coordinate system is a 3D coordinate system, and the image coordinate system is a 2D coordinate system.
[0078] Furthermore, in an embodiment of the present invention, determining whether the grasping surface is a graspable surface without grasping obstacles includes:
[0079] Acquire multiple pixel points in the grasping surface by using a uniform sampling method;
[0080] Draw a line segment from each pixel to the center point of the virtual camera;
[0081] According to the ray tracing algorithm, it is determined whether there is an obstacle on each line segment.
[0082] If there is no obstacle on each line segment, the grasping surface is judged to be a graspable surface.
[0083] Otherwise, the graspable surface is determined to be an ungraspable surface.
[0084] Furthermore, in an embodiment of the present invention, marking the contour of the gripping surface according to the coordinates of the four vertices of the gripping surface in the image coordinate system is specifically as follows:
[0085] A marking frame is formed on the contour of the grasping surface according to the coordinates of the four vertices of the grasping surface in the image coordinate system, and the color of the marking frame is a color that has never appeared in the image of the disordered stacked packages.
[0086] Each step of the method for generating images of randomly stacked packages with grab marks in the embodiment of the present invention is completed automatically. Compared with related art methods for generating images of randomly stacked packages with grab marks, the method of the embodiment of the present invention significantly reduces reliance on manual labor, saving time and effort. Furthermore, the marking of grabbable packages in the images of randomly stacked packages is implemented based on a corresponding algorithm. Compared with the related art method of manually selecting packages based on human experience, the resulting images of randomly stacked packages have higher sample accuracy and are more conducive to training the corresponding neural network model.
[0087] Accordingly, based on the method for generating images of disorderly stacked packages with grab marks proposed in an embodiment of the present invention, an embodiment of the present invention further proposes a system for generating images of disorderly stacked packages with grab marks.
[0088] FIG2 shows a block diagram of a system for generating images of disorderly stacked packages with grab marks according to an embodiment of the present invention. Referring to FIG2 , the system for generating images of disorderly stacked packages with grab marks according to an embodiment of the present invention includes the following functional modules:
[0089] A simulated package generation module is used to generate multiple simulated packages based on pre-collected real package feature data;
[0090] a disordered stacking implementation module, configured to perform a disordered stacking operation on the plurality of simulated packages;
[0091] The module for acquiring an image of disorderly stacked packages is used to photograph multiple simulated packages stacked in disorder, replace the background of the photographed image with a selected real logistics scene image, and randomly adjust the brightness of the background-replaced image within a predetermined brightness adjustment range to obtain an image of the disorderly stacked packages.
[0092] The package marking module is used to mark the grabbable packages in the image of the disorderly stacked packages.
[0093] Accordingly, based on the method for generating images of disordered stacked packages with grab marks proposed in an embodiment of the present invention, an embodiment of the present invention also proposes a device for generating images of disordered stacked packages with grab marks. The device includes a processor and a memory. When the processor executes a computer program stored in the memory, the method for generating images of disordered stacked packages with grab marks proposed in an embodiment of the present invention is implemented.
[0094] Although one or more embodiments of the present invention have been described above, it should be understood by those skilled in the art that the present invention can be implemented in any other form without departing from its spirit and scope. Therefore, the embodiments described above are illustrative and not restrictive, and many modifications and substitutions will be apparent to those skilled in the art without departing from the spirit and scope of the present invention as defined in the appended claims.
Claims
1. A method for generating an image of a disordered stacked package with grab marks, characterized in that: include: Generate multiple simulated packages based on pre-collected real package feature data; Performing a disorderly stacking operation on the plurality of simulated packages; Taking photos of multiple simulated packages stacked in disorder, replacing the background of the image obtained by taking photos with a selected real logistics scene image, and randomly adjusting the brightness of the image after background replacement within a predetermined brightness adjustment range to obtain an image of the disorderly stacked packages; Marking the grabbable packages in the image of the disorderly stacked packages; Wherein, taking photos of the plurality of simulated packages stacked in disorder is achieved by calling a virtual camera; The marking of the grabbable packages in the image of the disorderly stacked packages comprises: Draw a line segment from the center point of the virtual camera to the currently traversed pixel point in the unordered stacked wrapped image; Determine a target package in the unordered stacked package image that first intersects the line segment; determining a gripping surface of the target package; Determine whether the grasping surface is a graspable surface without grasping obstacles, and if so, convert the coordinates of the four vertices of the grasping surface in the camera coordinate system into coordinates in the image coordinate system; Marking the contour of the grasping surface according to the coordinates of four vertices of the grasping surface in the image coordinate system; The determining whether the grasping surface is a graspable surface without grasping obstacles comprises: Acquire multiple pixel points in the grasping surface by uniform sampling; Draw a line segment from each pixel to the center point of the virtual camera; According to the ray tracing algorithm, it is determined whether there is an obstacle on each line segment. If there is no obstacle on each line segment, the grasping surface is judged to be a graspable surface. Otherwise, the graspable surface is determined to be an ungraspable surface.
2. The method for generating an image of a disorderly stacked package with grab marks according to claim 1, characterized in that: The generating of multiple simulated packages according to the pre-collected real package feature data comprises: Acquire feature data of a target real package, where the target real package is a rectangular package, and the feature data includes size data, color, and texture pattern of the target real package; A simulated package is generated according to the characteristic data, and the simulated package is copied to obtain a plurality of simulated packages.
3. The method for generating an image of disorderly stacked packages with grab marks according to claim 2, characterized in that: The disorderly stacking operation of the multiple simulated packages is implemented based on a physical engine algorithm.
4. The method for generating an image of disorderly stacked packages with grab marks according to claim 3, characterized in that: The method for selecting the real logistics scene image includes: Randomly select an image to be judged from the pre-established real logistics scene image library; Determine the similarity between the portion of the current image to be judged that is intended to be used as the replacement background and the foreground of the image acquired by the photograph; determining whether the similarity is within a predetermined similarity interval, If yes, then use the current image to be judged. If not, return to randomly select the next image to be judged.
5. The method for generating an image of disorderly stacked packages with grab marks according to claim 4, characterized in that: The outline of the grasping surface is marked according to the coordinates of the four vertices of the grasping surface in the image coordinate system as follows: A marking frame is formed on the contour of the grasping surface according to the coordinates of the four vertices of the grasping surface in the image coordinate system, and the color of the marking frame is a color that has never appeared in the disordered stacking package image.
6. A system for generating images of unordered stacked packages with grab marks, characterized in that: include: A simulated package generation module, used to generate multiple simulated packages based on pre-collected real package feature data; A disordered stacking implementation module, used for performing disordered stacking operations on the multiple simulated packages; The disorderly stacked package image acquisition module is used to take a photo of a plurality of simulated packages stacked in disorder, replace the background in the image acquired by taking the photo with a selected real logistics scene image, and adjust the brightness of the image after the background replacement within a predetermined brightness adjustment range to obtain an image of the disorderly stacked packages; A package marking module, used for marking the grabbable packages in the image of the disorderly stacked packages; Wherein, taking photos of the plurality of simulated packages stacked in disorder is achieved by calling a virtual camera; The marking of the grabbable packages in the image of the disorderly stacked packages comprises: Draw a line segment from the center point of the virtual camera to the currently traversed pixel point in the unordered stacked wrapped image; Determine a target package in the unordered stacked package image that first intersects the line segment; determining a gripping surface of the target package; Determine whether the grasping surface is a graspable surface without grasping obstacles, and if so, convert the coordinates of the four vertices of the grasping surface in the camera coordinate system into coordinates in the image coordinate system; Marking the contour of the grasping surface according to the coordinates of four vertices of the grasping surface in the image coordinate system; The determining whether the grasping surface is a graspable surface without grasping obstacles comprises: Acquire multiple pixel points in the grasping surface by uniform sampling; Draw a line segment from each pixel to the center point of the virtual camera; According to the ray tracing algorithm, it is determined whether there is an obstacle on each line segment. If there is no obstacle on each line segment, the grasping surface is judged to be a graspable surface. Otherwise, the graspable surface is determined to be an ungraspable surface.
7. A device for generating images of unordered stacked packages with grab marks, characterized in that: The method comprises a processor and a memory, wherein when the processor executes a computer program stored in the memory, the method for generating an image of an unordered stacked package with a grab mark as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
A virtual object grabbing recognition method and device
CN109840011A
Sample image processing method and device, electronic equipment and storage medium
CN112132213A
Multi-mode grabbing obstacle avoidance detection optimization method based on drop point area detection
CN113538459A
Recognition, positioning and grabbing method for grabbable planar objects in scattered stacking state
CN113935368A
Method, system and equipment for generating disorderly stacked package image
CN116416217A
