Visual online detection equipment and method for foreign matters and appearance of soft infusion bag

By designing a visual online detection device for infusion soft bags, using multi-angle image acquisition and deep learning algorithms, the problem of low detection accuracy caused by problems such as inability to rotate and wrinkle interference in traditional detection is solved, and efficient online detection of foreign objects and appearance is achieved, and production efficiency and product quality are improved.

CN119838895APending Publication Date: 2025-04-18CHINA UNIV OF MINING & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510226479.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

In the prior art, the detection of infusion soft bags has factors such as inability to rotate, wrinkle interference, and adherence to foreign objects, resulting in low detection accuracy and inability to effectively detect foreign objects and appearance problems.

Method used

A visual online inspection device is designed, including a rack, conveying chain mechanism, feeding mechanism, discharge mechanism, inspection mechanism and kicking mechanism. Driven by the conveying chain mechanism, the infusion soft bag undergoes various postures such as tilting, laying, and erecting under the action of the feeding mechanism and the discharge mechanism. It uses multiple detection components to collect multi-angle image, and combines deep learning algorithms (such as YOLO) to detect foreign objects and appearance.

Benefits of technology

It effectively solves the problem of low detection accuracy caused by problems such as inability to rotate and wrinkle interference in traditional testing, improves the production efficiency and product quality of infusion soft bags, and achieves efficient online detection of foreign objects and appearance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119838895A_ABST
    Figure CN119838895A_ABST
Patent Text Reader

Abstract

The invention discloses visual online detection equipment and method for foreign matter and appearance of a soft infusion bag, and belongs to the technical field of infusion bag detection equipment.The visual online detection equipment comprises a rack, a conveying chain mechanism is installed on the rack, a feeding mechanism is installed at the feeding end of the rack, and a discharging mechanism is installed at the discharging end of the rack; the feeding mechanism and the discharging mechanism are the same in structure and are symmetrically arranged, the detection mechanism and the waste kicking mechanism are installed on the portion, between the feeding mechanism and the discharging mechanism, of the rack, the detection mechanism is close to the feeding mechanism, and the waste kicking mechanism is close to the discharging mechanism. According to the visual online detection equipment and method for the foreign matter and the appearance of the soft infusion bag, the problem that in traditional soft bag detection, detection cannot be conducted or the detection accuracy is low due to the fact that rotation cannot be conducted, wrinkle interference exists, and the foreign matter adheres to the wall is solved, and the production efficiency and the product quality of the soft bag are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of infusion bag detection equipment, and in particular to a visual online detection device and method for detecting foreign matter and appearance of an infusion soft bag. Background Art

[0002] In the existing technology, PVC soft bags, as the second-generation infusion container, have solved the air pollution problem of semi-open infusion in round bottles in the clinical practice. Therefore, the current mainstream pharmaceutical companies in China have gradually increased the production of infusion soft bag preparations, and traditional polypropylene round bottle infusion preparations are gradually decreasing.

[0003] Due to the wrinkles, variety, obstruction of printed fonts and other reasons of soft infusion bags, as well as the special nature of soft bag packaging containers, there are many unimaginable difficulties in using automatic equipment for inspection. First of all, this kind of flat bag that cannot stand upright is difficult to load, because the packaging itself is soft and has no fixed shape, it is not convenient for the machine to apply force to clamp, and the soft bag is easily damaged during the clamping process. At present, there is no special visual inspection equipment and visual inspection scheme for the detection of foreign matter and appearance of soft infusion bags. Most pharmaceutical companies still mainly use manual inspection for the inspection of soft infusion bags. Manual inspection has many unstable factors, low efficiency, and is prone to emotional fluctuations, resulting in a large number of missed inspections in actual production. Because the quality problems of soft infusion bags such as foreign matter and damaged appearance are related to people's life safety, the automated inspection of foreign matter and appearance is urgent.

[0004] Therefore, how to provide a visual online detection device and method for foreign matter and appearance of infusion soft bags is a problem that technical personnel in this field urgently need to solve. Summary of the invention

[0005] The purpose of the present invention is to provide a visual online inspection device and method for foreign matter and appearance of infusion soft bags, which solves the problems of being unable to detect or having low detection accuracy caused by many factors such as the inability to rotate, wrinkle interference, and foreign matter adhering to the wall in traditional soft bag inspection, thereby greatly improving the production efficiency and product quality of soft bags.

[0006] To achieve the above-mentioned objectives, the present invention provides a visual online inspection device for foreign matter and appearance of soft infusion bags, comprising a frame, a conveyor chain mechanism installed on the frame, a feeding mechanism installed at the feeding end of the frame, and a discharging mechanism installed at the discharging end of the frame. The feeding mechanism and the discharging mechanism have the same structure and are arranged symmetrically. A detection mechanism and a kicking mechanism are installed on the frame between the feeding mechanism and the discharging mechanism, and the detection mechanism is close to the feeding mechanism, and the kicking mechanism is close to the discharging mechanism.

