Disclosure of Invention
The application aims to provide a target object identification method, a target object identification device, electronic equipment and a computer readable storage medium, and has the advantages of high identification accuracy, small calculated amount and high identification efficiency.
The purpose of the application is realized by adopting the following technical scheme:
in a first aspect, the present application provides a target object identification method, including: acquiring 3D point cloud data of a bearing piece, wherein the 3D point cloud data is obtained by detecting the bearing piece by a 3D detection device, the bearing piece is used for bearing a target object, the 3D point cloud data of the bearing piece comprises coordinate data of a plurality of scanning points in a three-dimensional coordinate system, and three coordinate axes of the three-dimensional coordinate system are respectively marked as an X axis, a Y axis and a Z axis; acquiring the minimum value Z of the coordinate data of all the scanning points in the Z-axis directionminAnd maximum value Zmax(ii) a Obtaining a vector containing [ Zmin,Zmax]The preset interval is divided into N intervals, and the ith interval is [ Z ]imin,Zimax]Wherein i and N are integers, i is not less than 1 and not more than N, ZiminIs the minimum value of the i-th interval, ZimaxIs the maximum value of the ith interval; for eachThe scanning points calculate the adjustment gray scale of the scanning points in the ith interval according to the coordinate data of the scanning points; acquiring two-dimensional image data of the bearing piece in an ith interval according to the adjusted gray scale of all the scanning points in the ith interval; and detecting to obtain an identification result of the bearing member according to the two-dimensional image data of the bearing member in the N sections, wherein the identification result of the bearing member is used for indicating whether the bearing member bears the target object. The technical scheme has the advantages that 3D point cloud data of the bearing piece can be obtained by using 3D detection equipment, a preset interval is obtained and divided according to coordinate data of a plurality of scanning points in the Z-axis direction to obtain N intervals, the adjustment gray level of each scanning point in the ith interval is calculated, so that two-dimensional image data of the bearing piece in the N intervals is obtained, and the identification result of the bearing piece is obtained through detection; secondly, the 2D camera is used for collecting images, and the method has the defects that the 2D camera is used for shooting the images on the front side or the side surface, the image characteristics are easily influenced by illumination, and a misdetection result is generated; the target object identification method comprises the steps of obtaining 3D point cloud data of the bearing piece through scanning of the 3D detection equipment, mapping the 3D point cloud data to a two-dimensional space, and obtaining an identification result of the bearing piece through a computer vision technology.
In some optional embodiments, the preset interval is [ Z ]min,Zmax]. The technical scheme has the beneficial effect that the preset interval can contain [ Z ]min,Zmax]Is the interval with the smallest length, namely [ Zmin,Zmax]The calculation amount is small.
In some optional embodiments, the calculating, for each scanning point, an adjusted gray level of the scanning point in an ith interval according to the coordinate data of the scanning point includes: for eachA scanning point, calculating the adjustment gray level f of the scanning point in the ith interval according to the coordinate data (x, y, z) of the scanning pointi(x,y),
Wherein, C
1、C
2Is an integer of 0 to C
1<C
2255, the int () function is a rounded down function. The technical scheme has the beneficial effects that the adjustment gray level f of each scanning point in the ith interval can be calculated according to the three-dimensional coordinate data (x, y, z) of each scanning point
i(x, y) to map coordinate data of the carrier in the Z-axis direction to C of the i-th zone
1~C
2And obtaining two-dimensional image data of the bearing piece in the ith interval by using the gray value data of the range, obtaining the difference degree of the coordinate data of all scanning points in the Z-axis direction in the ith interval by using the method, and improving the identification capability of the target object on the bearing piece so as to improve the detection rate of the target object.
In some alternative embodiments, C1=0,C2255. The technical scheme has the beneficial effects that C10 and C2When it is 255, fiThe value range of (x, y) is the largest, and the difference degree of the coordinate data of all scanning points in the Z-axis direction in the ith interval is further improved.
In some optional embodiments, the detecting the identification result of the carrier according to the two-dimensional image data of the carrier in N sections includes: acquiring a three-dimensional matrix of the bearing piece according to the two-dimensional image data of the bearing piece in N sections, wherein the dimension of the three-dimensional matrix of the bearing piece is w x h x N, w is the length of the two-dimensional image data of the bearing piece in the N sections, and h is the width of the two-dimensional image data of the bearing piece in the N sections; and detecting to obtain the identification result of the bearing piece according to the three-dimensional matrix of the bearing piece. The technical scheme has the advantages that the three-dimensional matrix of the bearing part can be obtained according to the two-dimensional image data of the bearing part in the N sections, the data processing is high in speed by carrying out basic transformation such as translation, scaling and rotation on the three-dimensional matrix, and the data processing capacity and efficiency are improved.
In some optional embodiments, the detecting the identification result of the carrier according to the two-dimensional image data of the carrier in N sections includes: acquiring a training data set, wherein the training data set comprises a plurality of sample data, each sample data comprises two-dimensional image data of a sample bearing piece in N intervals and marking data of the sample bearing piece, and the marking data of the sample bearing piece comprises an identification result of the sample bearing piece; training by using a neural network model according to the training data set to obtain a target recognition model; and inputting the two-dimensional image data of the bearing piece in the N sections into the target recognition model to obtain the recognition result of the bearing piece. The technical scheme has the advantages that a plurality of sample data can be obtained and used as a training data set, the neural network model is used for training according to the training data set to obtain a target recognition model, and on one hand, the two-dimensional image data of the bearing part in N intervals can be input into the target recognition model to obtain the recognition result of the bearing part; on the other hand, the target recognition model can be formed by training a large amount of sample data, can recognize two-dimensional image data of multiple bearing pieces in N intervals, and is wide in application range and high in intelligence level.
In some optional embodiments, the acquiring the training data set comprises: acquiring a plurality of sample data and putting the sample data into a training data set; and aiming at least one sample datum, obtaining an adjustment result of the two-dimensional image data of the sample bearing member in N intervals, taking the adjustment result of the two-dimensional image data of the sample bearing member in N intervals and the label data of the sample bearing member as new sample data, and putting the new sample data into the training data set. The technical scheme has the advantages that the adjusting result of the two-dimensional image data of the sample bearing part in the N intervals can be obtained and put into the training data set, so that the training data set is greatly expanded, and the recognition capability of the target recognition model is enhanced.
In some optional embodiments, the adjustment result of the two-dimensional image data of the sample carrier in N sections is obtained by adjusting parameters of the two-dimensional image data of the sample carrier in N sections, where the parameters include at least one of: brightness; contrast ratio; noise; saturation degree; dimension; and (4) an angle. The technical scheme has the beneficial effects that the adjusting result of the two-dimensional image data of the sample bearing piece in the N intervals can be obtained by adjusting the parameters of the sample bearing piece in the N intervals, such as brightness, contrast, noise, saturation, scale, angle and the like.
In some optional embodiments, the target recognition model comprises an input layer, a feature extraction network, and a detection header network; the inputting the two-dimensional image data of the bearing part in the N sections into the target recognition model to obtain the recognition result of the bearing part comprises: acquiring a three-dimensional matrix of the bearing piece according to the two-dimensional image data of the bearing piece in N sections, wherein the dimension of the three-dimensional matrix of the bearing piece is w x h x N, w is the length of the two-dimensional image data of the bearing piece in the N sections, and h is the width of the two-dimensional image data of the bearing piece in the N sections; acquiring two-dimensional image data of a contrast bearing member in N intervals to obtain a three-dimensional matrix of the contrast bearing member with the dimension of w multiplied by h multiplied by N, wherein the size of the contrast bearing member is the same as that of the bearing member and the contrast bearing member does not bear the target object; acquiring a composite three-dimensional matrix according to the input layer, the three-dimensional matrix of the bearing part and the three-dimensional matrix of the contrast bearing part; inputting the composite three-dimensional matrix into the feature extraction network to obtain a feature extraction result; and inputting the feature extraction result into the detection head network to obtain the identification result of the bearing piece. The technical scheme has the advantages that the composite three-dimensional matrix can be obtained by using the input layer according to the three-dimensional matrix of the bearing piece and the three-dimensional matrix of the comparison bearing piece, the composite three-dimensional matrix is input into the feature extraction network to obtain a feature extraction result, the feature extraction result is input into the detection head network, and the matching degree of the bearing piece and the comparison bearing piece is detected, so that the identification result of the bearing piece is obtained.
In some optional embodiments, said obtaining a composite three-dimensional matrix from said input layer, said three-dimensional matrix of bearings, and said three-dimensional matrix of control bearings comprises: and splicing the three-dimensional matrix of the bearing part and the three-dimensional matrix of the contrast bearing part in the input layer to obtain a composite three-dimensional matrix with the dimension of w multiplied by h multiplied by 2N. The technical scheme has the beneficial effects that the three-dimensional matrix of the bearing part and the three-dimensional matrix of the contrast bearing part can be spliced in the Z-axis direction in the input layer, so that the composite three-dimensional matrix with the dimension of w multiplied by h multiplied by 2N is obtained.
In a second aspect, the present application provides a target object recognition apparatus, the apparatus comprising: the device comprises a point cloud data acquisition module, a data acquisition module and a data acquisition module, wherein the point cloud data acquisition module is used for acquiring 3D point cloud data of a bearing piece, the 3D point cloud data is obtained by detecting the bearing piece by a 3D detection device, the bearing piece is used for bearing a target object, the 3D point cloud data of the bearing piece comprises coordinate data of a plurality of scanning points in a three-dimensional coordinate system, and three coordinate axes of the three-dimensional coordinate system are respectively marked as an X axis, a Y axis and a Z axis; a maximum value obtaining module for obtaining the minimum value Z of the coordinate data of all the scanning points in the Z-axis directionminAnd maximum value Zmax(ii) a An interval division module for acquiring a value containing [ Zmin,Zmax]The preset interval is divided into N intervals, and the ith interval is [ Z ]imin,Zimax]Wherein i and N are integers, i is not less than 1 and not more than N, ZiminIs the minimum value of the i-th interval, ZimaxIs the maximum value of the ith interval; the gray level calculation module is used for calculating the adjustment gray level of each scanning point in the ith interval according to the coordinate data of the scanning point; the image data acquisition module is used for acquiring two-dimensional image data of the bearing piece in the ith interval according to the adjusted gray scale of all the scanning points in the ith interval; a target identification module, configured to detect an identification result of the carrier according to the two-dimensional image data of the carrier in N sections, where the identification result of the carrier is used to identify the carrierIndicating whether the target object is carried by the carrier.
In some optional embodiments, the preset interval is [ Z ]min,Zmax]。
In some optional embodiments, the gray level calculation module is configured to calculate, for each scanning point, an adjusted gray level f of the scanning point in an i-th interval according to the coordinate data (x, y, z) of the scanning pointi(x,y),
Wherein, C
1、C
2Is an integer of 0 to C
1<C
2255, the int () function is a rounded down function.
In some alternative embodiments, C1=0,C2=255。
In some optional embodiments, the object recognition module comprises: a first matrix obtaining unit, configured to obtain a three-dimensional matrix of the carrier according to two-dimensional image data of the carrier in N sections, where a scale of the three-dimensional matrix of the carrier is w × h × N, where w is a length of the two-dimensional image data of the carrier in the N sections, and h is a width of the two-dimensional image data of the carrier in the N sections; and the target detection unit is used for detecting and obtaining the identification result of the bearing piece according to the three-dimensional matrix of the bearing piece.
In some optional embodiments, the object recognition module comprises: the data set acquisition unit is used for acquiring a training data set, wherein the training data set comprises a plurality of sample data, each sample data comprises two-dimensional image data of a sample bearing member in N intervals and marking data of the sample bearing member, and the marking data of the sample bearing member comprises an identification result of the sample bearing member; the model training unit is used for training by utilizing a neural network model according to the training data set to obtain a target recognition model; and the data input unit is used for inputting the two-dimensional image data of the bearing piece in the N sections into the target recognition model to obtain the recognition result of the bearing piece.
In some optional embodiments, the data set obtaining unit comprises: the sample acquisition subunit is used for acquiring a plurality of sample data and putting the sample data into the training data set; and the sample integration subunit is used for acquiring the adjustment result of the two-dimensional image data of the sample bearing member in the N intervals aiming at least one sample data, taking the adjustment result of the two-dimensional image data of the sample bearing member in the N intervals and the label data of the sample bearing member as new sample data, and putting the new sample data into the training data set.
In some optional embodiments, the adjustment result of the two-dimensional image data of the sample carrier in N sections is obtained by adjusting parameters of the two-dimensional image data of the sample carrier in N sections, where the parameters include at least one of: brightness; contrast ratio; noise; saturation degree; size; and (4) an angle.
In some optional embodiments, the target recognition model comprises an input layer, a feature extraction network, and a detection header network; the object recognition module includes: a second matrix obtaining unit, configured to obtain a three-dimensional matrix of the carrier according to two-dimensional image data of the carrier in N sections, where a scale of the three-dimensional matrix of the carrier is w × h × N, where w is a length of the two-dimensional image data of the carrier in the N sections, and h is a width of the two-dimensional image data of the carrier in the N sections; a third matrix obtaining unit, configured to obtain two-dimensional image data of a comparison carrier in N sections, to obtain a three-dimensional matrix of the comparison carrier with a dimension of w × h × N, where the comparison carrier has the same size as the carrier and does not carry the target object; a composite matrix obtaining unit, configured to obtain a composite three-dimensional matrix according to the input layer, the three-dimensional matrix of the bearing element, and the three-dimensional matrix of the comparison bearing element; the feature extraction unit is used for inputting the composite three-dimensional matrix into the feature extraction network to obtain a feature extraction result; and the result acquisition unit is used for inputting the feature extraction result into the detection head network to obtain the identification result of the bearing piece.
In some optional embodiments, the composite matrix obtaining unit includes: and the matrix splicing subunit is used for splicing the three-dimensional matrix of the bearing piece and the three-dimensional matrix of the contrast bearing piece in the input layer to obtain a composite three-dimensional matrix with the dimension of w multiplied by h multiplied by 2N.
In a third aspect, the present application provides an electronic device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of any of the above methods when executing the computer program.
In some optional embodiments, the electronic device further comprises a laser sensor, and the laser emitted by the laser sensor is perpendicular to the bearing plane of the bearing piece. The technical scheme has the advantages that when the laser emitted by the laser sensor is perpendicular to the bearing plane of the bearing part, the emitted laser can be reflected back to the laser sensor from the original bearing plane of the bearing part, so that a more accurate detection result is obtained.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the methods described above.
Detailed Description
The present application is further described with reference to the accompanying drawings and the detailed description, and it should be noted that, in the present application, the embodiments or technical features described below may be arbitrarily combined to form a new embodiment without conflict.
Referring to fig. 1, an embodiment of the present application provides a target object identification method, which includes steps S101 to S106.
Step S101: the method comprises the steps of obtaining 3D point cloud data of a bearing piece, wherein the 3D point cloud data are obtained by detecting the bearing piece through a 3D detection device, the bearing piece is used for bearing a target object, the 3D point cloud data of the bearing piece comprise coordinate data of a plurality of scanning points in a three-dimensional coordinate system, and three coordinate axes of the three-dimensional coordinate system are respectively marked as an X axis, a Y axis and a Z axis. Specifically, the 3D detection device may be a 3D laser sensor, for example, a 3D line laser sensor, the carrier may be a chip tray, the target object may be a chip, for example, an IC chip, the Z-axis direction may be a direction perpendicular to a horizontal plane, and the Z-axis direction may also be a direction parallel to the horizontal plane.
In a specific embodiment, a 3D line laser sensor with a wavelength of 405nm is fixedly arranged on the detection station, the chip tray is carried by the motion stage to move along a direction perpendicular to the laser line, the sensor is connected with an encoder of the motion stage, and 3D point cloud data of the chip tray is acquired by setting appropriate parameters such as exposure time, gain and sampling frequency.
Step S102: acquiring the minimum value Z of the coordinate data of all the scanning points in the Z-axis directionminAnd maximum value Zmax。
Step S103: obtaining a vector containing [ Zmin,Zmax]The preset interval is divided into N intervals, and the ith interval is [ Z ]imin,Zimax]Wherein i and N are integers, i is not less than 1 and not more than N, ZiminIs the minimum value of the i-th interval, ZimaxIs the maximum value of the ith interval. Specifically, the N intervals may be [ Zmin,Zmax]Obtained by dividing equally or unequally, wherein the i-1 th interval is [ Zi-1min,Zi-1max]The i +1 th interval is [ Zi+1min,Zi+1max],Zi-1max=Zimin,Zimax=Zi+1min。
In one embodiment, the preset interval may be [ Z ]min,Zmax]。
Thus, the predetermined interval may be a time interval including [ Z ]min,Zmax]Is the interval with the smallest length, namely [ Zmin,Zmax]The calculation amount is small.
Step S104: and aiming at each scanning point, calculating the adjustment gray scale of the scanning point in the ith interval according to the coordinate data of the scanning point.
In a specific embodiment, the step S104 may include calculating, for each scanning point, an adjusted gray level f of the scanning point in an i-th interval according to the coordinate data (x, y, z) of the scanning pointi(x,y),
Wherein, C
1、C
2Is an integer of 0 to C
1<C
2Is less than or equal to 255. The int () function, which is one of the VFP numerical functions, rounds a real number to be rounded (which may be a mathematical expression) down to the nearest integer.
Therefore, the adjustment gray level f of each scanning point in the ith interval can be calculated and obtained according to the three-dimensional coordinate data (x, y, z) of each scanning pointi(x, y) to map coordinate data of the carrier in the Z-axis direction to C of the i-th zone1~C2And obtaining two-dimensional image data of the bearing piece in the ith interval by using the gray value data of the range, obtaining the difference degree of the coordinate data of all scanning points in the Z-axis direction in the ith interval by using the method, and improving the identification capability of the target object on the bearing piece so as to improve the detection rate of the target object.
In one embodiment, C1=0,C2=255。
At this time, the process of the present invention,
for example, Zmin=10,Zmax=11,[10,11]Divided into three intervals, [ Z ]1min,Z1max]Is [10,10.4 ]],[Z2min,Z2max]Is [10.4,10.8 ]],[Z3min,Z3max]Is [10.8,11 ]]The coordinate data units in the X-axis, Y-axis and Z-axis directions are all mm.
There are three scan points a (50,20,10.2), B (12,60,10.7) and C (48,35, 10.5).
A (50,20,10.2) is at [10,10.4 ]]G of1(50,20)=0.5,f1(50,20) ═ 127; in [10.4,10.8 ]]G of2(50,20)=-0.5,f2(50,20) ═ 0; in [10.8,11 ]]G of3(50,20)=-3,f3(50,20)=0。
B (12,60,10.7) at [10,10.4 ]]G of1(12,60)=1.75,f1(12,60) ═ 255; in [10.4,10.8 ]]G of2(12,60)=0.75,f2(12,60) ═ 191; in [10.8,11 ]]G of3(12,60)=-0.5,f3(12,60)=0。
C (48,35,10.5) at [10,10.4 ]]G of1(48,35)=1.25,f1(48,35) ═ 255; in [10.4,10.8 ]]G of2(48,35)=0.25,f2(48,35) ═ 63; in [10.8,11 ]]G of3(48,35)=-1.5,f3(48,35)=0。
Thus, C10 and C2When it is 255, fiThe value range of (x, y) is the largest, and the difference degree of the coordinate data of all scanning points in the Z-axis direction in the ith interval is further improved.
Step S105: and acquiring two-dimensional image data of the bearing piece in the ith interval according to the adjusted gray scale of all the scanning points in the ith interval.
Step S106: and detecting to obtain an identification result of the bearing member according to the two-dimensional image data of the bearing member in the N sections, wherein the identification result of the bearing member is used for indicating whether the bearing member bears the target object. Specifically, the recognition result of the carrier may include that the carrier carries the target object, that the carrier does not carry the target object, the position of the target object on the carrier, the number of the target objects on the carrier, the distribution of the target objects on the carrier, and the like.
Therefore, 3D point cloud data of a bearing part can be obtained by using 3D detection equipment, a preset interval is obtained and divided according to coordinate data of a plurality of scanning points in the Z-axis direction to obtain N intervals, the adjustment gray level of each scanning point in the ith interval is calculated, so that two-dimensional image data of the bearing part in the N intervals is obtained, and the identification result of the bearing part is obtained through detection; secondly, the 2D camera is used for collecting images, and the method has the defects that the 2D camera is used for shooting the images on the front side or the side surface, the image characteristics are easily influenced by illumination, and a misdetection result is generated; according to the target object identification method, the 3D point cloud data of the bearing piece are obtained through scanning of the 3D detection equipment, the 3D point cloud data are mapped to the two-dimensional space, and the identification result of the bearing piece is obtained through the computer vision technology.
Referring to fig. 2, in a specific embodiment, the step S106 may include steps S201 to S202.
Step S201: acquiring a three-dimensional matrix of the bearing piece according to the two-dimensional image data of the bearing piece in N sections, wherein the dimension of the three-dimensional matrix of the bearing piece is w x h x N, w is the length of the two-dimensional image data of the bearing piece in the N sections, and h is the width of the two-dimensional image data of the bearing piece in the N sections. Specifically, w may be a length of the two-dimensional image data of the carrier in N sections in the X-axis direction, and h may be a length of the two-dimensional image data of the carrier in N sections in the Y-axis direction.
Step S202: and detecting to obtain the identification result of the bearing piece according to the three-dimensional matrix of the bearing piece.
Therefore, the three-dimensional matrix of the bearing part can be obtained according to the two-dimensional image data of the bearing part in the N sections, the three-dimensional matrix is subjected to basic transformation such as translation, scaling and rotation, the data processing is accelerated, and the capacity and the efficiency of the data processing are improved.
Referring to fig. 3, in a specific embodiment, the step S106 may include steps S301 to S303.
Step S301: the method comprises the steps of obtaining a training data set, wherein the training data set comprises a plurality of sample data, each sample data comprises two-dimensional image data of a sample bearing piece in N intervals and marking data of the sample bearing piece, and the marking data of the sample bearing piece comprises an identification result of the sample bearing piece. The method for acquiring the two-dimensional image data of the sample bearing member in the N intervals is similar to the method for acquiring the two-dimensional image data of the bearing member in the N intervals, and details are not repeated here.
Referring to fig. 4, in a specific embodiment, the step S301 may include steps S401 to S402.
Step S401: a plurality of sample data is acquired and placed in a training data set.
Step S402: and aiming at least one sample datum, obtaining an adjustment result of the two-dimensional image data of the sample bearing member in N intervals, taking the adjustment result of the two-dimensional image data of the sample bearing member in N intervals and the label data of the sample bearing member as new sample data, and putting the new sample data into the training data set.
Therefore, the adjusting result of the two-dimensional image data of the sample bearing part in the N intervals can be obtained and put into the training data set, the training data set is greatly expanded, and the recognition capability of the target recognition model is enhanced.
In a specific embodiment, the adjustment result of the two-dimensional image data of the sample carrier in the N sections may be obtained by adjusting parameters of the two-dimensional image data of the sample carrier in the N sections, where the parameters may include at least one of: brightness; contrast ratio; noise; saturation degree; dimension; and (4) an angle. Specifically, operations such as adjusting brightness, adjusting contrast, increasing noise, increasing saturation, clipping, rotating, flipping, and the like may be performed on the two-dimensional image data of the sample carrier in the N sections.
Therefore, the adjustment result of the two-dimensional image data of the sample carrier in the N sections can be obtained by adjusting the parameters of the two-dimensional image data of the sample carrier in the N sections, such as brightness, contrast, noise, saturation, scale, angle and the like.
Step S302: and training by using a neural network model according to the training data set to obtain a target recognition model.
Step S303: and inputting the two-dimensional image data of the bearing piece in the N sections into the target recognition model to obtain the recognition result of the bearing piece.
Therefore, a plurality of sample data can be obtained and used as a training data set, and a neural network model is used for training according to the training data set to obtain a target recognition model, on one hand, two-dimensional image data of the bearing part in N intervals can be input into the target recognition model to obtain a recognition result of the bearing part; on the other hand, the target recognition model can be formed by training a large amount of sample data, can recognize two-dimensional image data of multiple bearing pieces in N intervals, and is wide in application range and high in intelligence level.
Referring to fig. 5, in a specific embodiment, the target recognition model may include an input layer, a feature extraction network, and a detection header network; the step S303 may include steps S501 to S505.
Step S501: acquiring a three-dimensional matrix of the bearing piece according to the two-dimensional image data of the bearing piece in N sections, wherein the dimension of the three-dimensional matrix of the bearing piece is w x h x N, w is the length of the two-dimensional image data of the bearing piece in the N sections, and h is the width of the two-dimensional image data of the bearing piece in the N sections.
Step S502: acquiring two-dimensional image data of a contrast bearing member in N intervals to obtain a three-dimensional matrix of the contrast bearing member with the dimension of w multiplied by h multiplied by N, wherein the size of the contrast bearing member is the same as that of the bearing member, and the contrast bearing member does not bear the target object. For example, when the carrier is a tray, the control carrier may be a blank tray.
Step S503: and acquiring a composite three-dimensional matrix according to the input layer, the three-dimensional matrix of the bearing part and the three-dimensional matrix of the contrast bearing part.
In a specific embodiment, the step S503 may include: and splicing the three-dimensional matrix of the bearing part and the three-dimensional matrix of the contrast bearing part in the input layer to obtain a composite three-dimensional matrix with the dimension of w multiplied by h multiplied by 2N.
Therefore, the three-dimensional matrix of the bearing piece and the three-dimensional matrix of the comparison bearing piece can be spliced in the Z-axis direction in the input layer, so that a composite three-dimensional matrix with the dimension of w multiplied by h multiplied by 2N is obtained.
Step S504: and inputting the composite three-dimensional matrix into the feature extraction network to obtain a feature extraction result.
Step S505: and inputting the feature extraction result into the detection head network to obtain the identification result of the bearing piece.
Therefore, the composite three-dimensional matrix can be obtained by the input layer according to the three-dimensional matrix of the bearing piece and the three-dimensional matrix of the comparison bearing piece, the composite three-dimensional matrix is input into the feature extraction network to obtain a feature extraction result, the feature extraction result is input into the detection head network, and the matching degree of the bearing piece and the comparison bearing piece is detected, so that the identification result of the bearing piece is obtained.
Referring to fig. 6, in a specific embodiment, the step S106 may include steps S601 to S603.
Step S601: the method comprises the steps of obtaining a training data set, wherein the training data set comprises a plurality of sample data, each sample data comprises a three-dimensional matrix of a sample bearing member and marking data of the sample bearing member, and the marking data of the sample bearing member comprises an identification result of the sample bearing member.
Step S602: and training by using a neural network model according to the training data set to obtain a target recognition model.
Step S603: and inputting the three-dimensional matrix of the bearing piece into the target recognition model to obtain the recognition result of the bearing piece.
Therefore, a plurality of sample data can be obtained and used as a training data set, and the neural network model is used for training according to the training data set to obtain a target recognition model, on one hand, the recognition result of the bearing part can be obtained by inputting the three-dimensional matrix of the bearing part into the target recognition model; on the other hand, the target identification model can be formed by training a large amount of sample data, can identify three-dimensional matrixes of various bearing pieces, and is wide in application range and high in intelligence level.
Referring to fig. 7, an embodiment of the present application further provides a target object identification apparatus, and a specific implementation manner of the target object identification apparatus is consistent with the implementation manner and the achieved technical effect described in the embodiment of the foregoing method, and details are not repeated.
The device comprises: the system comprises a point cloud data acquisition module 101, a data acquisition module and a data acquisition module, wherein the point cloud data acquisition module 101 is used for acquiring 3D point cloud data of a bearing piece, the 3D point cloud data is obtained by detecting the bearing piece by a 3D detection device, the bearing piece is used for bearing a target object, the 3D point cloud data of the bearing piece comprises coordinate data of a plurality of scanning points in a three-dimensional coordinate system, and three coordinate axes of the three-dimensional coordinate system are respectively marked as an X axis, a Y axis and a Z axis; a maximum value obtaining module 102, configured to obtain a minimum value Z of the coordinate data of all the scanning points in the Z-axis directionminAnd maximum value Zmax(ii) a An interval division module 103 for obtaining a value containing [ Zmin,Zmax]The preset interval is divided into N intervals, and the ith interval is [ Z ]imin,Zimax]Wherein i and N are integers, i is not less than 1 and not more than N, ZiminIs the minimum value of the i-th interval, ZimaxIs the maximum value of the ith interval; a gray level calculating module 104, configured to calculate, for each scanning point, an adjustment gray level of the scanning point in an ith interval according to the coordinate data of the scanning point; an image data obtaining module 105, configured to obtain two-dimensional image data of the bearing in an ith interval according to the adjusted gray levels of all the scanning points in the ith interval; and the target identification module 106 is configured to detect an identification result of the carrier according to the two-dimensional image data of the carrier in the N sections, where the identification result of the carrier is used to indicate whether the carrier carries the target object.
In one embodiment, the preset interval may be [ Z ]min,Zmax]。
In a specific embodiment, the gray level calculation module 104 may be configured to calculate, for each scanning point, an adjusted gray level f of the scanning point in an i-th interval according to the coordinate data (x, y, z) of the scanning pointi(x,y),
Wherein, C
1、C
2Is an integer of 0 to C
1<C
2255, the int () function is a rounded down function.
In one embodiment, C1=0,C2=255。
Referring to fig. 8, in a specific embodiment, the object recognition module 106 may include: a first matrix obtaining unit 1061, configured to obtain a three-dimensional matrix of the carrier according to two-dimensional image data of the carrier in N sections, where a dimension of the three-dimensional matrix of the carrier is w × h × N, where w is a length of the two-dimensional image data of the carrier in N sections, and h is a width of the two-dimensional image data of the carrier in N sections; the object detection unit 1062 may be configured to detect an identification result of the carrier according to the three-dimensional matrix of the carrier.
Referring to fig. 9, in a specific embodiment, the object recognition module 106 may include: a data set obtaining unit 1063, configured to obtain a training data set, where the training data set may include a plurality of sample data, each sample data may include two-dimensional image data of a sample carrier in N intervals and annotation data of the sample carrier, and the annotation data of the sample carrier may include an identification result of the sample carrier; the model training unit 1064 may be configured to perform training using a neural network model according to the training data set to obtain a target recognition model; the data input unit 1065 may be configured to input the two-dimensional image data of the carrier in the N sections into the target recognition model, so as to obtain a recognition result of the carrier.
Referring to fig. 10, in a specific embodiment, the data set obtaining unit 1063 may include: a sample acquiring subunit 1063a, configured to acquire a plurality of sample data and place the sample data into a training data set; the sample integration subunit 1063b may be configured to, for at least one sample data, obtain an adjustment result of the two-dimensional image data of the sample carrier in the N intervals, use the adjustment result of the two-dimensional image data of the sample carrier in the N intervals and the label data of the sample carrier as new sample data, and place the new sample data into the training data set.
In a specific embodiment, the adjustment result of the two-dimensional image data of the sample carrier in the N sections may be obtained by adjusting parameters of the two-dimensional image data of the sample carrier in the N sections, where the parameters may include at least one of: brightness; contrast ratio; noise; saturation degree; size; and (4) an angle.
Referring to fig. 11, in a specific embodiment, the target recognition model may include an input layer, a feature extraction network, and a detection header network; the object recognition module 106 may include: a second matrix obtaining unit 1066, configured to obtain a three-dimensional matrix of the carrier according to the two-dimensional image data of the carrier in N sections, where a dimension of the three-dimensional matrix of the carrier is w × h × N, where w is a length of the two-dimensional image data of the carrier in N sections, and h is a width of the two-dimensional image data of the carrier in N sections; a third matrix obtaining unit 1067, configured to obtain two-dimensional image data of a comparison carrier in N sections, so as to obtain a three-dimensional matrix of the comparison carrier with a dimension w × h × N, where the size of the comparison carrier is the same as that of the carrier and the comparison carrier does not carry the target object; a composite matrix obtaining unit 1068, configured to obtain a composite three-dimensional matrix according to the input layer, the three-dimensional matrix of the bearing element, and the three-dimensional matrix of the comparison bearing element; a feature extraction unit 1069, configured to input the composite three-dimensional matrix into the feature extraction network to obtain a feature extraction result; a result obtaining unit 1160, configured to input the feature extraction result into the detection head network, so as to obtain an identification result of the carrier.
Referring to fig. 12, in a specific embodiment, the composite matrix obtaining unit 1068 may include: the matrix splicing subunit 1068a may be configured to splice the three-dimensional matrix of the carrier and the three-dimensional matrix of the comparison carrier in the input layer, so as to obtain a composite three-dimensional matrix with a dimension w × h × 2N.
Referring to fig. 13, an embodiment of the present application further provides an electronic device 200, where the electronic device 200 includes at least one memory 210, at least one processor 220, and a bus 230 connecting different platform systems.
The memory 210 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)211 and/or cache memory 212, and may further include Read Only Memory (ROM) 213.
The memory 210 further stores a computer program, and the computer program can be executed by the processor 220, so that the processor 220 executes the steps of the target object identification method in the embodiment of the present application, and a specific implementation manner of the method is consistent with the implementation manner and the achieved technical effect described in the embodiment of the method, and a part of the content is not described in detail.
Memory 210 may also include a program/utility 214 having a set of program modules 215, such program modules 215 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Accordingly, processor 220 may execute the computer programs described above, as well as may execute programs/utilities 214.
Bus 230 may be a local bus representing one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or any other type of bus structure.
The electronic device 200 may also communicate with one or more external devices 240, such as a keyboard, pointing device, bluetooth device, etc., and may also communicate with one or more devices capable of interacting with the electronic device 200, and/or with any devices (e.g., routers, modems, etc.) that enable the electronic device 200 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 250. Also, the electronic device 200 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 260. The network adapter 260 may communicate with other modules of the electronic device 200 via the bus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, to name a few.
In a specific embodiment, the electronic device 200 may further include a laser sensor (not shown in the figure), and the laser emitted by the laser sensor may be perpendicular to the bearing plane of the bearing member. The bearing plane of the bearing part is used for bearing the target object. Specifically, the laser sensor is, for example, a 3D line laser sensor, the carrier is, for example, a chip tray, and the target object is, for example, a chip. The number of chips carried by the chip tray may be one or more.
In one embodiment, a 3D line laser sensor with a wavelength of 405nm is fixedly arranged on the detection station, and the moving carrier carries the chip tray to move along a direction perpendicular to the laser line.
Therefore, when the laser emitted by the laser sensor is perpendicular to the bearing plane of the bearing part, the emitted laser can be reflected back to the laser sensor from the original circuit of the bearing plane of the bearing part, and therefore a more accurate detection result is obtained.
The embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, and when the computer program is executed, the steps of the target object identification method in the embodiments of the present application are implemented, and a specific implementation manner of the method is consistent with the implementation manner and the achieved technical effect described in the embodiments of the method, and some contents are not described again.
Fig. 14 shows a program product 300 provided by the present embodiment for implementing the method, which may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer. However, the program product 300 of the present invention is not so limited, and in this application, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Program product 300 may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that can communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the C language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
While the present application is described in terms of various aspects, including exemplary embodiments, the principles of the invention should not be limited to the disclosed embodiments, but are also intended to cover various modifications, equivalents, and alternatives falling within the spirit and scope of the invention as defined by the appended claims.