Automatic monitoring system designed to detect defects in PET preforms

. The goal of this work is to automate the defect detection system for PET preforms production. For this purpose, it is necessary to consider the machine vision method, which has hardware and software structures that include many technical components. The software in turn includes two parts: one is used in the computer for image processing and the other for controlling the mechanical components of the system. However, this is a very expensive and time-consuming process due to the collection of large amounts of information with labeled defect samples. As shown, this technology can improve the scope, efficiency, quality and reliability of industrial inspection, which in turn leads to a number of advances in modern industry. Also, the company is able to increase its productivity, reduce the cost of defect controllers' salaries, increase profits, and avoid creating situations in which equipment will be idle.

Product quality control is an integral part of the production process.Production teams perform many quality inspections both during the process and after the process is completed.
One problem with some types of quality inspections (such as in-process testing) is that they can negatively impact product quality and cannot be widely used.Visual inspection, on the other hand, is not detrimental to the product and can be widely used.Therefore, every released product should be subjected to at least a visual inspection.The main problem with visual inspection is that in many cases it is difficult to automate.In other words, it requires significant human involvement to inspect products.This can lead to visual inspection not always being done thoroughly [16][17][18][19][20][21][22][23][24][25].
The good news is that modern advances in artificial intelligence (AI) allow many visual inspection tasks to be automated.AI models can now even outperform humans in some aspects of inspection.
The goal of this study is to find methods and approaches to reduce defects in polyethylene terephthalate (PET) products.

Machine vision method
The system has a final structure that consists of two main parts: hardware and software.The hardware includes various components, including a robust frame, a motor with gearbox, a billet inlet mechanism, a system for removing jammed products, a product rejection device, LED illuminators, industrial video cameras and a programmable logic controller (PLC).The software is divided into two parts: one is used on the computer for image processing, and the other is designed to control the mechanical components through the PLC.
The final system is shown in Figure 1.The program was developed in the C# programming language and Halcon software package libraries were used to implement the defect removal filters.The choice of this software package refers to the reliability of the image processing algorithms and the stability of the software.

Components of the quality control system
Indeed, as mentioned earlier, the main components of a machine vision system are: Lighting: This includes the use of LED illuminators or other light sources to provide optimal illumination of the object or scene.Proper lighting plays an important role in producing quality images for post-processing.
Camera: used to capture images of objects or scenes.Different types of cameras can be used depending on the requirements of the specific system, including digital cameras, industrial video cameras, etc. Image sensor: is a device that detects light passing through a camera lens and converts it into a digital signal.Image sensors can be based on different technologies such as CCD (charge-coupled device) or CMOS (complementary metal-oxide-semiconductor).
Image processing software: This is specialized software that performs algorithms and operations to process acquired images.It may include filtering, segmentation, object recognition, and other image analysis techniques.
Communications: These are the technologies and protocols used to transfer data between the components of the machine vision system.This can be a wired or wireless connection such as Ethernet, USB, Wi-Fi and others.
All of these components work together to create a machine vision system capable of capturing, processing and analyzing images for various applications and tasks.The components are shown in Figure 2.

Fig. 2. Components of machine vision
Visual inspection technology is image-based and involves two basic steps: image acquisition and image processing.The key to the success of a visual inspection system is the acquisition of high-quality images.There are two main factors that influence image quality: optical illumination and the image acquisition process.
Optical illumination plays an important role in overcoming ambient light interference, ensuring image stability, and producing an image with high contrast.The main purpose of an optical illumination platform is to detect important features of objects and reduce unwanted features.Various light sources can be used to form an image, such as LED lamps in various forms, high-frequency fluorescent lamps, and halogen lamps with fiber optic systems.
With the appropriate optical illumination, the surface of the object is displayed on the camera sensor using an optical lens.The optical signal is then converted into an electrical signal and further into a digital signal that can be processed by a computer to produce a final image of the preform surface.Light-sensitive devices such as charge-coupled device (CCD) or complementary metal-oxide-semiconductor (CMOS) image sensors are used for this purpose.CCD sensors are now widely used, while CMOS image sensor technology is in an early stage of development, although they show great potential in the area of power consumption and integration.
Images are information carriers in machine vision systems.Image processing and analysis are key technologies for automatically understanding images produced by hardware in vision detection systems.

Results
Machine vision has a significant positive effect on the volume, efficiency, quality and reliability of industrial inspection, leading to a number of important advances in modern industry.
First, machine vision is a type of real-time embedded detection that handles large amounts of data, redundant information, and multidimensional object space.The speed of image processing is one of the key factors affecting the performance of real-time video surveillance systems.However, there are still challenges in detecting embedded objects in real-time with complex shapes.
The second challenge relates to the interference immunity of visual detection systems.Visual inspection must be able to improve detection reliability and reduce dependence on imaging conditions.Interference such as lighting, shadows, noise, and other artifacts can make it difficult to correctly recognize objects.
The third factor is the level of intelligence of the monitoring system.While humans can easily identify complex interference in an image viewing environment, it is difficult for a machine to do so, and it may make an incorrect decision or error.
Despite these challenges, however, machine vision continues to evolve and reach new heights in industrial inspection.Modern machine learning methods and algorithms, such as deep learning and neural networks, allow for greater accuracy and efficiency in image processing.Further research in algorithm and hardware development, as well as improvements in data and sensor quality, will contribute to overcoming these challenges and further developing machine vision in industry.

Conclusion
Indeed, automated visual inspection of defects is a complex task with several research problems.One of the key problems has to do with the training data, which must be presented in two different formats.
The first data format is normal samples without defects, which are used to train the model to recognize the "normal" state of the object.The second data format is samples with labeled defects, used to train the model to recognize and classify defects.Collecting enough labeled samples can be an expensive and time-consuming process.
However, with machine vision, there is an expectation that automated visual inspection of defects will reduce the number of products with defects that reach the market.This will help establish the company as a reliable supplier and reduce losses from defective products.In addition, automation will simplify the process of adjusting filters for different types of preforms.
The use of automated visual inspection will also lead to increased plant productivity.Reducing rejects and increasing the efficiency of defect control will reduce the cost of defect controllers' salaries and avoid equipment downtime.Ultimately, it will lead to an increase in enterprise profits.It should be noted that successful implementation of automated visual inspection requires well-prepared training data, proper selection of machine learning algorithms and models, and integration of the inspection system into the production process with appropriate adaptations and optimization.