[0007] Preferably, the conveying chain mechanism includes a supporting wheel assembly frame, which is connected to the driving unit, and the driving unit and the supporting wheel assembly frame are both installed on the frame. The supporting wheel assembly is provided with a conveying chain, and U-shaped claws are fixed on the conveying chain. A guide belt is fixed on the supporting wheel assembly frame, and the guide belt is arranged along the conveying direction of the conveying chain. A guide assembly is provided on one side of the conveying chain, and the guide assembly is installed on the frame and is located behind four rollers. The guide assembly includes a plurality of rotating rollers and a rotating ball group, and the plurality of rotating rollers are arranged in sequence along the conveying direction of the conveying chain, and the angle between the plurality of rotating rollers and the vertical plane formed with the conveying chain gradually decreases; the rotating ball group is located behind the rotating shaft and is arranged vertically.

[0008] Preferably, the feeding mechanism includes a feeding support frame, rollers and a round belt. The support frame is fixed on the frame. There are four rollers. The rollers are connected to the feeding support frame and rotate in sequence along the conveying direction of the conveyor chain. The axes of the rollers are perpendicular to the conveying direction of the conveyor chain. The rollers are of a frustum structure. The ends with smaller diameters of the two rollers at the front along the conveying direction of the conveyor chain are close to the conveyor chain, and the ends with smaller diameters of the other two rollers are away from the conveyor chain. The round belt is mounted on the four rollers.

[0009] Preferably, the detection mechanism includes a first detection component, a second detection component, a third detection component and a fourth detection component, the first detection component includes two front detection stations, the two front detection stations are arranged in sequence along the conveying direction of the conveyor chain, each front detection station includes a first camera support frame, a front detection camera, a first backlight light source and a first bottom light source, the first camera support frame is fixed on the frame and is located on the same side of the feeding mechanism, the front detection camera is fixed on the first camera support frame, the first backlight light source is fixed on the frame and is located on the other side of the front detection camera, the first bottom light source is fixed on the frame and is located below the conveyor chain, and at least one of the two front detection stations is equipped with a neck detection camera and a bottom detection camera on the first camera support frame.

[0010] Preferably, the second detection component includes two back detection stations arranged in sequence along the conveying direction of the conveyor chain, each back detection station includes a second camera support frame, a back detection camera, a second backlight source and a second bottom light source, the second camera support frame is fixed on the frame and is located on the other side of the feeding mechanism, the back detection camera is fixed on the second camera support frame, the second backlight source is fixed on the frame and is located on the other side of the back detection camera, the second bottom light source is fixed on the frame and is located below the conveyor chain, and the two back detection stations and the two front detection stations are arranged alternately.

[0011] Preferably, the third detection component includes a front appearance detection camera and a third backlight source, the front appearance detection camera is fixed on the frame and located at any back detection station, and the third backlight source is fixed on the frame and corresponds to the front appearance detection camera.

[0012] Preferably, the fourth detection component includes a mirror assembly, a first back appearance detection camera and a second back appearance detection camera, the mirror assembly is composed of an ordinary plane mirror or a prism with the same function, the mirror assembly is fixed on the mounting plate of the frame, the first back appearance detection camera and the second back appearance detection camera are fixed on the second camera support frame through a connecting part, and are located at any front detection station, and one of the cameras is at the same shooting position as the front detection camera.

[0013] Preferably, the waste kicking mechanism comprises a cylinder fixed on a frame, and a waste kicking sliding block fixed on a telescopic end of the cylinder, and the telescopic end of the cylinder faces upward.

[0014] A visual online detection method for foreign matter and appearance of an infusion soft bag comprises the following steps:

[0015] S1. The infusion bag is transported to the feeding mechanism, and the feeding mechanism changes the infusion bag from a horizontal position with its head down to a sinking and tilting position, and the infusion bag experiences a shake;

[0016] S2. Driven by the conveyor chain mechanism of the equipment, the infusion bag changes from the downward tilting state to the upright state again, and the foreign matter shakes violently with the liquid in the infusion bag;

[0017] S3. The clamping claw drives the upright infusion bag to move quickly to the inspection station. During the movement, a guide belt is added to drag the bottom to prevent the infusion bag from shaking at will;

[0018] S4, the infusion soft bag arrives at the first front inspection station of the first inspection component, triggering the sensor, the first backlight light source, the third backlight light source and the first bottom light source are synchronously and alternately flashed fast, when the first backlight light source and the third backlight light source are synchronously lit, the neck inspection camera, the front inspection camera, the bottom inspection camera, the front appearance inspection camera, and the first back appearance inspection camera synchronously take pictures, and when the first bottom light source is lit, the front inspection camera synchronously takes pictures;

