Workpiece three-dimensional information determination method, device and equipment and storage medium
By obtaining the two-dimensional image of the workpiece and using pre-trained models, the three-dimensional information of the workpiece is automatically determined, which solves the problem of high cost of 3D cameras and realizes efficient and accurate three-dimensional information determination of the workpiece.
Patent Information
- Application Number
- CN202411776579.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-14
AI Technical Summary
In modern factories, the cost of using 3D cameras to determine three-dimensional information of workpieces is high and cannot meet the actual application needs.
By obtaining at least two two-dimensional images of the target workpiece in the target material box and determining the model using pre-trained target three-dimensional information, the three-dimensional information of the workpiece is automatically determined without the use of a 3D camera or manual participation.
This reduces the cost of equipment investment, improves work efficiency, and realizes the accurate determination of three-dimensional information of workpieces.
Smart Images

Figure CN119625182A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, equipment and storage medium for determining three-dimensional information of a workpiece. Background Art
[0002] In modern factories, in order to achieve efficient and accurate material handling, robotic arms are often used in conjunction with 3D camera technology to complete tasks such as picking and placing workpieces. Specifically, when faced with the need to take out workpieces from a basket and neatly stack them, the 3D camera will first scan the workpieces in the basket to generate detailed point cloud data. The point cloud is a data set composed of countless spatial coordinate points that can accurately reflect the three-dimensional shape, position, and relationship between all workpieces in the basket.
[0003] Although the application of 3D cameras reduces the dependence on manual operation and reduces labor costs, the cost of 3D cameras is relatively high. The investment cost of deploying a large number of 3D cameras in modern factories is high and cannot meet actual application needs. Summary of the invention
[0004] The present invention provides a method, device, equipment and storage medium for determining three-dimensional information of a workpiece, which automatically determines the three-dimensional information of a workpiece through at least two two-dimensional images, without the need for a 3D camera or human intervention, thereby reducing equipment investment costs and improving work efficiency.
[0005] According to one aspect of the present invention, a method for determining three-dimensional information of a workpiece is provided. The method comprises:
[0006] Acquire at least two two-dimensional images of the target workpiece in the target frame, wherein the image characteristics between the at least two two-dimensional images at least include the same shooting time, different image viewing angles, the same image parameters and overlapping image areas;
[0007] The three-dimensional information of the workpiece corresponding to the target workpiece is determined according to the at least two two-dimensional images and the pre-trained target three-dimensional information determination model, wherein the target three-dimensional information determination model is obtained by training a pre-established neural network model based on at least two sample two-dimensional images and sample three-dimensional information corresponding to the sample workpiece.
[0008] According to another aspect of the present invention, a device for determining three-dimensional information of a workpiece is provided. The device comprises:
[0009] A two-dimensional image acquisition module, used for acquiring at least two two-dimensional images of a target workpiece in a target frame, wherein the image characteristics between the at least two two-dimensional images at least include the same shooting time, different image viewing angles, the same image parameters and overlapping image areas;
[0010] A three-dimensional information determination module is used to determine the three-dimensional information of the workpiece corresponding to the target workpiece according to the at least two two-dimensional images and a pre-trained target three-dimensional information determination model, wherein the target three-dimensional information determination model is obtained by training a pre-established neural network model based on at least two sample two-dimensional images and sample three-dimensional information corresponding to the sample workpiece.
[0011] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0012] at least one processor; and
[0013] a memory communicatively connected to the at least one processor; wherein,
[0014] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for determining three-dimensional information of a workpiece described in any embodiment of the present invention.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining three-dimensional information of a workpiece described in any embodiment of the present invention when executed.
[0016] The technical solution of the embodiment of the present invention obtains at least two two-dimensional images of the target workpiece in the target material frame, determines the three-dimensional information of the workpiece corresponding to the target workpiece according to the at least two two-dimensional images and the target three-dimensional information obtained by pre-training, and does not require the use of three-dimensional camera equipment or human participation, thereby reducing equipment investment costs and improving work efficiency.
[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 is a flow chart of a method for determining three-dimensional information of a workpiece provided according to Embodiment 1 of the present invention;
[0020] Figure 2is a flow chart of a method for determining three-dimensional information of a workpiece provided according to a second embodiment of the present invention;
[0021] Figure 3 is a structural diagram of a device for determining three-dimensional information of a workpiece provided according to a third embodiment of the present invention;
[0022] Figure 4 It is a schematic diagram of the structure of an electronic device for implementing the method for determining three-dimensional information of a workpiece according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] Embodiment 1
[0026] Figure 1 A flowchart of a method for determining three-dimensional information of a workpiece is provided for the first embodiment of the present invention. This embodiment is applicable to the case where three-dimensional information is determined by a two-dimensional image of a workpiece. The method can be executed by a device for determining three-dimensional information of a workpiece. The device for determining three-dimensional information of a workpiece can be implemented in the form of hardware and / or software. The device for determining three-dimensional information of a workpiece can be configured in an electronic device. Figure 1 As shown, the method includes:
[0027] S101, acquiring at least two two-dimensional images of a target workpiece in a target frame.
[0028] The target workpiece may refer to a workpiece whose three-dimensional information is to be determined, such as a gear, an injection molded part, a circuit board, etc. The target material frame may refer to a material frame used to carry the target workpiece.
[0029] It should be noted that the image characteristics between at least two two-dimensional images at least include the same shooting time, image perspective difference, image parameters and image area overlap. Specifically, the shooting time of at least two two-dimensional images is the same to avoid the target workpiece posture change at different times and cause too large error in determining three-dimensional information. At least two two-dimensional images should be taken from different angles of the same object, and there should be enough difference between the two perspectives. This difference is crucial for calculating depth information. If the perspectives are too close, it may not be possible to obtain enough information to reconstruct the three-dimensional structure; if the perspective difference is too large, it may cause matching difficulties. There should be enough overlap between at least two two-dimensional images. This is because during the reconstruction process, the algorithm needs to find corresponding points in the two images (that is, the same physical point seen from different perspectives). These corresponding points are used to calculate the position and direction of the camera, as well as the spatial position of the surface points of the object. At least two two-dimensional images should be clear, with good contrast and appropriate lighting conditions. Highly noisy, blurred or overexposed images will reduce the quality of reconstruction. In addition, difficult-to-match surface features such as reflective, transparent or mirror materials should be avoided as much as possible in the image. In addition, the parameter information of at least two 2D images (such as focal length, principal point offset, etc.) and external parameters (such as camera position and orientation) should be determined. At least two 2D images should contain enough features to facilitate point matching. Surfaces with uniform textures or no obvious features will make matching difficult. The object itself should not move significantly between taking at least two 2D images. At the same time, the movement of the camera should also remain stable, avoiding rapid rotation or non-rigid transformations to ensure the accuracy of reconstruction.
[0030] In summary, to generate 3D information from two 2D images, it is necessary to ensure that the perspective difference between the images is moderate, there is a large enough overlap area, the image quality is good, the camera parameters are known, the images contain rich matchable features, and the movement of the object and the camera is controlled during the shooting process.
[0031] Exemplarily, the step of acquiring at least two two-dimensional images of a target workpiece in a target frame includes:
[0032] A first two-dimensional image and a second two-dimensional image of the target workpiece in the target material frame at a preset acquisition time are acquired by a first planar camera and a second planar camera.
[0033] Wherein, the first plane camera and the second plane camera are arranged at different positions in the target material frame, and the shooting angles of the first plane camera and the second plane camera are preset angles.
[0034] Exemplarily, the first plane camera is set at a first preset position in the target material frame, and the second plane camera is set at a second preset position in the target material frame, wherein the first preset position is any frame corner of the target material frame; the second preset position is the top of the material basket of the target material frame; and the preset angles include 50 degrees to 120 degrees.
[0035] S102: Determine a model based on the at least two two-dimensional images and the target three-dimensional information obtained through pre-training to determine the three-dimensional information of the target workpiece.
[0036] The workpiece three-dimensional information may refer to the point cloud data information of the target workpiece. The target three-dimensional information determination model is obtained by training a pre-established neural network model based on at least two sample two-dimensional images and sample three-dimensional information corresponding to the sample workpiece.
[0037] Specifically, at least two two-dimensional images are input into a target three-dimensional information determination model to perform three-dimensional information determination, and according to an output of the target three-dimensional information determination model, the three-dimensional information of the workpiece corresponding to the target workpiece can be obtained.
[0038] Exemplarily, the target three-dimensional information determination model includes an input layer, a feature extraction layer, a fusion layer, a three-dimensional reconstruction layer and an output layer. Accordingly, the method includes: receiving the at least two two-dimensional images through the input layer, and performing convolution processing on the two-dimensional images respectively to obtain multiple convolution images. For each of the convolution images, the convolution image is subjected to feature extraction processing through the feature extraction layer to obtain multiple feature images, and the feature images at least include edge features and texture features; the multiple feature images are subjected to fusion processing through the fusion layer to obtain a fused image; the depth value of each pixel in the fused image is determined through the three-dimensional reconstruction layer, and the depth value of each pixel is subjected to fusion processing to obtain the three-dimensional information of the workpiece corresponding to the target workpiece; the three-dimensional information of the workpiece is output through the output layer.
[0039] Specifically, the input layer takes at least two two-dimensional images as input, and can process them through two parallel convolutional neural network (CNN) branches to obtain at least two convolution images. The feature extraction layer extracts image features from the convolution image by using pre-trained models such as VGG and ResNet to obtain at least two feature images. The fusion layer fuses at least two feature images extracted by the two branches in a preset manner (such as concatenate or add, etc.) to obtain a fused image from at least two perspectives. The three-dimensional reconstruction layer further processes the fused feature map to generate three-dimensional information of the workpiece. This may involve multi-layer fully connected layers, deconvolution layers or Transformer structures, which can be determined based on the complexity of the task and the required accuracy. The output layer outputs the three-dimensional information of the workpiece.
[0040] The technical solution of the embodiment of the present invention obtains at least two two-dimensional images of the target workpiece in the target material frame, determines the three-dimensional information of the workpiece corresponding to the target workpiece according to the at least two two-dimensional images and the target three-dimensional information obtained by pre-training, and does not require the use of three-dimensional camera equipment or human participation, thereby reducing equipment investment costs and improving work efficiency.
[0041] Embodiment 2
[0042] Figure 2 This is a flow chart of a method for determining three-dimensional information of a workpiece provided in the second embodiment of the present invention. Based on the above embodiments, this embodiment further refines the training process of the target three-dimensional information determination model. Figure 2 As shown, the method includes:
[0043] S201 : Acquire a first sample image, a second sample image, and sample three-dimensional information corresponding to a sample workpiece.
[0044] The first sample image and the second sample image are two-dimensional images. The three-dimensional information of the sample can be collected by a three-dimensional depth camera. It should be noted that the acquisition method of the first sample image and the second sample image is similar to the acquisition method of at least two two-dimensional images, and the present invention will not repeat it.
[0045] S202: Determine output three-dimensional information output by the neural network model according to the first sample image, the second sample image and a pre-established neural network model.
[0046] Specifically, the first sample image and the second sample image are input into a pre-established neural network model, and output three-dimensional information is obtained according to the output of the neural network model.
[0047] S203, determining an error between the output three-dimensional information and the sample three-dimensional information based on a preset loss function, and adjusting network parameters in the neural network model according to the error.
[0048] Among them, the preset loss function at least includes a mean square error loss function.
[0049] Specifically, the mean square error (MSE) is used as a loss function to measure the error between the output three-dimensional information and the sample three-dimensional information, and the network parameters in the neural network model are adjusted according to the error. In addition, other factors may need to be considered during the training process, such as regularization terms to prevent overfitting.
[0050] S204: When the training end condition is met, the trained neural network model is determined as the target three-dimensional information determination model.
[0051] When the training end conditions are met, such as when the number of iterations reaches a preset number or the training error converges, the neural network model training is determined to be completed. At this time, the trained neural network model can be used as the target three-dimensional information determination model.
[0052] S205 , obtaining at least two two-dimensional images of the target workpiece in the target material frame.
[0053] S206 , determining a model based on the at least two two-dimensional images and the target three-dimensional information obtained through pre-training, and determining the workpiece three-dimensional information corresponding to the target workpiece.
[0054] The technical solution of the embodiment of the present invention can ensure the accuracy of the target three-dimensional information determination model decision by using the first sample image, the second sample image and the sample three-dimensional information corresponding to the sample workpiece for model training, thereby determining the accuracy of the workpiece three-dimensional information.
[0055] Embodiment 3
[0056] Figure 3 This is a schematic diagram of the structure of a device for determining three-dimensional information of a workpiece provided in Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:
[0057] A two-dimensional image acquisition module 301 is used to acquire at least two two-dimensional images of a target workpiece in a target frame, wherein the image characteristics between the at least two two-dimensional images at least include the same shooting time, different image viewing angles, the same image parameters and overlapping image areas;
[0058] The three-dimensional information determination module 302 is used to determine the three-dimensional information of the workpiece corresponding to the target workpiece according to the at least two two-dimensional images and the pre-trained target three-dimensional information determination model, wherein the target three-dimensional information determination model is obtained by training a pre-established neural network model based on at least two sample two-dimensional images and sample three-dimensional information corresponding to the sample workpiece.
[0059] The technical solution of the embodiment of the present invention obtains at least two two-dimensional images of the target workpiece in the target material frame, determines the three-dimensional information of the workpiece corresponding to the target workpiece according to the at least two two-dimensional images and the target three-dimensional information obtained by pre-training, and does not require the use of three-dimensional camera equipment or human participation, thereby reducing equipment investment costs and improving work efficiency.
[0060] Optionally, the two-dimensional image acquisition module 301 is specifically used for:
[0061] A first two-dimensional image and a second two-dimensional image of the target workpiece in the target frame at a preset acquisition time are acquired by a first plane camera and a second plane camera, wherein the first plane camera and the second plane camera are arranged at different positions in the target frame and the shooting angles of the first plane camera and the second plane camera are preset angles.
[0062] Optionally, the first plane camera is set at a first preset position in the target material frame, and the second plane camera is set at a second preset position in the target material frame, wherein the first preset position is any frame corner of the target material frame; the second preset position is the top of the material basket of the target material frame; and the preset angles include 50 degrees to 120 degrees.
[0063] Optionally, the device further comprises a model training module.
[0064] The model training module is used to:
[0065] Acquire a first sample image, a second sample image, and sample three-dimensional information corresponding to the sample workpiece, wherein the sample three-dimensional information is acquired by a three-dimensional depth camera;
[0066] Determining output three-dimensional information output by the neural network model according to the first sample image, the second sample image and a pre-established neural network model;
[0067] Determining an error between the output three-dimensional information and the sample three-dimensional information based on a preset loss function, and adjusting a network parameter in the neural network model according to the error;
[0068] When the training end condition is reached, the trained neural network model is determined as the target three-dimensional information determination model.
[0069] Optionally, the preset loss function includes at least a mean square error loss function.
[0070] Optionally, the target three-dimensional information determination model includes an input layer, a feature extraction layer, a fusion layer, a three-dimensional reconstruction layer and an output layer.
[0071] Optionally, the three-dimensional information determination module 302 is specifically configured to:
[0072] Receiving the at least two two-dimensional images through the input layer, and performing convolution processing on the two-dimensional images respectively to obtain a plurality of convolution images;
[0073] For each of the convolution images, the convolution image is subjected to feature extraction processing by the feature extraction layer to obtain a plurality of feature images, wherein the feature images at least include edge features and texture features;
[0074] The plurality of feature images are fused through the fusion layer to obtain a fused image;
[0075] Determine the depth value of each pixel in the fused image through the 3D reconstruction layer, and fuse the depth value of each pixel to obtain the 3D information of the workpiece corresponding to the target workpiece;
[0076] The three-dimensional information of the workpiece is output through the output layer.
[0077] The device for determining three-dimensional information of a workpiece provided in an embodiment of the present invention can execute the method for determining three-dimensional information of a workpiece provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0078] Embodiment 4
[0079] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0080] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0081] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0082] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for determining the three-dimensional information of the workpiece.
[0083] In some embodiments, the method workpiece three-dimensional information determination can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method workpiece three-dimensional information determination described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the method workpiece three-dimensional information determination in any other appropriate manner (for example, by means of firmware).
[0084] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0085] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0086] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.
[0087] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0088] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by 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), a blockchain network, and the Internet.
[0089] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0090] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0091] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for determining three-dimensional information of a workpiece, characterized in that: include: Acquire at least two two-dimensional images of the target workpiece in the target frame, wherein the image characteristics between the at least two two-dimensional images at least include the same shooting time, different image viewing angles, the same image parameters and overlapping image areas; The three-dimensional information of the workpiece corresponding to the target workpiece is determined according to the at least two two-dimensional images and the pre-trained target three-dimensional information determination model, wherein the target three-dimensional information determination model is obtained by training a pre-established neural network model based on at least two sample two-dimensional images and sample three-dimensional information corresponding to the sample workpiece.
2. The method according to claim 1, characterized in that The step of acquiring at least two two-dimensional images of the target workpiece in the target frame includes: A first two-dimensional image and a second two-dimensional image of the target workpiece in the target frame at a preset acquisition time are acquired by a first plane camera and a second plane camera, wherein the first plane camera and the second plane camera are arranged at different positions in the target frame and the shooting angles of the first plane camera and the second plane camera are preset angles.
3. The method according to claim 2, characterized in that The first plane camera is set at a first preset position in the target material frame, and the second plane camera is set at a second preset position in the target material frame, wherein the first preset position is any frame corner of the target material frame; the second preset position is the top of the material basket of the target material frame; the preset angles include 50 degrees to 120 degrees.
4. The method according to claim 1, characterized in that: The target three-dimensional information determination model is obtained by training in the following manner: Acquire a first sample image, a second sample image, and sample three-dimensional information corresponding to the sample workpiece, wherein the sample three-dimensional information is acquired by a three-dimensional depth camera; Determining output three-dimensional information output by the neural network model according to the first sample image, the second sample image and a pre-established neural network model; Determining an error between the output three-dimensional information and the sample three-dimensional information based on a preset loss function, and adjusting a network parameter in the neural network model according to the error; When the training end condition is reached, the trained neural network model is determined as the target three-dimensional information determination model.
5. The method according to claim 4, characterized in that The preset loss function at least includes a mean square error loss function.
6. The method according to claim 1, characterized in that The target three-dimensional information determination model includes an input layer, a feature extraction layer, a fusion layer, a three-dimensional reconstruction layer and an output layer.
7. The method according to claim 6, characterized in that The method further comprises: Receiving the at least two two-dimensional images through the input layer, and performing convolution processing on the two-dimensional images respectively to obtain a plurality of convolution images; For each of the convolution images, the convolution image is subjected to feature extraction processing by the feature extraction layer to obtain a plurality of feature images, wherein the feature images at least include edge features and texture features; The plurality of feature images are fused through the fusion layer to obtain a fused image; Determine the depth value of each pixel in the fused image through the 3D reconstruction layer, and fuse the depth value of each pixel to obtain the 3D information of the workpiece corresponding to the target workpiece; The three-dimensional information of the workpiece is output through the output layer.
8. A device for determining three-dimensional information of a workpiece, characterized in that: include: A two-dimensional image acquisition module, used for acquiring at least two two-dimensional images of a target workpiece in a target frame, wherein the image characteristics between the at least two two-dimensional images at least include the same shooting time, different image viewing angles, the same image parameters and overlapping image areas; A three-dimensional information determination module is used to determine the three-dimensional information of the workpiece corresponding to the target workpiece according to the at least two two-dimensional images and a pre-trained target three-dimensional information determination model, wherein the target three-dimensional information determination model is obtained by training a pre-established neural network model based on at least two sample two-dimensional images and sample three-dimensional information corresponding to the sample workpiece.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for determining three-dimensional information of a workpiece according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining three-dimensional information of a workpiece according to any one of claims 1 to 7 when executed.