Bounding box generation method, device, electronic device and computer readable medium
By generating point cloud groups and filtering point clouds to build a tree model, the problem of inaccurate positioning of the deep learning network in bounding box generation is solved, improving task efficiency and the accuracy of the bounding box.
Patent Information
- Application Number
- CN202110348075.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-03-31
AI Technical Summary
Existing deep learning networks are difficult to accurately locate target items when generating bounding boxes, resulting in low task efficiency.
By detecting target images, generating point cloud sets, determining point cloud sets related to items, building a tree model, filtering point clouds that meet the conditions, and generating more relevant bounding boxes, thereby improving the accuracy of the bounding boxes.
It achieves more accurate bounding box generation, improves task completion efficiency, and ensures the accuracy of item positioning.
Smart Images

Figure CN113160324B
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, electronic device, and computer-readable medium for generating a bounding box. Background Art
[0002] Currently, there are many tasks involving vision-based target recognition and positioning, such as robotic arm palletizing, robotic arm box picking, robotic arm assembly line operation, vision-based navigation and positioning, etc. These tasks often require predicting the target bounding box of related objects for subsequent tasks.
[0003] The method usually used to generate the target bounding box is to input the target image into a pre-trained deep learning network and output the relevant information of the bounding box. However, when using the above method to segment the image, the following technical problems often occur:
[0004] The bounding box input to the output of the deep network often cannot effectively locate the objects involved in the task more accurately, resulting in low efficiency in completing the task. Summary of the invention
[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0006] Some embodiments of the present disclosure propose a method, an apparatus, an electronic device, and a computer-readable medium for generating a bounding box to solve one or more of the technical problems mentioned in the above background technology section.
[0007] In a first aspect, some embodiments of the present disclosure provide a method for generating a bounding box, comprising: in response to detecting the presence of various objects related to a target image, determining at least one bounding box on the target image, wherein the bounding box in the at least one bounding box represents the position information of an object among the various objects related to the target image; generating a point cloud set related to each bounding box in the at least one bounding box to obtain a point cloud set group; determining at least one point cloud related to each of the various objects in each point cloud set in the point cloud set group as a first target point cloud set to obtain a first target point cloud set group; determining the bounding box associated with each first target point cloud set in the first target point cloud set group as a target bounding box to obtain a target bounding box set.
[0008] Optionally, the generating of the point cloud set associated with each of the at least one bounding box comprises: generating the point cloud set associated with each of the at least one bounding box using an extrinsic parameter matrix of the camera.
[0009] Optionally, the above-mentioned determining at least one point cloud in each point cloud set in the above-mentioned point cloud set group and related to each of the above-mentioned items as the first target point cloud set includes: determining the center point of the bounding box related to the above-mentioned point cloud set; selecting at least one point cloud in the above-mentioned point cloud set adjacent to the above-mentioned center point as the second target point cloud set; and generating the above-mentioned first target point cloud set based on the above-mentioned second target point cloud set.
[0010] Optionally, the above-mentioned selecting at least one point cloud in the above-mentioned point cloud set and adjacent to the above-mentioned center point as the second target point cloud set includes: constructing a tree model related to the above-mentioned point cloud set; and selecting at least one point cloud in the above-mentioned point cloud set and adjacent to the above-mentioned center point as the above-mentioned second target point cloud set based on the above-mentioned tree model.
[0011] Optionally, the method further includes: adding relevant information of the center point to the first list.
[0012] Optionally, the generation of the first target point cloud set according to the second target point cloud set includes: for each center point associated with the first list, performing the following first target point cloud set generation steps: in response to the presence of a traversed second target point cloud in the second target point cloud set, removing the traversed second target point cloud in the second target point cloud set to obtain a third target point cloud set; in response to determining that the third target point cloud satisfies a target condition group in the third target point cloud set, screening at least one point cloud satisfying the target condition group from the third target point cloud set as a fourth target point cloud set, wherein the target condition group includes: a normal angle between the point cloud and the center point is less than a first threshold, and a curvature between the point cloud and the center point is less than a second threshold; adding relevant information of each fourth target point cloud in the fourth target point cloud set to the first list and the second list respectively; removing relevant information of the center point from the first list; in response to the second target point cloud in the second target point cloud set being a traversed point cloud and / or the first list not containing at least one associated point cloud, determining the point cloud set corresponding to the second list as the first target point cloud set.
[0013] Optionally, the method further includes: in response to the existence of at least one point cloud associated with the first list, determining each point cloud in the at least one point cloud associated with the first list as a center point, and continuing the target point cloud set generation step.
[0014] Optionally, in response to the existence of the traversed second target point cloud in the second target point cloud set, after removing the traversed second target point cloud in the second target point cloud set to obtain the third target point cloud set, the method further includes: in response to the absence of the traversed second target point cloud in the second target point cloud set, determining the second target point cloud set as the third target point cloud set.
[0015] Optionally, the method further includes: controlling relevant mechanical equipment to carry the above-mentioned objects according to the above-mentioned target bounding box set.
[0016] In a second aspect, some embodiments of the present disclosure provide a bounding box generation device, comprising: a first determination unit, configured to determine at least one bounding box on the target image in response to detecting the presence of various objects related to the target image, wherein the bounding box in the at least one bounding box represents the position information of the objects in the various objects related to the target image; a generation unit, configured to generate a point cloud set related to each bounding box in the at least one bounding box to obtain a point cloud set group; a second determination unit, configured to determine at least one point cloud related to each of the various objects in each point cloud set in the point cloud set group as a first target point cloud set to obtain a first target point cloud set group; a third determination unit, configured to determine the bounding box associated with each first target point cloud set in the first target point cloud set group as a target bounding box to obtain a target bounding box set.
[0017] Optionally, the generating unit is further configured to: generate a point cloud set related to each bounding box in the at least one bounding box using an external parameter matrix of the camera.
[0018] Optionally, the second determination unit is further configured to: determine the center point of the bounding box associated with the above-mentioned point cloud set; select at least one point cloud in the above-mentioned point cloud set that is adjacent to the above-mentioned center point as the second target point cloud set; and generate the above-mentioned first target point cloud set based on the above-mentioned second target point cloud set.
[0019] Optionally, the second determination unit is further configured to: construct a tree model related to the above-mentioned point cloud set; and select at least one point cloud in the above-mentioned point cloud set that is adjacent to the above-mentioned center point as the above-mentioned second target point cloud set based on the above-mentioned tree model.
[0020] Optionally, the second determining unit is further configured to: add the relevant information of the above-mentioned center point to the first list.
[0021] Optionally, the second determination unit is further configured to: for each center point associated with the above-mentioned first list, perform the following first target point cloud set generation step: in response to the existence of a traversed second target point cloud in the above-mentioned second target point cloud set, remove the traversed second target point cloud in the above-mentioned second target point cloud set to obtain a third target point cloud set; in response to determining that there is a third target point cloud that satisfies the target condition group in the above-mentioned third target point cloud set, filter at least one point cloud that satisfies the above-mentioned target condition group from the above-mentioned third target point cloud set as a fourth target point cloud set, wherein the above-mentioned target condition group includes: the normal angle between the point cloud and the above-mentioned center point is less than a first threshold, and the curvature between the point cloud and the above-mentioned center point is less than a second threshold; add relevant information of each fourth target point cloud in the above-mentioned fourth target point cloud set to the above-mentioned first list and the second list respectively; remove relevant information of the above-mentioned center point from the above-mentioned first list; in response to the second target point cloud in the above-mentioned second target point cloud set being a traversed point cloud and / or the above-mentioned first list does not have at least one associated point cloud, determine the point cloud set corresponding to the above-mentioned second list as the above-mentioned first target point cloud set.
[0022] Optionally, the apparatus further comprises: controlling relevant mechanical equipment to carry the above-mentioned objects according to the above-mentioned target bounding box set.
[0023] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0024] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
[0025] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the bounding box generation method of some embodiments of the present disclosure can accurately and effectively generate bounding boxes that are more relevant to each item. Specifically, the bounding boxes input to the output of the deep network often cannot more accurately and effectively locate the items involved in the task, resulting in low efficiency in completing the task. Based on this, the bounding box generation method of some embodiments of the present disclosure can first respond to the detection of the existence of various items related to the target image, and determine at least one bounding box on the above target image for subsequent generation of bounding boxes that are more associated with each item. Among them, the bounding box in the above at least one bounding box represents the location information of the items in the various items related to the above target image. Here, the approximate location information of each item related to the above target image is determined. Then, a point cloud set related to each bounding box in the above at least one bounding box is generated to obtain a point cloud set group. Here, by generating a point cloud set group, the three-dimensional structure information of the items corresponding to each bounding box can be roughly simulated, so as to be used for the subsequent generation of bounding boxes of items related to the target image. Furthermore, at least one point cloud in each point cloud set in the point cloud set group and related to each of the above-mentioned objects is determined as a first target point cloud set to accurately determine the three-dimensional structure information of each object, thereby obtaining a first target point cloud set group. Finally, a bounding box associated with each first target point cloud set in the first target point cloud set group is determined as a target bounding box to generate a bounding box that is more related to each object, thereby obtaining a target bounding box set. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0027] Figure 1 is a schematic diagram of an application scenario of a method for generating a bounding box according to some embodiments of the present disclosure;
[0028] Figure 2 is a flow chart of some embodiments of the bounding box generation method according to the present disclosure;
[0029] Figure 3-4 is a schematic diagram of a point cloud set in some embodiments of the bounding box generation method according to the present disclosure;
[0030] Figure 5 are flowcharts of other embodiments of the method for generating a bounding box according to the present disclosure;
[0031] Figure 6is a schematic structural diagram of some embodiments of the enclosing frame generating device according to the present disclosure;
[0032] Figure 7 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0033] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0034] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0035] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0036] It should be noted that the modifications of “one” and “plurality” mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as “one or more”.
[0037] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0038] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0039] Figure 1 It is a schematic diagram of an application scenario of the bounding box generation method according to some embodiments of the present disclosure.
[0040] exist Figure 1In the application scenario, the electronic device 101 may first determine at least one bounding box 103 on the target image 102 in response to detecting the existence of various objects related to the target image 102. The bounding boxes in the at least one bounding box 103 represent the position information of the objects in the various objects related to the target image 102. In this application scenario, the various objects include: object 1021 and object 1022. The at least one bounding box 103 includes: bounding box 1031 and bounding box 1032. Then, a point cloud set related to each bounding box in the at least one bounding box 103 is generated to obtain a point cloud set group 104. In this application scenario, the point cloud set group 104 includes: a point cloud set 1041 corresponding to the bounding box 1031 and a point cloud set 1042 corresponding to the bounding box 1032. Further, at least one point cloud in each point cloud set in the point cloud set group 104 and related to each of the various objects is determined as a first target point cloud set to obtain a first target point cloud set group 105. In this application scenario, the first target point cloud set 105 includes: a first target point cloud set 1051 corresponding to the object 1021, and a first target point cloud set 1052 corresponding to the object 1022. Finally, the bounding box associated with each first target point cloud set in the first target point cloud set 1052 is determined as a target bounding box, and a target bounding box set 106 is obtained. In this application scenario, the target bounding box set 106 includes: a bounding box 1061 corresponding to the object 1021, and a bounding box 1062 corresponding to the object 1022.
[0041] It should be noted that the electronic device 101 can be hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the electronic device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.
[0042] It should be understood that Figure 1 The number of electronic devices in the embodiment is only for illustration. Any number of electronic devices may be provided according to implementation requirements.
[0043] Continue to refer Figure 2 , shows a process 200 of some embodiments of the method for generating a bounding box according to the present disclosure. The method for generating a bounding box comprises the following steps:
[0044] Step 201: determine at least one bounding box on a target image.
[0045] In some embodiments, the execution body of the above-mentioned bounding box generation method (for example Figure 1 The electronic device shown in the figure can determine at least one bounding box on the target image. The bounding box in the at least one bounding box represents the location information of each item related to the target image. The target image can be an image obtained by the target camera taking pictures of the items stored in the transfer box. The transfer box can be a box for transporting goods. The shape of the bounding box is a shape suitable for grasping by related mechanical equipment, for example, the shape of the bounding box can be a rectangle.
[0046] As an example, the execution subject can determine the target image through the following steps:
[0047] The first step is to obtain the target image taken by the target camera.
[0048] The second step is to input the target image into a pre-trained target detection network to obtain at least one bounding box on the target image. The target detection network may include: SSD (Single Shot MultiBoxDetector) algorithm, R-CNN (Region-Convolutional Neural Networks) algorithm, Fast R-CNN (Fast Region-Convolutional Neural Networks) algorithm, SPP-NET (Spatial PyramidPooling Network) algorithm, YOLO (You Only Look Once) algorithm, FPN (Feature PyramidNetworks) algorithm, DCN (Deformable ConvNets) algorithm.
[0049] Step 202: Generate a point cloud set related to each bounding box in the at least one bounding box to obtain a point cloud set group.
[0050] In some embodiments, the execution entity may generate a point cloud set associated with each of the at least one bounding box to obtain a point cloud set group. The point cloud set associated with the bounding box may be a point cloud set of an object and a background corresponding to the bounding box. For example, the target image is an image of box A stored in box A. Relative to the bounding box of box A, the bounding box may be larger than the 2D contour range of box A. Therefore, the bounding box may contain part of the contents of box A. Therefore, the point cloud set associated with the bounding box may be a point cloud set of box A corresponding to the bounding box and part of the contents of box A.
[0051] As an example, the execution subject may first determine the content of the object and the background through the bounding box, and then generate a point cloud set related to each bounding box in the at least one bounding box by controlling the relevant laser device to scan.
[0052] As an example, the point cloud set associated with the above bounding box can be Figure 3 shown.
[0053] In some optional implementations of some embodiments, the execution subject may generate a point cloud set related to each bounding box in the at least one bounding box using an external parameter matrix of the camera. The external parameter matrix of the camera may be an external parameter matrix between a 2D camera and a 3D camera. The external parameter matrix of the camera may be preset.
[0054] Step 203 : determining at least one point cloud related to each of the above-mentioned objects in each point cloud set in the above-mentioned point cloud set group as a first target point cloud set, thereby obtaining a first target point cloud set group.
[0055] In some embodiments, the execution entity may determine at least one point cloud in each point cloud set in the point cloud set group that is related to each of the items as a first target point cloud set, to obtain a first target point cloud set group. As an example, the execution entity may determine the three-dimensional structure information of each item through a world coordinate system. Then, at least one point cloud in each point cloud set in the point cloud set group that is related to the three-dimensional structure information of each item is determined as a first target point cloud set, to obtain a first target point cloud set group. As another example, the execution entity may use a dense point cloud generation network to determine at least one point cloud in each point cloud set in the point cloud set group that is related to each of the items as a first target point cloud set, to obtain a first target point cloud set group. The dense point cloud generation network may be a dense point cloud generation network (DensePCR, Dense 3D Point CloudReconstruction).
[0056] As an example, the first target point cloud set can be Figure 4 shown.
[0057] In some optional implementations of some embodiments, determining at least one point cloud related to each of the objects in each point cloud set in the point cloud set group as the first target point cloud set may include the following steps:
[0058] The first step is to determine the center point of the bounding box related to the point cloud set, wherein the center point may be the coordinate information of the center position.
[0059] In the second step, at least one point cloud in the point cloud set that is adjacent to the center point is selected as the second target point cloud set. As an example, the execution subject may first calculate the cosine distance between two point clouds in the point cloud set to obtain a cosine distance set. Then, at least one point cloud in the point cloud set that has a cosine distance less than a predetermined threshold is selected as the second target point cloud set.
[0060] Step 3: Generate the first target point cloud set according to the second target point cloud set. As an example, the execution subject may generate the first target point cloud set according to the second target point cloud set in various ways.
[0061] Optionally, the selecting at least one point cloud in the point cloud set and adjacent to the center point as the second target point cloud set may include the following steps:
[0062] The first step is to construct a tree model related to the point cloud set. The tree model can be a kd tree (k-dtree). As an example, the execution subject can construct a tree model related to the point cloud set according to the construction method of the kd tree.
[0063] In the second step, according to the tree model, at least one point cloud in the point cloud set that is adjacent to the center point is selected as the second target point cloud set. As an example, the execution subject may select at least one point cloud in the point cloud set that is adjacent to the center point as the second target point cloud set by traversing the tree model.
[0064] Optionally, the above steps further include:
[0065] The execution subject adds the relevant information of the center point to a first list, wherein the first list may be a pre-established, empty list.
[0066] Optionally, generating the first target point cloud set according to the second target point cloud set may include the following steps:
[0067] For each center point associated with the first list, the following first target point cloud set generation step is performed:
[0068] The first sub-step is, in response to the presence of a traversed second target point cloud in the second target point cloud set, removing the traversed second target point cloud in the second target point cloud set to obtain a third target point cloud set. The traversed second target point cloud may be a point cloud that has been screened out from the tree model.
[0069] In the second sub-step, in response to determining that there is a third target point cloud satisfying the target condition group in the third target point cloud set, at least one point cloud satisfying the target condition group is selected from the third target point cloud set as a fourth target point cloud set. The target condition group includes: the normal angle between the point cloud and the center point is less than a first threshold, and the curvature between the point cloud and the center point is less than a second threshold.
[0070] The third sub-step is to add the relevant information of each fourth target point cloud in the fourth target point cloud set to the first list and the second list respectively. The second list may be a pre-established, empty list. The relevant information may be the position coordinate information corresponding to the fourth target point cloud.
[0071] The fourth sub-step is to remove the relevant information of the above-mentioned center point from the above-mentioned first list.
[0072] The fifth sub-step is, in response to the second target point cloud in the second target point cloud set being a traversed point cloud and / or the first list not having at least one associated point cloud, determining the point cloud set corresponding to the second list as the first target point cloud set.
[0073] Optionally, in response to the existence of at least one point cloud associated with the first list, the execution entity determines each point cloud in the at least one point cloud associated with the first list as a center point, and continues the target point cloud set generation step.
[0074] Optionally, in response to the fact that there is no traversed second target point cloud in the second target point cloud set, the execution entity may determine the second target point cloud set as the third target point cloud set.
[0075] Step 204 : Determine the bounding box associated with each first target point cloud set in the first target point cloud set group as a target bounding box to obtain a target bounding box set.
[0076] In some embodiments, the execution entity may determine the bounding box associated with each first target point cloud set in the first target point cloud set group as the target bounding box to obtain the target bounding box set. As an example, the execution entity may also use the extrinsic parameter matrix of the camera to determine the bounding box associated with each first target point cloud set in the first target point cloud set group as the target bounding box to obtain the target bounding box set. The extrinsic parameter matrix of the camera here may be an extrinsic parameter matrix between a 3D camera and a 2D camera. The extrinsic parameter matrix of the camera may be pre-set.
[0077] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the bounding box generation method of some embodiments of the present disclosure can accurately and effectively generate bounding boxes that are more relevant to each item. Specifically, the bounding boxes input to the output of the deep network often cannot more accurately and effectively locate the items involved in the task, resulting in low efficiency in completing the task. Based on this, the bounding box generation method of some embodiments of the present disclosure can first respond to the detection of the existence of various items related to the target image, and determine at least one bounding box on the above target image for subsequent generation of bounding boxes that are more associated with each item. Among them, the bounding box in the above at least one bounding box represents the location information of the items in the various items related to the above target image. Here, the approximate location information of each item related to the above target image is determined. Then, a point cloud set related to each bounding box in the above at least one bounding box is generated to obtain a point cloud set group. Here, by generating a point cloud set group, the three-dimensional structure information of the items corresponding to each bounding box can be roughly simulated, so as to be used for the subsequent generation of bounding boxes of items related to the target image. Furthermore, at least one point cloud in each point cloud set in the point cloud set group and related to each of the above-mentioned objects is determined as a first target point cloud set to accurately determine the three-dimensional structure information of each object, thereby obtaining a first target point cloud set group. Finally, a bounding box associated with each first target point cloud set in the first target point cloud set group is determined as a target bounding box to generate a bounding box that is more related to each object, thereby obtaining a target bounding box set.
[0078] Further references Figure 5 , shows a process 500 of another embodiment of the method for generating a bounding box according to the present disclosure. The method for generating a bounding box includes the following steps:
[0079] Step 501: in response to detecting the existence of various objects related to a target image, determining at least one bounding box on the target image.
[0080] Step 502: Generate a point cloud set related to each bounding box in the at least one bounding box to obtain a point cloud set group.
[0081] Step 503: Determine at least one point cloud related to each of the above-mentioned objects in each point cloud set in the above-mentioned point cloud set group as a first target point cloud set, so as to obtain a first target point cloud set group.
[0082] Step 504 : Determine the bounding box associated with each first target point cloud set in the first target point cloud set group as a target bounding box to obtain a target bounding box set.
[0083] In some embodiments, the specific implementation of steps 501-504 and the technical effects thereof can be referred to in Figure 2The steps 201-204 in the corresponding embodiment are not described in detail here.
[0084] Step 505: Control relevant mechanical equipment to carry the above-mentioned objects according to the above-mentioned target bounding box set.
[0085] In some embodiments, an execution entity (e.g. Figure 1 The electronic device shown in the figure can control the relevant mechanical equipment to carry the above-mentioned items according to the above-mentioned target bounding box set. As an example, the above-mentioned mechanical equipment can be a mechanical arm.
[0086] from Figure 5 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 5 The process 500 of the bounding box generation method in some corresponding embodiments further highlights the specific steps of controlling the relevant mechanical equipment to carry the above-mentioned various objects according to the above-mentioned target bounding box set. Therefore, the schemes described in these embodiments can more conveniently and accurately carry the various objects related to the above-mentioned target image, which can greatly improve the efficiency of completing the task.
[0087] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a device for generating a bounding box. These device embodiments are similar to Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0088] like Figure 6 As shown, a bounding box generating device 600 includes: a first determining unit 601, a generating unit 602, a second determining unit 603 and a third determining unit 604. The first determining unit 601 is configured to: in response to detecting the existence of various objects related to the target image, determine at least one bounding box on the target image, wherein the bounding box in the at least one bounding box represents the position information of the object in the various objects related to the target image. The generating unit 602 is configured to: generate a point cloud set related to each bounding box in the at least one bounding box to obtain a point cloud set group. The second determining unit 603 is configured to: determine at least one point cloud related to each of the various objects in each point cloud set in the point cloud set group as a first target point cloud set to obtain a first target point cloud set group. The third determining unit 604 is configured to: determine the bounding box associated with each first target point cloud set in the first target point cloud set group as a target bounding box to obtain a target bounding box set.
[0089] In some optional implementations of some embodiments, the generating unit 602 of the above-mentioned device 600 may be further configured to: generate a point cloud set related to each bounding box in the above-mentioned at least one bounding box by using the external parameter matrix of the camera.
[0090] In some optional implementations of some embodiments, the second determination unit 603 of the above-mentioned device 600 can be further configured to: determine the center point of the bounding box related to the above-mentioned point cloud set; select at least one point cloud in the above-mentioned point cloud set that is adjacent to the above-mentioned center point as the second target point cloud set; and generate the above-mentioned first target point cloud set based on the above-mentioned second target point cloud set.
[0091] In some optional implementations of some embodiments, the second determination unit 603 of the above-mentioned device 600 can be further configured to: construct a tree model related to the above-mentioned point cloud set; based on the above-mentioned tree model, select at least one point cloud in the above-mentioned point cloud set that is adjacent to the above-mentioned center point as the above-mentioned second target point cloud set.
[0092] In some optional implementations of some embodiments, the second determining unit 603 of the apparatus 600 may be further configured to: add the relevant information of the center point to the first list.
[0093] In some optional implementations of some embodiments, the second determination unit 603 of the apparatus 600 may be further configured to: for each center point associated with the first list, perform the following first target point cloud set generation step: in response to the presence of a traversed second target point cloud in the second target point cloud set, remove the traversed second target point cloud in the second target point cloud set to obtain a third target point cloud set; in response to determining that the third target point cloud satisfies the target condition group in the third target point cloud set, filter at least one point cloud that satisfies the target condition group from the third target point cloud set as a fourth target point cloud set, wherein the target condition group includes: a normal angle between the point cloud and the center point is less than a first threshold, and a curvature between the point cloud and the center point is less than a second threshold; add relevant information of each fourth target point cloud in the fourth target point cloud set to the first list and the second list respectively; remove relevant information of the center point from the first list; in response to the second target point cloud in the second target point cloud set being a traversed point cloud and / or the first list does not have the associated at least one point cloud, determine the point cloud set corresponding to the second list as the first target point cloud set.
[0094] In some optional implementations of some embodiments, the second determination unit 603 of the above-mentioned device 600 can be further configured to: in response to the existence of at least one point cloud associated with the above-mentioned first list, determine each point cloud in the at least one point cloud associated with the above-mentioned first list as a center point, and continue the above-mentioned target point cloud set generation step.
[0095] In some optional implementations of some embodiments, the second determination unit 603 of the above-mentioned device 600 can be further configured to: in response to the absence of the traversed second target point cloud in the above-mentioned second target point cloud set, determine the above-mentioned second target point cloud set as the third target point cloud set.
[0096] In some optional implementations of some embodiments, the apparatus 600 further includes: a control unit (not shown in the figure). The control unit may be configured to: control related mechanical equipment to carry the above-mentioned objects according to the above-mentioned target bounding box set.
[0097] It is understood that the units described in the device 600 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 600 and the units included therein, and will not be described in detail here.
[0098] Reference below Figure 7 , which shows an electronic device (eg, Figure 1 A schematic diagram of the structure of an electronic device in (a) 700. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0099] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0100] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0101] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0102] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage 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 memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the 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. The 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 for use 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 suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0103] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText TransferProtocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0104] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to detecting the existence of various objects related to the target image, determines at least one bounding box on the target image, wherein the bounding box in the at least one bounding box represents the position information of the objects in the various objects related to the target image; generates a point cloud set related to each bounding box in the at least one bounding box to obtain a point cloud set group; determines at least one point cloud related to each of the various objects in each point cloud in the point cloud set group as a first target point cloud set to obtain a first target point cloud set group; determines the bounding box associated with each first target point cloud set in the first target point cloud set group as a target bounding box to obtain a target bounding box set.
[0105] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0106] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0107] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The units described may also be provided in a processor, for example, may be described as: a processor comprising a first determination unit, a generation unit, a second determination unit, and a third determination unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the generation unit may also be described as "a unit for generating a point cloud set associated with each of the at least one bounding box to obtain a point cloud set group".
[0108] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0109] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A bounding box generation method, include: In response to detecting the existence of each object related to the target image, determining at least one bounding box on the target image, wherein a bounding box in the at least one bounding box represents position information of an object in each object related to the target image; Generate a point cloud set related to each bounding box in the at least one bounding box to obtain a point cloud set group; Determine the center point of the bounding box associated with the point cloud set; Selecting at least one point cloud in the point cloud set that is adjacent to the center point as a second target point cloud set; Generate a first target point cloud set according to the second target point cloud set; The bounding box associated with each first target point cloud set in the first target point cloud set group is determined as a target bounding box to obtain a target bounding box set.
2. The method according to claim 1, in, Generating a point cloud set related to each bounding box in the at least one bounding box comprises: A point cloud set related to each bounding box in the at least one bounding box is generated by using the external parameter matrix of the camera.
3. The method according to claim 1, in, The selecting at least one point cloud in the point cloud set and adjacent to the center point as the second target point cloud set includes: constructing a tree model associated with the point cloud set; According to the tree model, at least one point cloud in the point cloud set that is adjacent to the center point is selected as the second target point cloud set.
4. The method according to claim 1, in, The method further comprises: The relevant information of the center point is added to the first list.
5. The method according to claim 4, in, The step of generating the first target point cloud set according to the second target point cloud set includes: For each center point associated with the first list, the following first target point cloud set generation step is performed: In response to the presence of a traversed second target point cloud in the second target point cloud set, removing the traversed second target point cloud from the second target point cloud set to obtain a third target point cloud set; In response to determining that there is a third target point cloud satisfying a target condition group in the third target point cloud set, selecting at least one point cloud satisfying the target condition group from the third target point cloud set as a fourth target point cloud set, wherein the target condition group includes: a normal angle between the point cloud and the center point is less than a first threshold, and a curvature between the point cloud and the center point is less than a second threshold; Adding relevant information of each fourth target point cloud in the fourth target point cloud set to the first list and the second list respectively; Remove relevant information of the center point from the first list; In response to the second target point cloud in the second target point cloud set being a traversed point cloud and / or the first list not having at least one associated point cloud, the point cloud set corresponding to the second list is determined as the first target point cloud set.
6. The method according to claim 5, in, The method further comprises: In response to the existence of at least one point cloud associated with the first list, each point cloud in the at least one point cloud associated with the first list is determined as a center point, and the target point cloud set generation step is continued.
7. The method according to claim 5, in, After removing the traversed second target point cloud from the second target point cloud set in response to the presence of the traversed second target point cloud in the second target point cloud set to obtain the third target point cloud set, the method further includes: In response to the absence of the traversed second target point cloud in the second target point cloud set, the second target point cloud set is determined as the third target point cloud set.
8. The method according to claim 1, in, The method further comprises: According to the target bounding box set, related mechanical equipment is controlled to carry the various objects.
9. A bounding box generating device, include: A first determining unit is configured to determine at least one bounding box on the target image in response to detecting the existence of each object related to the target image, wherein the bounding box in the at least one bounding box represents the position information of the object in each object related to the target image; A generating unit is configured to generate a point cloud set related to each bounding box in the at least one bounding box to obtain a point cloud set group; The second determining unit is configured to determine a center point of a bounding box associated with the point cloud set; select at least one point cloud in the point cloud set that is adjacent to the center point as a second target point cloud set; and generate a first target point cloud set based on the second target point cloud set; The third determining unit is configured to determine the bounding box associated with each first target point cloud set in the first target point cloud set group as a target bounding box to obtain a target bounding box set.
10. An electronic device, include: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
11. A computer readable medium having a computer program stored thereon, in, When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