[0019] S5. When the infusion soft bag reaches the second inspection camera station of the back appearance, keep the ambient light or add other shadowless light sources to allow the bag head to be illuminated with sufficient light. This station has a set of reflector components to reflect the back image of the bottle mouth. Adjust the second inspection camera of the back appearance and the reflector components to maintain a suitable angle so that the camera is triggered to take pictures and collect the back image of the bottle mouth;

[0020] S6, the infusion soft bag arrives at the first backside inspection station of the second inspection assembly, the second backlight source and the second bottom light source are alternately and rapidly strobed, and when the second backlight source is lit, the backside inspection cameras take pictures synchronously;

[0021] S7, the infusion soft bag arrives at the second front inspection station of the first inspection assembly, the first backlight source and the first bottom light source are alternately and rapidly strobed, and the cameras take pictures synchronously respectively;

[0022] S8, the infusion soft bag arrives at the second back detection station of the second detection assembly, the second backlight source and the second bottom light source are alternately and rapidly strobed, and when the second backlight source is lit, the back detection cameras take pictures synchronously;

[0023] S9. The computer obtains one image each of the soft bags S5 to S8 taken by the front detection camera and the back detection camera with the bottom light and the back light alternately taken. The two front and back photos obtained by the two sets of devices are used to detect whether there are foreign objects in the pictures. If not, they are not rejected. If foreign objects are detected, the confidence of the output label is further compared with the set confidence. If the confidence of the output label is greater than the set label confidence, it is considered to be detected normally, and the unqualified infusion soft bag is rejected; otherwise, it is considered to be free of foreign objects and is not rejected;

[0024] S10, the computer obtains an image taken by the neck detection camera, the bottom detection camera, the front appearance detection camera, the first back appearance detection camera, and the second back appearance detection camera in S5, and determines whether there are defects in the head appearance, whether there are foreign objects and defects in the neck by analyzing and processing the images. The bottom detection camera assists in determining whether there are large black foreign objects at the bottom of the soft bag, and the front appearance detection camera assists in determining whether there are foreign objects on the liquid surface;

[0025] S11. The discarding mechanism decides whether to discard the infusion soft bag based on the comprehensive judgment result.

[0026] Therefore, the present invention adopts the above-mentioned visual online detection device and method for foreign matter and appearance of infusion soft bags, which has the following beneficial effects:

[0027] 1. The present invention uses the first detection component and the second detection component to take interval photos of the same infusion soft bag to obtain high-definition images. At the same time, the third detection component captures the appearance features of the head, analyzes and compares the collected pictures and outputs the results. The kicking mechanism kicks out defective products according to the output results. The use of this technical solution solves the problems of being unable to detect or having low detection accuracy caused by many factors such as the inability to rotate, wrinkle interference, and foreign matter attached to the wall in traditional soft bag detection, greatly improving the production efficiency and product quality of soft bags.

[0028] 2. The present invention cleverly utilizes the feeding mechanism and the conveying chain mechanism to produce tilted, flat, upright and continuous shaking postures, so that small foreign objects can be effectively moved, and large static foreign objects can be innovatively identified by photographing through deep learning. Without affecting product production, it effectively realizes the online visual inspection of foreign objects and appearance. This equipment has a simple structure and novel methods and has extremely high social value.

[0029] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a front view of the detection device provided by the present invention;

[0031] Figure 2 is a rear view of the detection device provided by the present invention;

[0032] Figure 3 is a schematic structural diagram of the back side of the detection device provided by the present invention;

[0033] Figure 4 is a partial enlarged view of A provided by the present invention;

[0034] Figure 5 It is a structural schematic diagram of the matching parts of the feeding mechanism and the conveying chain mechanism provided by the present invention;

[0035] Figure 6 It is a schematic diagram of the structure of the front side of the detection device provided by the present invention;

[0036] Figure 7 It is a partial enlarged view of C provided by the present invention;

[0037] Figure 8 It is a partial enlarged view of B provided by the present invention;

[0038] Fig. 9 It is a structural schematic diagram of the waste kicking mechanism provided by the present invention;

[0039] Fig.10 It is a schematic diagram of the structure of the SE module provided by the present invention;

[0040] Fig.11 It is a schematic diagram of the YOLOX algorithm structure provided by the present invention.

[0041] Reference numerals

