Title of your project:
Full textile roll digitalization and waste reduction with computer vision and artificial intelligence
Applicant Company:
A. Sampaio & Filhos – Têxteis SA
Technological Provider:

Introduction to the pilot

A.Sampaio (http://www.A. Sampaio.pt/) is a Portuguese knitting company with more than 75 years of age. As all the companies that what to thrive in this highly competitive sector, it has a strong focus on assuring the quality of its products to meet its client’s expectations. To support these efforts, the company seeks to identify, explore and integrate new technologies into its production process with a strong focus on the digitization of its structure. As part of this effort, the company identified the possibility of cooperating with SMARTEX (https://www.smartex.ai/) which develops inspection systems based on machine learning and artificial intelligence for circular knitting machines (CKM). This inspection system is able to inspect 100% of the produced knitted fabrics at the time they are produced, and if any defects are detected the system is able to stop the machine until the problem is solved and give the start again. The objective of this pilot was to install two inspection systems in two different machines that would then be run during a period of six months in which the company would be able to assess the effectiveness of the system and how it could be integrated into their production process.


Scope of the pilot

It was the main objective of the Project to develop an automated system capable of inspecting 100% of A. Sampaio’s textile production in real time. Particularly, in two open-width circular knitting machines (CKM). To achieve this, a factory assessment, the design of additional adaptive pieces, the manufacturing of these pieces, the installation and calibration of the system, as well as the evaluation and adjustment of machine learning criteria were necessary. Aside from this, Smartex technicians provided training on boarding to A.Sampaio so that the company could learn how to manage Smartex’s systems.


Main objectives to achieve

The main goal of the pilot was to enable the knitting company to test Smartex’s digital solution and evaluate it in terms of its return on investment, reliability and scalling requirements. While this evaluation an be and was done through the analysis of a set of KPIs, it was essentially a trust-building process.
The main assessment area for the pilot were:
The main KPIs for the project are:
• The capability to increase the automated inspection of knitted fabric rolls to eventually 100% of the production, and therefore discard manual inspection;
• Reduce the waste due to defects, such as production time, raw material, energy and costs.


Pilot development

The initial gantt chart was developed and use as a management tool throughout the pilot, with deviations been analysed and corrected.

Want to know more about this Pilot

T1 – Assessment: Factory assessment – decide position to install access points; Knitting machines assessment – machine model and brand, take measurements, understand and design the mechanical support system adaptations (if needed)

T2 – Manufacturing of mechanical supports : Regarding the machine measurements, the mechanical support system is adapted (if needed) and manufactured.

T3 – Installation of the SMARTEX system : The installation consists of installing the mechanical support system, followed by the hardware (cameras and light module), tablet and server. Set-up of the system.

T4 – Calibration / database collection : The calibration step is needed to ensure that the software criteria is adequate to the machine. In this step, fabric is being produced, while the SMARTEX system captures images. These images are analysed by the system and the technician. A database of defects is collected for the Artificial Intelligence algorithm. This database will be the reference to all defects that occur in the future in the machine.

T5 – Deploy and training : The deploy marks the beginning of the machine operation. From that point on, the machine will be autonomous in defect detection. Workers will be given the training to learn how to interact with the tablet software that manages the inspection system.

T6 – Evaluation and adjustment of ML criteria: During this period, constant evaluation of the Smartex system performance will be carried out. The sensitivity of the Artificial Intelligence software (defect detector) can be adjusted to improve their detection accuracy.

Two of Sampaio’s open-width circular knitting machines (CKM) were equipped with the Smartex solution based on camera modules connected to a core service that runs machine learning algorithms. These trained algorithms analyse the pictures taken by the cameras and are then capable of defect detection. In this manner, when a defect is detected in real-time, the machine will stop and the operator will be able to resolve the problem. Consequently, defects in production are greatly reduced and several rolls are prevented from being thrown away. With the textile industry representing the second largest industry worldwide, this makes a significant difference in the environmental impact since it prevents and reduces textile waste.

During the Project, the two companies installed two inspection systems in the circular knitting machines that can inspect 100% of the produced fabrics. The Project started with the assessments of the machines so that the engineers would understand what adaptations would be required. After the assessment was performed, the engineers designed the new parts that were needed for the installation and after the fabrication of these parts, the two teams proceeded with the installation of the inspection systems.

As a part of the working plan, a factory visit was conducted in October to assess potential access points and take measurements of the knitting machines on which Smartex devices would be installed (T1). Having done so, Smartex’s engineering team began the process of modifying the inspection system in order to fit those machines. As a first step, the mechanical adaptations of the system had to be designed. In November, the designing process was finished and Smartex started to build a production package to manufacture all necessary custom parts (T2). Because of holiday delays, the manufacturing stage was completed by the end of December.

During January, the Smartex system installation began, and it was almost complete. The only remaining task was the network installation. This was problematic since in the absence of a network connection, one is unable to communicate with the equipment components to acquire data and begin the calibration process. During this period, Smartex technicians also began the process of on boarding and training A. Sampaio’s personnel (T5) so that they could learn how to operate Smartex’s inspection system.

The installation was completed in February with the network installation, allowing the database calibration phase to begin (T4). During the testing process in February and March, two issues were identified, one relating to Finis and one pertaining to LEDs’ weaknesses. Smartex technicians solved these by replacing the Finis component of both systems and the Master Module, respectively.

The calibration phase done through database collection lasted until the beginning of April, just like the training of A. Sampaio’s staff through two onboarding sessions. An unplanned intervention was carried out in order to upgrade Finis’ housing. The first housing version was made of plastic, while the new version was made of metal. As compared to the older model, the newer version would act like a Faraday box, blocking out unwanted electromagnetic interference and, as a result, allowing the wi-fi connection to prevail and communicate properly with the rest of the Smartex equipment.

In addition, in early April, the final task began, which was the evaluation and adjustment of machine learning criteria (T6). The task lasted until the end of the Project in October. As part of research for product improvement, additional interventions were made on A. Sampaio’s machines during this period. In particular, the dashboard, the Master Module, and the Tablet’s version have been updated. The Smartex team also made a few visits to A. Sampaio to get in sync regarding the DIGITVC project and to verify that it was operating smoothly.

In one of these visits, Smartex engineers collected defective pictures for the database. Database collection is essential for the device’s machine learning to improve. The more defective images are collected from different factories, the easier it is for the software to recognise them. To improve the 100% inspection system and make real progress with the product, periodic visits and remote supervision are necessary.

Comparing the execution of the Project with the original plan, there was a deviation in the execution of the project tasks of two months due to additional work that was required in the assessment stage, with the design of an added number of parts and delays in the delivery of components. The only impact relates to the time in which the systems were fully operational, which was roughly 6 months. Despite this delay, there were no tasks that were not accomplished.


Value chain impact assessment

With the installation of the inspection systems, the textile company was able to reduce the need for inspecting the textile rolls by the operators. A.Sampaio usually inspects 100% of its fabrics, which the operators perform after the production of the fabrics. With the use of the inspection system installed in the circular knitting machines, they could reduce the need for the second step of inspection, saving a lot of working hours and reducing the number of defects and waste that could have been produced. During the Project, there was a need for an optimisation of the inspection system, upgrading some components to ensure that the system’s uptime was close to 100% as needed by the company.

Regarding the achievement of data results, two main milestones needed to be reached: calibration and real-time inspection.

Calibration took place between February 20th and April 2nd, 2022. The data gathered indicates that during the mentioned period, there were a total of 14 occurrences in both systems, just as indicated by the figure below. A total of 170 defective meters were produced, which translates to approximately 7.3 hours of machine production and an estimated 68 Kg of textile waste. Furthermore, the calibration revealed that the average time spent producing needle defects was 27 minutes, elastane and yarn 47 minutes, and oil and dashes 24 minutes.

From April 5th to October 11th, the Smartex inspection system was fully operational. For the two systems, 72 golden stops were performed. In other words, there were 72 instances where the defect would have spread to an entire roll of fabric had Smartex not intervened. As a result, approximately 34 hours of production time have been saved, which translates into the savings of raw materials and costs associated to the running of the circular knitting machines operation. These 72 stops correspond to savings of 744 kg of raw material. Considering an average cost of 9€/kg it represents a saving, just in raw material of 6.696 €.

If the defects hadn’t been detected and sent to the following stages of textile treatment, such as dyeing, garments and retail, resulted in a much higher level of waste of water, machine energy and CO2 emissions.

Regarding defects, A. Sampaio’s machines demonstrated to produce little holes and oil defects over the inspection period, as shown on the graph below. In general, defects were produced similarly in the morning and afternoon shifts or with a greater frequency in the afternoon shift.

The pilot inspection project proved to have a significant impact on A. Sampaio’s, as it prevented a significant amount of waste from being generated. Furthermore, A. Sampaio can now guarantee 100% production inspection on two open-width CKM, which is a major plus for their customers.

With the installation of the inspection systems, the textile company was able to reduce the need for inspecting the textile rolls by the operators. A.Sampaio usually inspects 100% of its fabrics, which the operators perform after the production of the fabrics. With the use of the inspection system installed in the circular knitting machines, they could reduce the need for the second step of inspection, saving a lot of working hours and reducing the number of defects and waste that could have been produced.

The impact on the value chain occurs in different ways. Firstly, with the increasing quality output from their processes, A. Sampaio delivers their product with presumably 0% defects, which means that all downstream players in the value chain will have lower non-quality costs. At another level, with the proven reduction in waste, the added environmental footprint by A. Sampaio is reduced and that is something valuable to any value chain because it will lower the overall footprint of the finished product. This is strategic for any brand seeking sustainability. Lastly, the Smartex inspection systems creates a kind of digital twin of all knitted fabric rolls produced. With such a system, A. Sampaio can deliver to their customer not only the physical product, but also a dataset related to that product, in this case data related to quality but it can be complemented in the future with data related to energy consumption and others. In this pilot, the customer was an internal process and the informality in the interactions between processes mitigated the observation of the expected positive impact of this feature.



During the Project, there was a need for an optimisation of the inspection system, upgrading some components to ensure that the system’s uptime was close to 100% as needed by the company. At the end of the project, the feedback from the company was very positive, while seeing significant benefits of using this inspection system that they intend to expand to other machines in the company, according to the performance improvements. Thus, SMARTEX will continue to work with A.Sampaio maximizing their knowledge of the inspection system, extending its use to new types of fabrics and production.