Machine vision detection device and method thereof
By designing a machine vision detection device including a clamping structure, a triggering structure and a tooth ring, the problem of inability to automatically detect the clamped area in the prior art is solved, and efficient automatic clamping of objects and 360° is achieved. No blind spot detection improves detection efficiency and accuracy.
Patent Information
- Application Number
- CN202411680819.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN119438083A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of visual inspection equipment, and in particular to a machine vision inspection device and a method thereof. Background Art
[0002] Machine vision inspection is a high-tech technology that combines optical imaging, visual information processing, artificial intelligence and mechatronics to achieve object recognition, measurement and analysis by simulating human visual functions. This technology has been widely used in modern industry, agriculture and military fields due to its high precision, real-time, high automation and intelligence. The machine vision system captures the image of the target object through a camera, and then uses the image processing system to convert the image feature information into a digital signal, and then extracts the target's features through an algorithm to achieve functions such as automatic recognition, detection and measurement, and guidance and positioning.
[0003] When conducting all-round and multi-angle inspections of objects, machine vision inspection technology can effectively extract and analyze the color, texture, shape and other features of the object. However, existing machine vision inspection devices have certain limitations in actual operation. Specifically, these devices are often unable to inspect the area clamped by the clamping structure during the visual inspection of the object. This means that once the visual inspection device has completed the inspection of other areas of the object, the staff must manually release the clamp, rotate the object, adjust the clamping area, and then re-clamp it in order to inspect the uninspected area. This process is not only cumbersome, but also labor-intensive, affecting the inspection efficiency and the continuity of the production process.
[0004] In view of the above problems, it is urgent to carry out innovative design based on the original visual inspection device. Summary of the invention
[0005] The technical solution of the present invention aims at the technical problem that the existing technical solutions are too single, and provides a machine vision detection device and method thereof that are significantly different from the existing technical solutions to solve the problems raised in the above background technology.
[0006] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a machine vision inspection device, comprising a base, at least four groups of clamping structures are arranged at equal angles on the top of the base, and the lower end of each group of clamping structures is connected to a group of corresponding trigger structures, the trigger structures are arranged on the cavity and the base, and the cavity is opened in the base corresponding to the number of clamping structures, the trigger structure is connected to a gear ring, and the gear ring is sleeved on the outer wall of the base, a number of limit blocks are connected to the inner side of the gear ring at equal angles, and each limit block is snap-fitted and slidably connected to the limit groove, and the limit groove is opened on the outer side of the base in a ring shape, a support frame is installed on the outer side of the gear ring, and a detection probe is provided on the upper end of the support frame, and a driving mechanism for driving the gear ring to rotate is installed on the base.
[0007] Preferably, the clamping structure includes a clamping part, a rotating part and a locking part, the clamping part includes a transverse cylinder, a connecting column, a toothed cross bar, a toothed connecting block, a fitting semicircular block and a reset spring, at least four transverse cylinders are provided on the top of the base, and each transverse cylinder is connected to a connecting column at the bottom, and the lower end of each connecting column is connected to the corresponding trigger structure, each transverse cylinder is connected to a toothed cross bar, each toothed cross bar is rotatably connected to a toothed connecting block at one end close to the base, and each toothed connecting block end is rotatably connected to a fitting semicircular block for fitting to the surface of an object, and the other end of each toothed cross bar is connected to a corresponding rotating part.
[0008] Preferably, the rotating part includes an inclined block, a trigger block, a trigger groove, a liquid channel, a pushing groove, and a pushing gear rod. Each of the toothed cross bars is connected to an inclined block at the other end, and each inclined block is correspondingly fitted with a trigger block, each trigger block is located in the corresponding trigger groove, and each trigger groove is opened at the top of the base, and each trigger groove is connected to a liquid channel, each liquid channel end is connected to a pushing groove, and each pushing groove is provided with a pushing gear rod, and each pushing gear rod is meshed and connected with the toothed connecting block on another cross cylinder in a clockwise direction.
[0009] Preferably, the locking portion includes a locking groove, a locking spring, a locking block, a locking groove, a first extrusion block, an extrusion groove, a second extrusion block, an L-shaped gear rod, a gear rod groove, and a gear rod spring, a plurality of locking grooves are opened in the base at equal intervals corresponding to the connecting column, and each locking groove is connected to a locking spring, each end of the locking spring is connected to a locking block, and each end of the locking block is engaged with the corresponding locking groove, and the locking grooves are respectively opened on the corresponding connecting columns, each of the connecting columns is opened with an extrusion groove, and one end of each extrusion groove is slidably connected to a first extrusion block, and the end of the first extrusion block is located in the locking groove, and the other end of each of the extrusion grooves is slidably connected to a second extrusion block, and each end of the second extrusion block is fitted with the corresponding L-shaped gear rod, the L-shaped gear rod is located in the gear rod groove, and the gear rod groove is opened on the corresponding cross cylinder and the connecting column, the upper end of each L-shaped gear rod is configured to be toothed, and the upper end of the L-shaped gear rod is engaged with the toothed cross bar.
[0010] Preferably, the trigger structure includes a ramp pressure block, a positive magnetic ramp block, a positive trigger block, and a negative trigger block. A ramp pressure block is provided in each of the cavities, and a positive magnetic ramp block is fitted and connected below each ramp pressure block, and the positive magnetic ramp block and the cavity are in a snap-fit sliding connection, a positive trigger block is provided on each of the two symmetrical sides of the top of the tooth block ring, and a negative trigger block is provided on each of the other two symmetrical sides of the top of the tooth block ring, and the positive trigger block and the negative trigger block are both fitted to the outside of the base.
[0011] Preferably, the driving mechanism includes a driving motor and a full gear, the driving motor is installed in the base, and the output end of the driving motor passes through the outer wall of the base and is connected to the full gear, and the side of the full gear is meshed and connected to the gear block ring.
[0012] Preferably, the detection probe is connected to a processor for receiving data information collected during the rotation of the detection probe and performing CSPR feature extraction to find targets and defects.
[0013] The present invention also provides a machine vision detection method, which comprises the following steps:
[0014] The object to be detected is placed between the clamping structures on top of the base;
[0015] Start the drive motor, the gear ring rotates, and the detection probe on the gear ring rotates synchronously to perform 360° lateral detection of the object to be tested;
[0016] The object to be detected is driven to rotate 360° vertically. The lateral rotation of the detection probe is combined with the longitudinal rotation of the object to achieve all-round detection of the object without blind spots.
[0017] The data information collected by the detection probe is transmitted to the processor for CSPR feature extraction, target detection and segmentation to identify the target information.
[0018] Preferably, the CSPR feature extraction is performed in the processor, including the following contents:
[0019] Perform receptive field feature processing on the received detection probe data, and adjust the data dimension through scale transformation;
[0020] The received data is synchronously processed for channel characteristics;
[0021] After scale transformation and data dimension adjustment, the data is processed with position features and saliency features, and the data is fused with channel features.
[0022] Compared with the prior art, the beneficial effects of the present invention are as follows: the machine vision detection device realizes efficient automatic clamping and all-round detection of objects through a carefully designed clamping structure, triggering structure and tooth block ring. The clamping structure is cleverly divided into two groups, two in each group, and they can be symmetrical in pairs. Such a layout not only ensures the stability of the device, but also improves the flexibility of operation. When the robot arm places the object on the device, the drive mechanism is immediately started, automatically activating a group of clamping structures to accurately clamp the object, thereby eliminating the tedious step of manual clamping and fixing, and significantly reducing the labor intensity.
[0023] As the drive mechanism continues to work, the tooth ring rotates around the base, so that the detection probe installed on it can achieve 360° horizontal multi-directional detection of the object. In this process, the trigger structure plays a key role. It can trigger the two sets of clamping parts to switch clamping, ensuring that when the detection probe surrounds the object for detection, the clamping part will not cause obstruction to the object, avoiding interference with the comprehensive detection of the object.
[0024] In addition, when the two sets of clamping parts switch the clamping process of the object, the rotating part will be triggered additionally, which can drive the object clamped by the clamping part to rotate 360° longitudinally. This design cleverly cooperates with the 360° horizontal surround detection probe, thereby realizing a comprehensive 360° detection of the object without dead angles. The whole process does not require manual intervention, eliminating the tedious steps of manual clamping, disassembly, switching the clamping surface of the object, and re-clamping for detection, greatly improving the detection efficiency and accuracy, while reducing the workload of operators. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a schematic diagram of the front cross-sectional structure of the present invention;
[0026] Figure 2 For the present invention Figure 1 The enlarged structural diagram at A in the middle;
[0027] Figure 3It is a schematic diagram of the side cross-sectional structure of the present invention;
[0028] Figure 4 For the present invention Figure 3 The enlarged structural diagram at B in the middle;
[0029] Figure 5 It is a front view structural schematic diagram of the present invention;
[0030] Figure 6 It is a schematic diagram of the top view structure of the present invention;
[0031] Figure 7 Schematic diagram of the process of CSPR feature extraction in the detection method of the present invention;
[0032] Figure 8 Schematic diagram of the module for target detection and segmentation in the detection method of the present invention.
[0033] In the figure: 1, base; 2, clamping structure; 201, horizontal cylinder; 202, connecting column; 203, toothed cross bar; 204, toothed connecting block; 205, fitting semicircular block; 206, reset spring; 207, inclined block; 208, trigger block; 209, trigger groove; 210, liquid channel; 211, push groove; 212, push gear rod; 213, clamping groove; 214, clamping spring; 215, clamping block; 216, clamping groove; 217, first Extrusion block; 218, extrusion groove; 219, second extrusion block; 220, L-shaped gear rod; 221, gear rod groove; 222, gear rod spring; 3, cavity; 4, trigger structure; 401, oblique pressure block; 402, positive magnetic oblique block; 403, positive trigger block; 404, negative trigger block; 5, gear block ring; 6, limit block; 7, limit groove; 8, support frame; 9, detection probe; 10, driving mechanism; 1001, driving motor; 1002, full gear;
[0034] A. Receptive field feature; B. Channel feature; C. Position feature; D. Saliency feature; E. Feature fusion. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0036] See also Figure 1-6The present invention provides a technical solution: a machine vision detection device, including a base 1, a clamping structure 2, a horizontal cylinder 201, a connecting column 202, a toothed crossbar 203, a toothed connecting block 204, a fitting semicircular block 205, a reset spring 206, an inclined block 207, a trigger block 208, a trigger groove 209, a liquid channel 210, a pushing groove 211, a pushing gear rod 212, a positioning groove 213, a positioning spring 214, a positioning block 215, a positioning groove 216, a first squeezing block 217, a squeezing groove 218, a second squeezing block 219, an L-shaped gear rod 220, a gear rod groove 221, a gear rod spring 222, a cavity 3, a trigger structure 4, an oblique pressure block 401, a positive magnetic oblique block 402, a positive trigger block 403, a negative trigger block 404, a gear block ring 5, a limit block 6, a limit groove 7, and a support frame 8, detection probe 9, driving mechanism 10, driving motor 1001, full gear 1002, at least four groups of clamping structures 2 are arranged at equal angles on the top of the base 1, and the lower end of each group of clamping structures 2 is connected to a corresponding trigger structure 4, the trigger structure 4 is arranged on the cavity 3 and the base 1, and the cavity 3 is opened in the base 1 corresponding to the number of clamping structures 2, the trigger structure 4 is connected to the gear block ring 5, and the gear block ring 5 is sleeved on the outer wall of the base 1, and a number of limit blocks 6 are connected to the inner side of the gear block ring 5 at equal angles, and each limit block 6 is snap-fitted and slidably connected in the limit groove 7, and the limit groove 7 is opened on the outside of the base 1 in an annular shape, a support frame 8 is installed on the outside of the gear block ring 5, and a detection probe 9 is provided on the upper end of the support frame 8, and a driving mechanism 10 for driving the gear block ring 5 to rotate is installed on the base 1.
[0037] The clamping structure 2 includes a clamping part, a rotating part and a locking part. The clamping part includes a transverse cylinder 201, a connecting column 202, a toothed cross bar 203, a toothed connecting block 204, a fitting semicircular block 205, and a reset spring 206. At least four transverse cylinders 201 are provided on the top of the base 1, and each transverse cylinder 201 is connected to a connecting column 202 at the bottom, and the lower end of each connecting column 202 is connected to the corresponding trigger structure 4, each transverse cylinder 201 is connected to a toothed cross bar 203, each toothed cross bar 203 is rotatably connected to a toothed connecting block 204 at one end close to the base 1, and each toothed connecting block 204 is rotatably connected to a fitting semicircular block 205 for fitting to the surface of an object at the end, and each toothed cross bar 203 is connected to a corresponding rotating part at the other end.
[0038] The rotating part includes an inclined block 207, a trigger block 208, a trigger groove 209, a liquid channel 210, a push groove 211, and a push gear rod 212. The other end of each toothed cross bar 203 is connected to an inclined block 207, and each inclined block 207 is correspondingly fitted with a trigger block 208, each trigger block 208 is located in the corresponding trigger groove 209, and each trigger groove 209 is opened on the top of the base 1, and each trigger groove 209 is connected to a liquid channel 210, and each end of each liquid channel 210 is connected to a push groove 211, and each push groove 211 is provided with a push gear rod 212, and each push gear rod 212 is clockwise meshed with a toothed connecting block 204 on another horizontal cylinder 201.
[0039] The latching portion includes a latching slot 213, a latching spring 214, a latching block 215, a latching slot 216, a first extrusion block 217, an extrusion slot 218, a second extrusion block 219, an L-shaped gear rod 220, a gear rod slot 221, and a gear rod spring 222. A plurality of latching slots 213 are provided in the base 1 at equal intervals corresponding to the connecting column 202, and each of the latching slots 213 is connected to a latching spring 214, and each end of the latching spring 214 is connected to a latching block 215, and each end of the latching block 215 is engaged with the corresponding latching slot 216, and the latching slots 216 are respectively provided on the corresponding connecting column 202. Each connecting column 202 is provided with an extrusion groove 218, and one end of each extrusion groove 218 is slidably connected to a first extrusion block 217, and the end of the first extrusion block 217 is located in the slot 216, and the other end of each extrusion groove 218 is slidably connected to a second extrusion block 219, and the end of each second extrusion block 219 fits the corresponding L-shaped gear rod 220, the L-shaped gear rod 220 is located in the gear rod groove 221, and the gear rod groove 221 is provided on the corresponding cross cylinder 201 and the connecting column 202, and the upper end of each L-shaped gear rod 220 is configured to be toothed, and the upper end of the L-shaped gear rod 220 is engaged with the toothed cross bar 203.
[0040] The trigger structure 4 includes a ramp pressure block 401, a positive magnetic ramp block 402, a positive trigger block 403, and a negative trigger block 404. A ramp pressure block 401 is provided in each cavity 3, and a positive magnetic ramp block 402 is attached to the bottom of each ramp pressure block 401, and the positive magnetic ramp block 402 and the cavity 3 are in a snap-fitting and sliding connection. A positive trigger block 403 is provided on both symmetrical sides of the top of the tooth block ring 5, and a negative trigger block 404 is provided on both other symmetrical sides of the top of the tooth block ring 5, and the positive trigger block 403 and the negative trigger block 404 are both attached to the outer side of the base 1.
[0041] The driving mechanism 10 includes a driving motor 1001 and a full gear 1002 . The driving motor 1001 is installed in the base 1 , and the output end of the driving motor 1001 passes through the outer wall of the base 1 and is connected to the full gear 1002 . The side of the full gear 1002 is meshedly connected to the gear ring 5 .
[0042] Working principle: as shown in the figure 1, first place the base 1 in the working area. When visual inspection of the object is required, the robot arm grabs the object and transfers it to the top of the base 1. At this time, the driving motor 1001 is started to drive the full gear 1002 to rotate, and the full gear 1002 drives the gear ring 5 to rotate, so that the positive trigger block 403 on the gear ring 5 will first rotate to be parallel to a group of symmetrical positive magnetic bevel blocks 402 in the cavity 3. Under the condition of repulsion at the same level, the positive magnetic bevel block 402 moves, pushing the oblique pressure block 401 to move up, so that the two symmetrical connecting columns 202 move upward on the base 1. After moving to the specified height, the slot 216 on the connecting column 202 and the positioning block 21 5 is aligned, and under the push of the positioning spring 214, the positioning block 215 is moved out of the positioning groove 213 and engaged with the positioning groove 216, so as to position the connecting column 202. As the positioning block 215 enters and engages with the positioning groove 216, it squeezes the first squeezing block 217 in the positioning groove 216 into the squeezing groove 218. Under the push of the hydraulic pressure, the second squeezing block 219 at the other end of the squeezing groove 218 moves into the gear bar groove 221, pushing the L-shaped gear bar 220 to move downward in the gear bar groove 221, disengaging from the engagement with the toothed cross bar 203, and the gear bar spring 222 is compressed. At the same time, the return spring 206 drives the toothed cross bar 203 that has been freed from the restraint to move in the horizontal cylinder 201, approaching the object, and clamping and limiting the object.
[0043] As the driving mechanism 10 drives the tooth block ring 5 to continue to rotate, the detection probe 9 installed on the tooth block ring 5 can rotate around the object to achieve 360° horizontal detection. In this process, when the positive trigger block 403 rotates to be parallel to another group of clamping parts in the cavity 3, the group of clamping parts clamps the object in the same way as above. Since the positive trigger block 403 is longer horizontally and the negative trigger block 404 is longer vertically, when the positive trigger block 403 triggers the group of clamping parts to clamp the object, As the tooth block ring 5 rotates, the negative pole trigger block 404 is aligned with another group of clamping parts, and through the magnetic principle of opposite poles attracting each other, the clamping block 215 is attracted to move into the clamping slot 213, and is disengaged from the clamping slot 216. At the same time, the negative pole trigger block 404 attracts the positive pole magnetic inclined block 402 to move closer in the cavity 3, and the inclined pressure block 401 and the connecting column 202 thereon move downward, and the group of clamping parts is disengaged from the clamping of the object, so as not to affect the detection of the clamping area of the object by the detection probe 9, and realize the lateral 360° detection of the object;
[0044] At the same time, when the horizontal cylinder 201 and the toothed cross bar 203 move down and approach the top of the base 1, the group of downwardly moving clamping parts is parallel to the negative trigger block 404. Under the effect of opposite charges attracting each other, the toothed cross bar 203 is attracted to move close to the negative trigger block 404 in the horizontal cylinder 201. During this process, the inclined block 207 on the end of the toothed cross bar 203 squeezes the trigger block 208 to move down into the trigger groove 209, and under the hydraulic push, enters the push groove 211 through the liquid channel 210, pushes the toothed rod 212 to move up, contacts the toothed connecting block 204 of another group of clamping parts for clamping the object, and meshes with it. As the toothed rod 212 continues to move up, it drives the toothed connecting block 204, the fitting semicircular block 205 and the clamped object to rotate 360° longitudinally, and cooperates with the toothed block ring 5 to drive the detection probe 9 to rotate 360° horizontally, thereby realizing 360° detection of the object without blind spots.
[0045] It should be noted that the detection probe is connected to a processor (the processor mainly performs data processing, not shown in the figure) for receiving data information collected during the rotation of the detection probe and performing CSPR feature extraction to find targets and defects.
[0046] Based on the above machine vision detection device, the present invention also provides a machine vision detection method, such as Figure 7-8 As shown, the detection method includes the following steps: placing the object to be detected between the clamping structures on the top of the base; starting the drive motor, rotating the gear ring, and synchronously rotating the detection probe on the gear ring to perform 360° lateral detection on the object to be detected; driving the object to be detected to perform 360° longitudinal rotation, combining the lateral rotation of the detection probe with the longitudinal rotation of the object to achieve all-round detection of the object without blind spots; transmitting the data information collected by the detection probe to the processor for data processing including CSPR feature extraction, target and defect search.
[0047] Among them, the specific content of all-round detection of objects without blind spots is as follows: due to the unique shapes of the positive trigger block and the negative trigger block, they will respectively trigger two groups of clamping parts to alternately clamp and release the object when rotating. When the lateral end of the positive trigger block is first parallel to a group of positive magnetic bevel blocks, the magnetic bevel blocks will move, pushing the bevel pressure blocks upward, causing the connecting columns to rise and lock, triggering a group of clamping parts to clamp the two sides of the object. As the rotation continues, when the positive trigger block is parallel to another group of positive trigger blocks, the other group of clamping parts is triggered to clamp the object in the same way as above. At this time, the negative trigger block is aligned with the previous group of clamping parts, and the locking block is released through the principle of opposites attracting each other, so that the group of clamping parts can be separated from the clamping of the object, so that the detection probe can detect the object to avoid obstruction.
[0048] During this process, the detection probe on the tooth block ring rotates to achieve 360° horizontal detection of the object. At the same time, when the downward clamping part approaches the top of the base, the negative trigger block attracts the toothed crossbar to move closer, and the trigger block is squeezed into the trigger groove. The hydraulic pusher pushes the toothed rod in the fluid channel upward and engages with the toothed connection block, driving the object to rotate 360° vertically. In this way, the horizontal rotation of the detection probe is combined with the longitudinal rotation of the object to achieve all-round detection of the object without blind spots.
[0049] In a specific embodiment, the work content of CSPR feature extraction in the processor includes:
[0050] After the received detection probe data is preliminarily processed, the receptive field feature processing is performed, and the data dimension is adjusted after scale transformation;
[0051] The received data is synchronously processed with channel characteristics;
[0052] After scale transformation and data dimension adjustment, the data is processed by position feature and saliency feature, and the data is fused with channel feature for easy target detection.
[0053] The expression for the above receptive field feature extraction is:
[0054] F1=Soft max(g i×i (AvgPool(X c (H,W))))×ReLU(BatchNorm(g k×k (X c (H,W)))) (1)
[0055] In the formula, X c is the input feature vector, where the dimension is (C, H, W), and F1 is the output feature result. i×i Represents a group of convolutions, the size is i×i, k represents the convolution kernel size, AvgPool represents the average pooling of feature vectors, BathNorm represents batch normalization using mean and variance, and the Softmax expression is defined as follows:
[0056]
[0057] The expression F2 for the above channel attention feature extraction is:
[0058]
[0059] In the above formula, X cis the input feature vector, where the dimension is (C, H, W), σ is the sigmoid activation function, and δ is the ReLu activation function. W1 and W2 are fully connected operations. Channel attention is a mechanism that focuses on the importance of feature map channels in convolutional neural networks.
[0060] In the above position feature attention extraction, high average pooling and Sigmoid activation function, wide average pooling, convolution, Sigmoid activation function and high width feature fusion are used to finally obtain a feature map of size C×KH×KW. The position attention feature calculation expression is:
[0061] F3=X C (KH,KW)×σ(F KH (f KH ))×σ(F KW (f KW )) (4)
[0062] f=δ(F1([z h ,z w ])) (5)
[0063] In the formula, X c is the input feature vector, where the dimensions are (C, KH, KW), f KH and f KW Use 1×1 convolution to transform into a tensor with the same channels C as X, representing the Sigmoid activation function. F1 is an intermediate feature map containing horizontal and vertical spatial dimensions, and δ represents a nonlinear activation function. [z h ,z w ] represents the link operation along the spatial dimension, and position attention is the model identifying and focusing on specific position information in the image to better understand the image content.
[0064] The expression for significant feature extraction is:
[0065]
[0066] Where Sigmoid is the activation function, X is the input feature vector, the dimension here is (C, KH, KW), W0∈R C / r×C , W1∈R C×C / r The two inputs share the MLP weights W0 and W1, and the ReLu activation function is followed by W0. AvgP is the average pooling of the feature map, and MaxP is the maximum pooling of the feature map. is the average pooling of the input feature map, is the maximum pooling of the input feature map.
[0067] Feature fusion is divided into two parts. One part is the multi-feature extraction multiplicative fusion of the original input feature vector, which is defined as the intermediate attention feature X C _ B (H, W), such as the receptive field feature and channel feature extraction 1 and 2 processing of the above formula.
[0068] The other part is based on the multiplicative fusion result Y of the multi-feature extraction vector after the initial feature extraction c (H, W), for example, the position feature and saliency feature extraction of the above formulas 3 and 4 are based on the result of receptive field feature 1.
[0069]
[0070] Where M is the number of times the first feature map extraction process is performed, where M is 2, N is the number of features proposed in the second time, N in the feature processing of CSPR is 2, σ is the Sigmoid activation function, R is the activation function processing symbol, and F is a sequential attention model, including basic feature acquisition operations such as full connection, combined Conv2d, and MaxPool2d.
[0071] The collected data information is processed, such as Figure 8 As shown, feature fusion is performed to perform feature extraction (feature downsampling), prediction head (feature upsampling), target detection and segmentation to identify the target information.
[0072] First, a 64-channel convolution Conv is performed on the 640×640 image collected by the input detection probe. 3×3 Operation, and then perform another 128-channel Conv k×k deal with.
[0073] The processing feature formula of Conv is as follows:
[0074] F conv =S(BatchNorm(Conv k×k (X))) (9)
[0075] Where S is the ReLu or SiLu activation function, BatchNorm is batch normalization, K is the convolution kernel size, and X is the input feature vector.
[0076] Sent to the C3K2 module. When set to False, the C3K2 module is the C2F module. If the C3K parameter is True, the Bottleneck becomes a more complex C3K module. When the input and output channels are the same, the Bottleneck feature vector is processed as:
[0077] F B =X+Fconv (c2 / 2,c2)(F conv (c1,c2 / 2)) (10)
[0078] Where c1 is the number of input channels and c2 is the number of output channels. conv is the characteristic function of formula (8). X is the input characteristic vector. The characteristic vector processing expression of C2F is:
[0079]
[0080] The eigenvector expressions of C3 and C3K are:
[0081]
[0082] If c3k is set to False throughout, then the C3K2 module is actually the C2F module, which is exactly the same. When the c3k parameter is True, the middle B becomes a slightly more complicated C3K.
[0083] The processed feature vector is then sent to three CSPR feature extractions (such as Figure 7 As shown in the figure) and C3K2 feature extraction, the input and output channels are (256,256), (512,512), and (1024,1024) respectively.
[0084] The feature extraction is finally processed by SPPF and C2PSA. SPPF is spatial pyramid pooling, and the SPPF feature calculation expression is as follows:
[0085]
[0086] C2PSA incorporates the spatial attention mechanism to ensure that the number of input channels is the same as the number of output channels.
[0087] The feature extraction expression is:
[0088]
[0089] The position attention expression in the above formula is:
[0090] F PSABlock =x+MultiHead(x)(c1,0.5,N heads )+F NN (x)(F conv1×1 (c1,c1*2),F conv1×1 (c1*2,c1)) (16)
[0091] Where MultiHead is the basic expression of Transformer.
[0092] The head prediction module is divided into target detection and target segmentation. The target detection defect marks the defect position with a rectangular box, and the target segmentation circles the defect position with curves. The prediction head includes the target position, category, and confidence prediction. At the same time, the loss function is calculated during the training phase to improve the accuracy of the model in predicting position, category, and confidence.
[0093] In this solution, the detection device can drive the object to be detected to rotate 360° longitudinally. The lateral rotation of the detection probe is combined with the longitudinal rotation of the object, and combined with the detection method, all-round detection of the object without blind spots can be achieved.
[0094] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A machine vision inspection device, comprising a base (1), characterized in that: At least four groups of clamping structures (2) are arranged at equal angles on the top of the base (1), and the lower end of each group of clamping structures (2) is connected to a corresponding trigger structure (4). The trigger structure (4) is arranged on the cavity (3) and the base (1), and the number of cavities (3) corresponding to the number of clamping structures (2) is opened in the base (1). The trigger structure (4) is connected to a tooth block ring (5), and the tooth block ring (5) is sleeved on the outer wall of the base (1). A plurality of limit blocks (6) are connected to the inner side of the tooth block ring (5) at equal angles, and each limit block (6) is engaged and slidably connected in a limit groove (7), and the limit groove (7) is opened on the outer side of the base (1) in an annular shape. A support frame (8) is installed on the outer side of the tooth block ring (5), and a detection probe (9) is provided at the upper end of the support frame (8). A driving mechanism (10) for driving the tooth block ring (5) to rotate is installed on the base (1).
2. A machine vision inspection device according to claim 1, characterized in that: The clamping structure (2) comprises a clamping portion, a rotating portion and a clamping portion. The clamping portion comprises a horizontal cylinder (201), a connecting column (202), a toothed cross bar (203), a toothed connecting block (204), a fitting semicircular block (205) and a reset spring (206). At least four horizontal cylinders (201) are provided on the top of the base (1), and each horizontal cylinder (201) is connected to a connecting column (202) at the bottom, and each connecting column (202) is connected to a corresponding trigger structure (4) at its lower end. Each horizontal cylinder (201) is connected to a toothed cross bar (203), and each toothed cross bar (203) is rotatably connected to a toothed connecting block (204) at one end close to the base (1), and each toothed connecting block (204) is rotatably connected to a fitting semicircular block (205) for fitting to the surface of an object at its end, and each toothed cross bar (203) is connected to a corresponding rotating portion at the other end.
3. A machine vision inspection device according to claim 2, characterized in that: The rotating part comprises an inclined block (207), a trigger block (208), a trigger groove (209), a liquid channel (210), a push groove (211), and a push gear rod (212); the other end of each toothed cross bar (203) is connected to an inclined block (207), and each inclined block (207) is correspondingly fitted with a trigger block (208); each trigger block (208) is located in a corresponding trigger groove (209), and each trigger groove (209) is opened at the top of the base (1); each trigger groove (209) is connected to a liquid channel (210); the end of each liquid channel (210) is connected to a push groove (211), and each push groove (211) is provided with a push gear rod (212), and each push gear rod (212) is meshed and connected with a toothed connection block (204) on another horizontal cylinder (201) in a clockwise direction.
4. A machine vision inspection device according to claim 2, characterized in that: The latching portion comprises a latching slot (213), a latching spring (214), a latching block (215), a latching slot (216), a first extrusion block (217), an extrusion slot (218), a second extrusion block (219), an L-shaped gear rod (220), a gear rod slot (221), and a gear rod spring (222); a plurality of latching slots (213) are provided in the base (1) at equal intervals corresponding to the connecting column (202); a latching spring (214) is connected to each of the latching slots (213); an end of each of the latching springs (214) is connected to a latching block (215); an end of each of the latching blocks (215) is engaged with a corresponding latching slot (216); and the latching slots (216) are respectively provided on the corresponding connecting column (202). Each of the connecting columns (202) is provided with an extrusion groove (218), and one end of each extrusion groove (218) is slidably connected to a first extrusion block (217), and the end of the first extrusion block (217) is located in the clamping groove (216), and the other end of each of the extrusion grooves (218) is slidably connected to a second extrusion block (219), and the end of each second extrusion block (219) is fitted with a corresponding L-shaped gear rod (220), the L-shaped gear rod (220) is located in a gear rod groove (221), and the gear rod groove (221) is provided on the corresponding cross cylinder (201) and the connecting column (202), and the upper end of each L-shaped gear rod (220) is configured to be toothed, and the upper end of the L-shaped gear rod (220) is clamped with the toothed cross rod (203).
5. A machine vision inspection device according to claim 1, characterized in that: The trigger structure (4) comprises an inclined pressure block (401), a positive magnetic inclined block (402), a positive trigger block (403), and a negative trigger block (404); each cavity (3) is provided with an inclined pressure block (401), and each inclined pressure block (401) is fitted with a positive magnetic inclined block (402) below, and the positive magnetic inclined block (402) and the cavity (3) are in a snap-fitting and sliding connection; a positive trigger block (403) is provided on two symmetrical sides of the top of the tooth block ring (5), and a negative trigger block (404) is provided on two other symmetrical sides of the top of the tooth block ring (5), and both the positive trigger block (403) and the negative trigger block (404) are fitted to the outside of the base (1).
6. A machine vision inspection device according to claim 1, characterized in that: The driving mechanism (10) comprises a driving motor (1001) and a full gear (1002); the driving motor (1001) is installed in the base (1); the output end of the driving motor (1001) passes through the outer wall of the base (1) and is connected to the full gear (1002); and the side of the full gear (1002) is meshedly connected to the gear block ring (5).
7. A machine vision inspection device according to claim 1, characterized in that: The detection probe (9) is connected to a processor for receiving data information collected during the rotation of the detection probe (9) and performing CSPR feature extraction to find targets and defects.
8. A machine vision detection method, characterized in that: The detection method comprises the following steps: The object to be detected is placed between the clamping structures on top of the base; Start the drive motor, the gear ring rotates, and the detection probe on the gear ring rotates synchronously to perform 360° lateral detection of the object to be tested; The object to be detected is driven to rotate 360° vertically. The lateral rotation of the detection probe is combined with the longitudinal rotation of the object to achieve all-round detection of the object without blind spots. The data information collected by the detection probe is transmitted to the processor for CSPR feature extraction, target detection and segmentation to identify the target information.
9. A machine vision detection method according to claim 8, characterized in that: CSPR feature extraction is performed in the processor, including: Perform receptive field feature processing on the received detection probe data, and adjust the data dimension through scale transformation; The received data is synchronously processed for channel characteristics; After scale transformation and data dimension adjustment, the data is processed with position features and saliency features, and the data is fused with channel features.
Citation Information
Cited By
Polishing device for lens cone
CN119794898A
Garden blade detection system and detection method
CN120870144A
Full-peripheral-side visual detection method, equipment and visual detection system
CN121633103A