[0042] 1. Frame; 2. Conveyor chain mechanism; 21. Conveyor chain; 22. Clamping claw; 23. Support wheel assembly frame; 24. Driving unit; 25. Guide belt; 26. Guide assembly; 261. Rotating roller; 262. Rotating ball assembly; 3. Feeding mechanism; 31. Feeding support frame; 32. Roller; 33. Round belt; 4. Discharging mechanism; 5. Detection mechanism; 51. First detection assembly; 511. First camera support frame; 512. Front detection camera; 513. First backlight source; 514. First bottom light source; 515 , neck detection camera; 516, bottom detection camera; 52, second detection component; 521, second camera support frame; 522, back detection camera; 523, second backlight source; 524, second bottom light source; 53, third detection component; 531, front appearance detection camera; 532, third backlight source; 54, fourth detection component; 541, reflector component; 542, first back appearance detection camera; 543, second back appearance detection camera; 6, kicking mechanism; 61, cylinder; 62, kicking slider. DETAILED DESCRIPTION

[0043] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.

[0044] Unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0045] Embodiment 1

[0046] like Figures 1 to 11As shown, the present invention provides a visual online inspection device for foreign matter and appearance of soft infusion bags, including a frame 1, which is a long strip frame in the horizontal direction. A conveyor chain mechanism 2 is installed on the frame 1, and the conveyor chain mechanism 2 can perform a cyclic conveying motion along the length direction of the frame 1. A feeding mechanism 3 is installed at the feeding end of the frame 1, and a discharging mechanism 4 is installed at the discharging end of the frame 1. The feeding mechanism 3 and the discharging mechanism 4 have the same structure and are symmetrically arranged. The feeding mechanism 3 is used to convey and shake the soft infusion bag, and the discharging mechanism 4 is used to take out the soft infusion bag and transport it outward. A detection mechanism 5 and a kicking mechanism 6 are installed on the frame 1 between the feeding mechanism 3 and the discharging mechanism 4. The detection mechanism 5 is close to the feeding mechanism 3, and the kicking mechanism 6 is close to the discharging mechanism 4. The detection mechanism 5 is used to detect the soft infusion bag, and the kicking mechanism 6 kicks out defective products according to the output results.

[0047] The feeding mechanism 3 includes a feeding support frame 31, rollers 32 and a round belt 33. The support frame is fixed on the frame 1. There are four rollers 32. The rollers 32 are connected to the feeding support frame 31 in turn and rotate along the conveying direction of the conveying chain 21. The feeding support frame 31 provides support for the rollers 32. The axis of the rollers 32 is perpendicular to the conveying direction of the conveying chain 21. The rollers 32 are truncated cone structures. The ends of the two rollers 32 that are closer to the conveying direction of the conveying chain 21 have smaller diameters, and the ends of the other two rollers 32 that have smaller diameters are away from the conveying chain 21. The round belt 33 is sleeved on the four rollers 32. The function of the truncated cone-shaped roller 32 is to allow the infusion soft bag transported from the conveyor belt to gradually change from a flat position to a head slightly tilted downward by 10-20 degrees, and then change from a head-down tilted position to an upright position when being transported to the conveying chain 21. Foreign matter will move violently under the action of gravity as the infusion soft bag is turned upside down, which is convenient for the next step of manual inspection or visual inspection.

[0048] The conveyor chain mechanism 2 includes a support wheel assembly frame 23, which is connected to a driving unit 24. The driving unit 24 and the support wheel assembly frame 23 are both mounted on the frame 1, and the driving unit 24 can drive the sprocket of the support wheel assembly frame 23 to rotate. A conveyor chain 21 is sleeved on the support wheel assembly, and a U-shaped clamping claw 22 is fixed on the conveying chain 21. The conveying chain 21 can move under the drive of the sprocket of the support wheel assembly frame 23, and the conveying chain 21 has two parallel conveying lines corresponding to each other. A guide belt 25 is fixed on the support wheel assembly frame 23, and the guide belt 25 is arranged along the conveying direction of the conveying chain 21 to prevent the infusion soft bag from shaking. The main function of the clamping claw 22 is to stably support the infusion soft bag, which can be made of materials that meet GMP specifications such as plastic and stainless steel. The clamping claw 22 generally tilts slightly upward at a certain angle, and is mostly a two-finger support manipulator mechanism.

[0049] A guide assembly 26 is provided on one side of the conveying chain 21. The guide assembly 26 is installed on the frame 1 and is located behind the four rollers 32. The guide assembly 26 includes multiple rotating rollers 261 and a rotating ball group 262. The multiple rotating rollers 261 are arranged in sequence along the conveying direction of the conveying chain 21, and the angle between the vertical plane formed with the conveying chain 21 gradually becomes smaller; the rotating ball group 262 is located behind the rotating shaft and is arranged vertically. The rotating rollers 261 and the rotating ball group 262 are used to gradually guide the infusion soft bag horizontally hung on the claw 22 to the vertical direction.

