Workpiece position identification method, device and equipment and storage medium
By using pre-trained target recognition network model and workpiece standard images, the target workpiece locations in the workpiece design image are quickly and accurately identified, which solves the problems of slow workpiece recognition speed, large computing resource consumption and poor robustness in the prior art, and significantly improves the efficiency and automation level of industrial production.
Patent Information
- Application Number
- CN202411776158.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-11
AI Technical Summary
In the prior art, the workpiece recognition speed is slow, the computing resource consumption is large and the robustness is poor, making it difficult to meet the real-time processing needs.
By acquiring the workpiece design image containing the target workpiece and using the pre-trained target recognition network model, the target image area of the target workpiece in the workpiece design image is determined. Combining the workpiece standard image and the target image area, determine the position information of the target workpiece.
It realizes efficient and accurate identification of parts in steel plate design drawings in industrial production, significantly improving production efficiency and automation level.
Smart Images

Figure CN119600112A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a workpiece position recognition method, device, equipment and storage medium. Background Art
[0002] In the manufacturing industry, especially in the field of metal processing, efficient and accurate parts identification and positioning technology is the key to achieving automated production and quality control.
[0003] Workpiece cutting processing usually requires cutting a large steel plate into multiple small parts. The design of these parts is usually stored in a DXF file. After the DXF file is converted into an image, the specific location of each part needs to be identified from the image. In the above process, a key link is to accurately identify the location of each part from the design drawing in order to guide the cutting equipment to perform precise cutting.
[0004] The traditional method is to use template matching technology to prepare a standard image of each part in advance as a template. Use the known standard image of a single part to perform template matching in the image of the entire steel plate. The matching process needs to consider the possible rotation and scaling of the part, so it is necessary to exhaust all possible angles and positions and match pixel by pixel.
[0005] Although template matching technology can work effectively in some cases, it requires a lot of time and computing resources and is difficult to meet the needs of real-time processing. Summary of the invention
[0006] The present invention provides a workpiece position recognition method, device, equipment and storage medium to solve the problems of slow workpiece recognition, large computing resource consumption and poor robustness in the prior art, and provides a more efficient and accurate parts recognition solution for industrial production.
[0007] According to one aspect of the present invention, a method for identifying a workpiece position is provided. The method comprises:
[0008] Acquire a workpiece design image containing a target workpiece, wherein the workpiece design image is obtained according to a workpiece design file, and the workpiece design file is obtained according to a target material design for producing the target workpiece;
[0009] Determine a target image region in the workpiece design image that contains the target workpiece according to the workpiece design image and a pre-trained target recognition network model, wherein the target recognition network model is obtained by training a pre-established neural network model based on positive sample image blocks, negative sample image blocks, and workpiece sample image blocks;
[0010] The position information of the target workpiece is determined in the workpiece design image according to the workpiece standard image corresponding to the target workpiece and the target image area.
[0011] According to another aspect of the present invention, a workpiece position recognition device is provided. The device comprises:
[0012] A design image acquisition module, used to acquire a workpiece design image containing a target workpiece, wherein the workpiece design image is obtained according to a workpiece design file, and the workpiece design file is obtained according to a target material design for producing the target workpiece;
[0013] An image region determination module is used to determine a target image region containing the target workpiece in the workpiece design image according to the workpiece design image and a pre-trained target recognition network model, wherein the target recognition network model is obtained by training a pre-established neural network model based on positive sample image blocks, negative sample image blocks, and workpiece sample image blocks;
[0014] The workpiece position determination module is used to determine the position information of the target workpiece in the workpiece design image according to the workpiece standard image corresponding to the target workpiece and the target image area.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] 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 workpiece position identification method described in any embodiment of the present invention.
[0019] 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 workpiece position identification method described in any embodiment of the present invention when executed.
[0020] The technical solution of the embodiment of the present invention obtains a workpiece design image containing a target workpiece. According to the workpiece design image and a pre-trained target recognition network model, a target image region containing the target workpiece in the workpiece design image is determined. According to the workpiece standard image corresponding to the target workpiece and the target image region, the position information of the target workpiece is determined in the workpiece design image, which solves the problems of slow workpiece recognition, large consumption of computing resources and poor robustness in the prior art. The present invention can efficiently and accurately identify the position of parts in the steel plate design drawing in industrial production, significantly improving production efficiency and automation level.
[0021] 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
[0022] 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.
[0023] Figure 1 is a flow chart of a workpiece position recognition method provided according to the first embodiment of the present invention;
[0024] Figure 2 is a flow chart of a workpiece position recognition method provided according to Embodiment 2 of the present invention;
[0025] Figure 3 is a structural diagram of a workpiece position identification device provided according to Embodiment 3 of the present invention;
[0026] Figure 4 It is a schematic diagram of the structure of an electronic device for implementing the workpiece position recognition method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] 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.
[0028] 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.
[0029] Embodiment 1
[0030] Figure 1 This is a flowchart of a workpiece position recognition method provided in the first embodiment of the present invention. This embodiment is applicable to the situation of workpiece position recognition in design drawings. The method can be executed by a workpiece position recognition device. The workpiece position recognition device can be implemented in the form of hardware and / or software. The workpiece position recognition device can be configured in an electronic device. Figure 1 As shown, the method includes:
[0031] S101: Acquire a workpiece design image including a target workpiece.
[0032] Wherein, the workpiece design image is obtained according to the workpiece design file, and the workpiece design file is obtained according to the target material design for producing the target workpiece. It should be noted that the target workpiece may refer to the workpiece at the position to be identified. The present invention does not limit the number of individuals and types of target workpieces. Exemplarily, the target workpiece may include gears, bearings, nuts, etc. The target material may refer to the original material used to produce the target workpiece, such as a steel plate.
[0033] Specifically, a workpiece design file is obtained after designing the target material according to the target workpiece. The workpiece design file is mostly in the form of a DXF file, which needs to be converted into an image format to obtain a workpiece design image.
[0034] S102: Determine a target image region in the workpiece design image that includes the target workpiece according to the workpiece design image and a pre-trained target recognition network model.
[0035] The target recognition network model is obtained by training a pre-established neural network model based on positive sample image blocks, negative sample image blocks and artifact sample image blocks. It should be noted that the target image region may refer to an image region containing a target artifact.
[0036] Exemplarily, the workpiece design image is input into the target recognition network model for workpiece recognition processing, and the target image area containing the target workpiece in the workpiece design image is determined based on the output of the target network model, thereby reducing the recognition area and improving the efficiency of determining the workpiece position.
[0037] Exemplarily, determining the target image region containing the target workpiece in the workpiece design image according to the workpiece design image and the pre-trained target recognition network model includes:
[0038] The workpiece design image is divided and processed by the target recognition network model to obtain a plurality of divided image regions;
[0039] For each of the divided image regions, determining an image feature vector corresponding to the divided image region through the target recognition network model;
[0040] According to the image feature vector corresponding to each of the divided image regions and the workpiece feature vector corresponding to the target workpiece, a target image region in the workpiece design image including the target workpiece is determined.
[0041] Specifically, the workpiece design image is divided and processed using the deep learning technology in the target recognition network model to obtain multiple divided image regions, where the division criteria can be determined according to actual conditions. The image feature vector of each divided image region is calculated by the target recognition network model, and then the image feature vector and the workpiece feature vector are compared and processed to determine the image region containing the target workpiece.
[0042] It should be noted that the target recognition network model can be composed of multiple convolutional layers, pooling layers, and fully connected layers. Each layer is responsible for extracting features at different levels. For example, the convolutional layer extracts local features by dividing the image area through convolution. Activation function: A preset function is usually used to increase the nonlinearity of the model. The pooling layer reduces the spatial dimension of the feature map through maximum pooling or average pooling operations, reduces the amount of calculation and retains important features. The normalization layer helps to stabilize and accelerate the training process. The fully connected layer maps the previously extracted features to a fixed-length feature vector, so that the image feature vector can be obtained.
[0043] Exemplarily, determining a target image region containing the target workpiece in the workpiece design image according to the image feature vector corresponding to each of the divided image regions and the workpiece feature vector corresponding to the target workpiece includes:
[0044] Determine a feature vector difference between the image feature vector and the workpiece feature vector; and determine the divided image region as a target image region when the feature vector difference is less than or equal to the feature vector threshold.
[0045] That is, the feature vector difference between the image feature vector and the workpiece feature vector is calculated, and the divided image region whose feature vector difference is less than or equal to the feature vector threshold is determined as the target image region.
[0046] S103 . Determine position information of the target workpiece in the workpiece design image according to the workpiece standard image corresponding to the target workpiece and the target image area.
[0047] The workpiece standard image may refer to a standard image corresponding to the target workpiece.
[0048] Specifically, the workpiece standard image is used as a reference template, and template matching is performed in the target image area through operations such as rotation or movement, so as to determine the position information of all target workpieces in the workpiece design image.
[0049] Exemplarily, determining the position information of the target workpiece in the workpiece design image according to the workpiece standard image corresponding to the target workpiece and the target image area includes:
[0050] A workpiece sliding window corresponding to the target workpiece is set according to the workpiece standard image; based on a window sliding threshold, a plurality of workpiece matching windows of the workpiece sliding window in the target image area are determined; an image similarity between each of the workpiece matching windows and the workpiece standard image is determined; and based on a predetermined similarity threshold and a plurality of image similarities, position information of the target workpiece is determined in the target image area.
[0051] The window sliding threshold may be set according to actual conditions, and the present invention does not specifically limit this.
[0052] Specifically, a workpiece sliding window of the same size as the target workpiece is defined on the target image area. According to the sliding window threshold, the workpiece sliding window is moved from left to right and from top to bottom to cover every possible position of the target image area, thereby obtaining multiple workpiece matching images. Different methods can be used to evaluate the image similarity between the workpiece matching image and the workpiece standard image. Commonly used methods include square difference matching, standardized square difference matching, absolute difference matching, and zero mean normalized cross correlation. The position of the workpiece matching image whose image similarity is greater than or equal to the similarity threshold is determined as the position information of the target workpiece.
[0053] The technical solution of the embodiment of the present invention obtains a workpiece design image containing a target workpiece. According to the workpiece design image and a pre-trained target recognition network model, a target image region containing the target workpiece in the workpiece design image is determined. According to the workpiece standard image corresponding to the target workpiece and the target image region, the position information of the target workpiece is determined in the workpiece design image, which solves the problems of slow workpiece recognition, large consumption of computing resources and poor robustness in the prior art. The present invention can efficiently and accurately identify the position of parts in the steel plate design drawing in industrial production, significantly improving production efficiency and automation level.
[0054] Embodiment 2
[0055] Figure 2 This is a flow chart of a workpiece position recognition method provided by the second embodiment of the present invention. Based on the above embodiments, this embodiment further refines the training process of the target recognition network model. Figure 2 As shown, the method includes:
[0056] S201 : Acquire a positive sample image block containing a sample artifact, a negative sample image block not containing the sample artifact, and an artifact sample image block corresponding to the sample artifact.
[0057] Specifically, image blocks are randomly intercepted from the target material, and image blocks containing sample artifacts are selected as positive sample image blocks, and image blocks not containing sample artifacts are selected as negative sample image blocks. In addition, artifact sample image blocks are intercepted according to the sample artifacts.
[0058] S202: Determine a positive sample feature vector and a negative sample feature vector output by the neural network model according to the positive sample image block, the negative sample image block and a pre-established neural network model.
[0059] Specifically, the positive sample image block and the negative sample image block are input into a pre-established neural network model so that the neural network model calculates the feature vectors of the positive sample image block and the negative sample image block respectively, thereby obtaining the positive sample feature vector and the negative sample feature vector.
[0060] S203, based on a preset loss function, determining a positive sample vector difference between the positive sample feature vector and the workpiece feature vector corresponding to the workpiece sample image block, and determining a negative sample vector difference between the negative sample feature vector and the workpiece feature vector corresponding to the workpiece sample image block.
[0061] It should be noted that the preset loss function may be a triplet loss function. The triplet loss function may be as follows:
[0062] Tripletloss=max(d(anchor,positive),d(anchor,negative)+margin,0);
[0063] Among them, d(anchor, positive) represents the distance between the artifact sample image block and the positive sample image block, d(anchor, positive) represents the distance between the artifact sample image block and the negative sample image block, and margin is a hyperparameter used to control the minimum distance difference between positive samples and negative samples.
[0064] Specifically, by using a preset loss function, a positive sample vector difference between a positive sample feature vector and a workpiece feature vector is calculated, and a negative sample vector difference between a negative sample feature vector and a workpiece feature vector is calculated.
[0065] S204. Adjust network parameters in the neural network model according to the positive sample vector difference and the negative sample vector difference.
[0066] Specifically, the positive sample vector difference and the negative sample vector difference are back-propagated to adjust the neural network model parameters, so that the positive sample feature vector is closer to the workpiece feature vector, while the negative sample feature vector is farther from the workpiece feature vector.
[0067] S205. When the training end condition is met, the trained neural network model is determined as a target recognition network model.
[0068] It should be noted that the training termination condition includes that the positive sample vector difference is less than a first vector threshold, and the negative sample vector difference is greater than a second vector threshold, wherein the second vector threshold is greater than or equal to the first vector threshold.
[0069] S206: Acquire a workpiece design image including the target workpiece.
[0070] S207 , determining a target image region in the workpiece design image that includes the target workpiece according to the workpiece design image and a pre-trained target recognition network model.
[0071] S208 . Determine position information of the target workpiece in the workpiece design image according to the workpiece standard image corresponding to the target workpiece and the target image area.
[0072] The technical solution of the embodiment of the present invention trains the neural network model according to the positive sample image blocks, the negative sample image blocks and the workpiece sample image blocks, which can help the target recognition network model learn more effective feature representation, thereby improving the accuracy and speed of target workpiece recognition, and further improving the efficiency of determining the workpiece position.
[0073] Embodiment 3
[0074] Figure 3 This is a schematic diagram of the structure of a workpiece position recognition device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:
[0075] The design image acquisition module 301 is used to acquire a workpiece design image containing a target workpiece, wherein the workpiece design image is obtained according to a workpiece design file, and the workpiece design file is obtained according to a target material design for producing the target workpiece;
[0076] An image region determination module 302 is used to determine a target image region containing the target workpiece in the workpiece design image according to the workpiece design image and a pre-trained target recognition network model, wherein the target recognition network model is obtained by training a pre-established neural network model based on positive sample image blocks, negative sample image blocks, and workpiece sample image blocks;
[0077] The workpiece position determination module 303 is used to determine the position information of the target workpiece in the workpiece design image according to the workpiece standard image corresponding to the target workpiece and the target image area.
[0078] The technical solution of the embodiment of the present invention obtains a workpiece design image containing a target workpiece. According to the workpiece design image and a pre-trained target recognition network model, a target image region containing the target workpiece in the workpiece design image is determined. According to the workpiece standard image corresponding to the target workpiece and the target image region, the position information of the target workpiece is determined in the workpiece design image, which solves the problems of slow workpiece recognition, large consumption of computing resources and poor robustness in the prior art. The present invention can efficiently and accurately identify the position of parts in the steel plate design drawing in industrial production, significantly improving production efficiency and automation level.
[0079] Optionally, the image area determination module 302 includes:
[0080] An image region division unit, used for dividing the workpiece design image through the target recognition network model to obtain a plurality of divided image regions;
[0081] A feature vector determining unit, configured to determine, for each of the divided image regions, an image feature vector corresponding to the divided image region through the target recognition network model;
[0082] The image region determining unit is used to determine a target image region containing the target workpiece in the workpiece design image according to the image feature vector corresponding to each of the divided image regions and the workpiece feature vector corresponding to the target workpiece.
[0083] Optionally, the image area determination unit is specifically configured to:
[0084] determining a feature vector difference between the image feature vector and the workpiece feature vector;
[0085] In a case where the feature vector difference is less than or equal to the feature vector threshold, the divided image region is determined as a target image region.
[0086] Optionally, the workpiece position determination module 303 is specifically configured to:
[0087] Setting a workpiece sliding window corresponding to the target workpiece according to the workpiece standard image;
[0088] Based on a window sliding threshold, determining a plurality of workpiece matching windows of the workpiece sliding window in the target image area;
[0089] Determining the image similarity between each of the workpiece matching windows and the workpiece standard image;
[0090] The position information of the target workpiece is determined in the target image region according to a predetermined similarity threshold and the plurality of image similarities.
[0091] Optionally, the device further comprises a network model training module.
[0092] The network model training module is specifically used for:
[0093] Acquire a positive sample image block containing a sample artifact, a negative sample image block not containing the sample artifact, and an artifact sample image block corresponding to the sample artifact;
[0094] According to the positive sample image block, the negative sample image block and a pre-established neural network model, determining a positive sample feature vector and a negative sample feature vector output by the neural network model;
[0095] Based on a preset loss function, determining a positive sample vector difference between the positive sample feature vector and the workpiece feature vector corresponding to the workpiece sample image block, and determining a negative sample vector difference between the negative sample feature vector and the workpiece feature vector corresponding to the workpiece sample image block;
[0096] Adjusting network parameters in the neural network model according to the positive sample vector difference and the negative sample vector difference;
[0097] When the training termination condition is reached, the trained neural network model is determined as a target recognition network model.
[0098] Optionally, the training end condition includes that the positive sample vector difference is less than a first vector threshold, and the negative sample vector difference is greater than a second vector threshold, wherein the second vector threshold is greater than or equal to the first vector threshold.
[0099] Optionally, the preset loss function includes a triplet loss function.
[0100] The workpiece position recognition device provided in the embodiment of the present invention can execute the workpiece position recognition method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0101] Embodiment 4
[0102] 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.
[0103] like Figure 4 As 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.
[0104] 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.
[0105] 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 a workpiece position recognition method.
[0106] In some embodiments, the workpiece position identification method may 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 may 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 workpiece position identification method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the workpiece position identification method in any other appropriate manner (e.g., by means of firmware).
[0107] 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.
[0108] 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.
[0109] 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.
[0110] 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).
[0111] 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.
[0112] 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.
[0113] 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.
[0114] 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 identifying a workpiece position, characterized in that: include: Acquire a workpiece design image containing a target workpiece, wherein the workpiece design image is obtained according to a workpiece design file, and the workpiece design file is obtained according to a target material design for producing the target workpiece; Determine a target image region in the workpiece design image that contains the target workpiece according to the workpiece design image and a pre-trained target recognition network model, wherein the target recognition network model is obtained by training a pre-established neural network model based on positive sample image blocks, negative sample image blocks, and workpiece sample image blocks; The position information of the target workpiece is determined in the workpiece design image according to the workpiece standard image corresponding to the target workpiece and the target image area.
2. The method according to claim 1, characterized in that Determining the target image region containing the target workpiece in the workpiece design image according to the workpiece design image and the pre-trained target recognition network model comprises: The workpiece design image is divided and processed by the target recognition network model to obtain a plurality of divided image regions; For each of the divided image regions, determining an image feature vector corresponding to the divided image region through the target recognition network model; According to the image feature vector corresponding to each of the divided image regions and the workpiece feature vector corresponding to the target workpiece, a target image region in the workpiece design image including the target workpiece is determined.
3. The method according to claim 2, characterized in that Determining the target image region containing the target workpiece in the workpiece design image according to the image feature vector corresponding to each of the divided image regions and the workpiece feature vector corresponding to the target workpiece comprises: determining a feature vector difference between the image feature vector and the workpiece feature vector; In a case where the feature vector difference is less than or equal to the feature vector threshold, the divided image region is determined as a target image region.
4. The method according to claim 1, characterized in that: The step of determining the position information of the target workpiece in the workpiece design image according to the workpiece standard image corresponding to the target workpiece and the target image area includes: Setting a workpiece sliding window corresponding to the target workpiece according to the workpiece standard image; Based on a window sliding threshold, determining a plurality of workpiece matching windows of the workpiece sliding window in the target image area; Determining the image similarity between each of the workpiece matching windows and the workpiece standard image; The position information of the target workpiece is determined in the target image region according to a predetermined similarity threshold and the plurality of image similarities.
5. The method according to claim 1, characterized in that The target recognition network model is obtained by training in the following way: Acquire a positive sample image block containing a sample artifact, a negative sample image block not containing the sample artifact, and an artifact sample image block corresponding to the sample artifact; According to the positive sample image block, the negative sample image block and a pre-established neural network model, determining a positive sample feature vector and a negative sample feature vector output by the neural network model; Based on a preset loss function, determining a positive sample vector difference between the positive sample feature vector and the workpiece feature vector corresponding to the workpiece sample image block, and determining a negative sample vector difference between the negative sample feature vector and the workpiece feature vector corresponding to the workpiece sample image block; Adjusting network parameters in the neural network model according to the positive sample vector difference and the negative sample vector difference; When the training termination condition is reached, the trained neural network model is determined as a target recognition network model.
6. The method according to claim 5, characterized in that The training end condition includes that the positive sample vector difference is less than a first vector threshold, and the negative sample vector difference is greater than a second vector threshold, wherein the second vector threshold is greater than or equal to the first vector threshold.
7. The method according to claim 5, characterized in that The preset loss function includes a triplet loss function.
8. A workpiece position recognition device, characterized in that: include: A design image acquisition module, used to acquire a workpiece design image containing a target workpiece, wherein the workpiece design image is obtained according to a workpiece design file, and the workpiece design file is obtained according to a target material design for producing the target workpiece; An image region determination module is used to determine a target image region containing the target workpiece in the workpiece design image according to the workpiece design image and a pre-trained target recognition network model, wherein the target recognition network model is obtained by training a pre-established neural network model based on positive sample image blocks, negative sample image blocks, and workpiece sample image blocks; The workpiece position determination module is used to determine the position information of the target workpiece in the workpiece design image according to the workpiece standard image corresponding to the target workpiece and the target image area.
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 perform the workpiece position identification method 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 workpiece position identification method according to any one of claims 1 to 7 when executed.