[0050] The detection mechanism 5 includes a first detection component 51, a second detection component 52, a third detection component 53 and a fourth detection component 54, and the first detection component 51, the second detection component 52, the third detection component 53 and the fourth detection component 54 are used to detect the infusion soft bag. The first detection component 51, the second detection component 52, the third detection component 53 and the fourth detection component 54 all perform multi-angle image capture detection through the cooperation of the camera and the light source, and the obtained pictures are annotated using the deep learning tools software; after annotation, the input pictures are sent to the convolutional neural network, and finally, the real-time detection model of the infusion soft bag image is trained by offline learning of the network model to realize the infusion soft bag image detection. The front end of the first detection component 51 and the second detection component 52 also has a sensor for checking the infusion soft bag, which is used to detect the infusion soft bag and start the first detection component 51, the second detection component 52 and the third detection component 53.

[0051] The first detection assembly 51 includes two front detection stations, which are arranged in sequence along the conveying direction of the conveyor chain 21. Each front detection station includes a first camera support frame 511, a front detection camera 512, a first backlight source 513 and a first bottom light source 514. The first camera support frame 511 is fixed on the frame 1 and is located on the same side of the feeding mechanism 3. The front detection camera 512 is fixed on the first camera support frame 511.

[0052] The first backlight source 513 is fixed on the frame 1 and is located on the other side of the front detection camera 512. The first bottom light source 514 is fixed on the frame 1 and is located below the conveyor chain 21. The color of the first backlight source 513 is optional. According to the different types of foreign matter and the changes in the color of the characters on the infusion soft bag itself, a parallel backlight source with the same color as the character color is preferred. The first bottom light source 514 is preferably a strip light source with a complementary color to the first backlight source. At least one of the first camera support frames 511 in the two front detection stations is equipped with a neck detection camera 515 and a bottom detection camera 516.

[0053] The second detection component 52 includes two back detection stations arranged in sequence along the conveying direction of the conveyor chain 21, each back detection station includes a second camera support frame 521, a back detection camera 522, a second backlight source 523 and a second bottom light source 524, the second camera support frame 521 is fixed on the frame 1 and is located on the other side of the feeding mechanism 3, the back detection camera 522 is fixed on the second camera support frame 521, and the back detection camera 522 is preferably a surface vibration camera.

[0054] The second backlight source 523 is fixed on the frame 1 and is located on the other side of the back detection camera 522. The second bottom light source 524 is fixed on the frame 1 and is located below the conveyor chain 21. The second backlight source 523 and the second bottom light source 524 are preferably complementary color light sources. The second backlight source 523 is preferably a parallel backlight source of the same color as the character. The second bottom light source 524 is preferably a bar light source. When the second bottom light source 524 is lit, the second backlight source 523 can be used as a background to improve the contrast between foreign matter and the background. Two back detection stations and two front detection stations are arranged alternately.

[0055] The third detection component 53 includes a front appearance detection camera 531 and a third backlight source 532. The front appearance detection camera 531 is fixed on the frame 1 and is located at any back detection station. The third backlight source 532 is fixed on the frame 1 and corresponds to the front appearance detection camera 531. The third backlight source 532 uses a strip light or backlight of the same color as the first backlight source 513. At the same time, since the third detection component 53 is mounted on the back detection mechanism 5, it can collect liquid level information when the back detection backlight source is lit, assist in the determination of foreign matter on the liquid surface, and further improve the detection accuracy.

[0056] The fourth inspection component 54 includes a reflector component 541, a first back appearance inspection camera 542 and a second back appearance inspection camera 543. The reflector component 541 can be composed of an ordinary plane mirror or a prism with the same function. The reflector component 541 is fixed on the mounting plate of the frame 1, and can also be independently installed and used. Two groups of reflector components 541 are used in conjunction with the first back appearance inspection camera 542 and the second back appearance inspection camera 543, so that the back and top defects of the bottle mouth can be photographed. The first back appearance inspection camera 542 and the second back appearance inspection camera 543 are fixed to the second camera support frame 521 through a connector and are located at any front inspection station. The first back appearance inspection camera 542 and the second back appearance inspection camera 543 are separated by N times (N is a positive integer) of the jaw pitch, and the distance is greater than one bag body width. One of the cameras is in the same shooting station as the front inspection camera 512. The fourth detection component 54 can collect information on the back and top of the bottle mouth through the function of the reflector, assist in the determination of the appearance of the bottle mouth and foreign matter, and further improve the detection accuracy.

[0057] The kicking mechanism 6 includes a cylinder 61 fixed on the frame 1, and a kicking slider 62 fixed on the telescopic end of the cylinder 61. The telescopic end of the cylinder 61 faces upward. According to the output result, the cylinder 61 can drive the kicking slider 62 to kick the defective products.

[0058] A visual online detection method for foreign matter and appearance of an infusion soft bag comprises the following steps:

[0059] S1, the infusion bag is transported to the feeding mechanism 3, and the feeding mechanism 3 changes the infusion bag from a horizontal position with the head to a sinking and tilting state, and the infusion bag experiences a shake;

[0060] S2. Driven by the conveyor chain mechanism 2 of the device, the infusion bag changes from the downward tilting state to the upright state again, and the foreign matter shakes violently with the liquid in the infusion bag;

[0061] S3, the claw 22 drives the upright infusion bag to move quickly to the inspection station. During the movement, a guide belt 25 can be added to drag the bottom to prevent the infusion bag from shaking at will;

[0062] S4, the infusion soft bag arrives at the first front detection station of the first detection component 51, triggering the sensor, the first backlight light source 513, the third backlight light source 532 and the first bottom light source 514 are synchronously and alternately flashed fast, when the first backlight light source 513 and the third backlight light source 532 are synchronously lit, the neck detection camera 515, the front detection camera 512, the bottom detection camera 516, the front appearance detection camera 531, and the first back appearance detection camera 542 are synchronously photographed, and when the first bottom light source 514 is lit, the front detection camera 512 is synchronously photographed;

[0063] S5. When the infusion soft bag reaches the second inspection camera 543 of the back appearance, the ambient light is maintained or other shadowless light sources are supplemented to allow the bag head to be illuminated with sufficient light. This station has a set of reflector assemblies 541 for reflecting the back image of the bottle mouth. The second inspection camera 543 of the back appearance and the reflector assembly 541 are adjusted to maintain a suitable angle so that the camera is triggered to take a photo to collect the back image of the bottle mouth.

[0064] S6: The infusion bag arrives at the first back detection station of the second detection assembly 52, and the second backlight source 523 and the second bottom light source 524 are alternately and rapidly strobed. When the second backlight source 523 is lit, the back detection camera 522 takes photos synchronously;

[0065] S7, the infusion bag arrives at the second front detection station of the first detection assembly 51, the first backlight source 513 and the first bottom light source 514 are alternately and rapidly strobed, and the cameras take pictures synchronously;

[0066] S8, the infusion soft bag arrives at the second back detection station of the second detection assembly 52, the second backlight source 523 and the second bottom light source 524 are alternately and rapidly strobed, and when the second backlight source 523 is lit, the back detection camera 522 takes pictures synchronously;

[0067] S9. The computer obtains one image each of the soft bags S5 to S8 taken alternately with the bottom light and the back light by the front detection camera 512 and the back detection camera 522. The two front and back photos obtained by the two sets of devices are used to detect whether there are foreign objects in the pictures. If not, they are not rejected. If foreign objects are detected, the confidence of the output label is further compared with the set confidence. If the output label confidence is greater than the set label confidence, it is considered to be detected normally and the unqualified infusion soft bag is rejected; otherwise, it is considered to be free of foreign objects and is not rejected.

[0068] The YOLO algorithm specifically includes: dividing the image into S*S grids, each grid is responsible for predicting a fixed number of bounding boxes. These bounding boxes are adjusted according to the actual position of the object to achieve accurate detection of the object.

[0069] In YOLO, each bounding box contains information such as the object category, center position, width, and height. By calculating the loss function between the bounding box and the real object, YOLO can continuously optimize the position and size of the bounding box, thereby improving detection accuracy and achieving detection of foreign matter and appearance of infusion soft bags.

[0070] By choosing YOLOX, using two data enhancement methods, Mosaic and Mixup, and adding the SE module after each block module, the principle of this structure is to enhance important features and weaken unimportant features by controlling the size of the scale, so as to make the extracted features more directional. The SE module explicitly models the interdependence between feature channels, and adopts a new "feature recalibration" strategy - adaptively recalibrating the feature response of the channel.

[0071] Detailed introduction of SE module:

[0072] Sequeeze: Compress features along the spatial dimension, converting each two-dimensional feature channel into a real number, which has a global receptive field to some extent, and the output dimension matches the number of input feature channels. It represents the global distribution of responses on the feature channel, and enables the layer close to the input to obtain a global receptive field. The specific operation is to perform global average pooling on the original feature map C*W*H, and then obtain a feature map of size 1*1*C, which has a global receptive field.

[0073] Excitation: The output 1x1xC feature map is passed through two fully connected neural networks, and finally a mechanism similar to the gate in a recurrent neural network is used to generate weights for each feature channel through parameters, where the parameters are learned to explicitly model the correlation between feature channels (sigmoid is used in the paper).

[0074] Feature recalibration: using Excitation

[0075] The result is used as the weight, and then weighted to the C channels of U channel by channel through multiplication, completing the recalibration of the original features in the channel dimension and serving as the input data for the next level.

[0076] Use the Focal Loss function, as shown below:

[0077]

[0078] in

[0079]

[0080] Among them, p t It represents the probability of the model predicting the positive category, γ is the balance coefficient, which is used to adjust the balance between the positive category and the negative category, and p represents the original probability of the model predicting the positive category.

[0081] S10, the computer obtains an image taken by the neck detection camera 515, the bottom detection camera 516, the front appearance detection camera 531, the first back appearance detection camera 542, and the second back appearance detection camera 543 in S5, and determines whether there are defects in the head appearance, whether there are foreign objects and defects in the neck by analyzing and processing the images. The bottom detection camera 516 assists in determining whether there are large black foreign objects at the bottom of the soft bag, and the front appearance detection camera 531 assists in determining whether there are foreign objects on the liquid surface;

[0082] S11, the discarding mechanism 6 decides whether to discard the infusion soft bag according to the comprehensive determination result.

[0083] In the method of this implementation case, an example is given to illustrate the selection and application of backlight and bottom light. The infusion soft bag is set to be made of transparent material, and blue fonts are printed on the front. In the first detection component 51, the first backlight source 513 is preferably a blue backlight, and the first bottom light source 514 is preferably a red bottom light source. The front detection camera 512 is preferably a black and white surface vibration camera. When the first backlight source 513 is turned on, the font appears bright and the foreign matter is black. When the first bottom light source 514 is turned on, the foreign matter is white and the background is black.

[0084] Therefore, the present invention adopts the above-mentioned visual online detection device and method for foreign matter and appearance of infusion soft bags, which solves the problems of being unable to detect or having low detection accuracy caused by many factors such as the inability to rotate, wrinkle interference, and foreign matter attached to the wall in traditional soft bag detection, thereby greatly improving the soft bag production efficiency and product quality.

[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. A visual online inspection device for foreign matter and appearance of soft infusion bags, characterized by: It includes a frame, a conveyor chain mechanism is installed on the frame, a feeding mechanism is installed at the feeding end of the frame, a discharging mechanism is installed at the discharging end of the frame, the feeding mechanism and the discharging mechanism have the same structure and are symmetrically arranged, a detection mechanism and a waste kicking mechanism are installed on the frame between the feeding mechanism and the discharging mechanism, the detection mechanism is close to the feeding mechanism, and the waste kicking mechanism is close to the discharging mechanism.

2. According to claim 1, a visual online inspection device for foreign matter and appearance of infusion soft bags is characterized by: The conveying chain mechanism includes a supporting wheel assembly frame, which is connected to a driving unit. Both the driving unit and the supporting wheel assembly frame are mounted on a frame. A conveying chain is sleeved on the supporting wheel assembly. U-shaped claws are fixed on the conveying chain. A guide belt is fixed on the supporting wheel assembly frame. The guide belt is arranged along the conveying direction of the conveying chain. A guide assembly is arranged on one side of the conveying chain. The guide assembly is mounted on the frame and is located behind four rollers. The guide assembly includes a plurality of rotating rollers and a rotating ball assembly. The plurality of rotating rollers are arranged in sequence along the conveying direction of the conveying chain, and the angle between the rollers and the vertical plane formed with the conveying chain gradually decreases. The rotating ball assembly is located behind the rotating shaft and is arranged vertically.

3. The visual online inspection device for foreign matter and appearance of infusion soft bags according to claim 1, characterized in that: The feeding mechanism includes a feeding support frame, rollers and a round belt. The support frame is fixed on the frame. There are four rollers. The rollers are connected to the feeding support frame and rotate in sequence along the conveying direction of the conveyor chain. The axes of the rollers are perpendicular to the conveying direction of the conveyor chain. The rollers are frustum structures. The ends with smaller diameters of the two rollers in front along the conveying direction of the conveyor chain are close to the conveyor chain, and the ends with smaller diameters of the other two rollers are away from the conveyor chain. The round belt is mounted on the four rollers.

4. The visual online inspection device for foreign matter and appearance of infusion soft bags according to claim 1, characterized in that: The detection mechanism includes a first detection component, a second detection component, a third detection component and a fourth detection component. The first detection component includes two front detection stations, and the two front detection stations are arranged in sequence along the conveying direction of the conveyor chain. Each front detection station includes a first camera support frame, a front detection camera, a first backlight source and a first bottom light source. The first camera support frame is fixed on the frame and is located on the same side of the feeding mechanism. The front detection camera is fixed on the first camera support frame. The first backlight source is fixed on the frame and is located on the other side of the front detection camera. The first bottom light source is fixed on the frame and is located below the conveyor chain. At least one of the two front detection stations has a neck detection camera and a bottom detection camera installed on the first camera support frame.

5. The visual online inspection device for foreign matter and appearance of infusion soft bags according to claim 4, characterized in that: The second detection component includes two back side detection stations arranged in sequence along the conveying direction of the conveyor chain, each back side detection station includes a second camera support frame, a back side detection camera, a second backlight source and a second bottom light source, the second camera support frame is fixed on the frame and is located on the other side of the feeding mechanism, the back side detection camera is fixed on the second camera support frame, the second backlight source is fixed on the frame and is located on the other side of the back side detection camera, the second bottom light source is fixed on the frame and is located below the conveyor chain, and the two back side detection stations and the two front side detection stations are arranged alternately.

6. The visual online inspection device for foreign matter and appearance of infusion soft bags according to claim 4, characterized in that: The third detection component includes a front appearance detection camera and a third backlight source. The front appearance detection camera is fixed on the frame and located at any back detection station. The third backlight source is fixed on the frame and corresponds to the front appearance detection camera.

7. The visual online inspection device for foreign matter and appearance of infusion soft bags according to claim 4, characterized in that: The fourth detection component includes a mirror assembly, a first back appearance detection camera and a second back appearance detection camera. The mirror assembly is composed of an ordinary plane mirror or a prism with the same function. The mirror assembly is fixed on the mounting plate of the frame. The first back appearance detection camera and the second back appearance detection camera are fixed on the second camera support frame through a connecting part and are located at any front detection station, and one of the cameras is at the same shooting position as the front detection camera.

8. The visual online inspection device for foreign matter and appearance of infusion soft bags according to claim 1 is characterized by: The waste kicking mechanism comprises a cylinder fixed on a frame and a waste kicking sliding block fixed on a telescopic end of the cylinder, and the telescopic end of the cylinder faces upward.

9. A visual online detection method for foreign matter and appearance of an infusion soft bag as described in claims 1-8, characterized in that: The following steps are involved: S1. The infusion bag is transported to the feeding mechanism, and the feeding mechanism changes the infusion bag from a horizontal position with its head down to a sinking and tilting position, and the infusion bag experiences a shake; S2. Driven by the conveyor chain mechanism of the equipment, the infusion bag changes from the sinking and tilting state to the upright state again, and the foreign matter shakes violently with the liquid in the infusion bag; S3. The clamping claw drives the upright infusion bag to move quickly to the inspection station. During the movement, a guide belt is added to drag the bottom to prevent the infusion bag from shaking at will; S4, the infusion soft bag arrives at the first front inspection station of the first inspection component, triggering the sensor, the first backlight light source, the third backlight light source and the first bottom light source are synchronously and alternately flashed fast, when the first backlight light source and the third backlight light source are synchronously lit, the neck inspection camera, the front inspection camera, the bottom inspection camera, the front appearance inspection camera, and the first back appearance inspection camera synchronously take pictures, and when the first bottom light source is lit, the front inspection camera synchronously takes pictures; S5. When the infusion soft bag reaches the second inspection camera station of the back appearance, keep the ambient light or add other shadowless light sources to allow the bag head to be illuminated with sufficient light. This station has a set of reflector components to reflect the back image of the bottle mouth. Adjust the second inspection camera of the back appearance and the reflector components to maintain a suitable angle so that the camera is triggered to take pictures and collect the back image of the bottle mouth; S6, the infusion soft bag arrives at the first backside inspection station of the second inspection assembly, the second backlight source and the second bottom light source are alternately and rapidly strobed, and when the second backlight source is lit, the backside inspection cameras take pictures synchronously; S7, the infusion soft bag arrives at the second front inspection station of the first inspection assembly, the first backlight source and the first bottom light source are alternately and rapidly strobed, and the cameras take pictures synchronously respectively; S8, the infusion soft bag arrives at the second back detection station of the second detection assembly, the second backlight source and the second bottom light source are alternately and rapidly strobed, and when the second backlight source is lit, the back detection cameras take pictures synchronously; S9. The computer obtains one image each of the soft bags S5 to S8 taken by the front detection camera and the back detection camera with the bottom light and the back light alternately taken. The two front and back photos obtained by the two sets of devices are used to detect whether there are foreign objects in the pictures. If not, they are not rejected. If foreign objects are detected, the confidence of the output label is further compared with the set confidence. If the confidence of the output label is greater than the set label confidence, it is considered to be detected normally, and the unqualified infusion soft bag is rejected; otherwise, it is considered to be free of foreign objects and is not rejected; S10, the computer obtains an image taken by the neck detection camera, the bottom detection camera, the front appearance detection camera, the first back appearance detection camera, and the second back appearance detection camera in S5, and determines whether there are defects in the head appearance, whether there are foreign objects and defects in the neck by analyzing and processing the images. The bottom detection camera assists in determining whether there are large black foreign objects at the bottom of the soft bag, and the front appearance detection camera assists in determining whether there are foreign objects on the liquid surface; S11. The discarding mechanism decides whether to discard the infusion soft bag based on the comprehensive judgment result.