Poka Yoke Meets Deep Learning: a Proof of Concept for an Assembly Line Application

In this paper we present the re-engineering process of an assembly line that features speed reducers and multipliers for agricultural applications. The product operates as an interface between an input torque, typically supplied by an agricultural vehicle, and an output torque, generally moving speciﬁc equipment placed on a trolley equipped with a tow hook. The “as-is” (ini-tial version) line was highly ineﬃcient due to several critical issues, including the high age of the machines, a non-optimal arrangement of them in the shop ﬂoor, and the absence of controls and process standards. These critical issues were analysed with the tools oﬀered by Lean Manufacturing, which made it possible to identify irregularities and operations that require eﬀort (Mura), overload (Muri), and waste (Muda). The deﬁnition of the “to-be” (new version) assembly line included actions to update the department layout, to modify the assembly process and to design the line feeding system in compliance with the well-known concepts of Golden Zone and Strike Zone. The whole process addressed, in particular, the problem of the incorrect assembly of the oil seals. The registered error was mainly caused by the diﬃculty in visually identifying the correct side of the assembled oil seal, and by the mental fatigue of operators at the end of the shift. The solution studied in this paper resulted in a Poka-Yoke solution, which, leverag-ing the modern technologies and methods of deep learning and computer vision, monitors the process ﬂow of the operators through a camera, preventing its comple-tion in the event of an assembly error. · First Time Quality · Convolutional neural networks · Assembly line ·


Introduction
The Poka Yoke concept was first formalised by Shigeo Shingo (1986) within the context of the Toyota Production System [17]. The Poka Yoke idea lies in geometrical or methodological constraints aimed to prevent unwanted operations or events. Some examples are given by components positioning of a mechanical assembly constrained by geometry (geometrical Poka Yoke), or tools that constrain certain actions in order to achieve or not a given effect (methodological Poka Yoke). An example of the former is the USB-C connector, whereas an example of the latter is the clutch mechanism in the last generation manual transmission vehicles aimed at starting the engine, to prevent accidentally moving of the car during its ignition.
In manufacturing contexts, a Poka Yoke is a solution whose goal is to prevent human errors, through a process constraint design (generally low cost). All market solutions are oriented to obtain zero defects: the final target is to avoid that low quality products reach the client due to wrong processes. Industry 4.0 brings new technologically advanced possibilities also in this area. In particular, the contamination between Industry 4.0 and Lean Manufacturing has led to the so-called "Lean 4.0": under this lens, Lean Manufacturing becomes a prerequisite for the application of the concepts of Industry 4.0 and Industry 4.0 in turn promotes Lean Manufacturing [13].
In this paper, we present the re-design of an assembly line, with a process that combines methods that follow typical lean production principles and novel techniques based on artificial intelligence and computer vision. During the re-design of the assembly line study, a practical problem linked to a human assembly error emerged, namely the correct positioning of an oil seal within a speed increaser. The problem affected the First Time Quality index of the assembly line, lowering its overall performance and generating frequent returns in customer orders. Such a problem needed a careful analysis and a customised solution to be solved.
The paper is organised as follows. Section 2 describes related works in the context of artificial intelligence applied to Lean Manufacturing. Then, Section 3 illustrates all the phases of the redefinition of the assembly line, whereas Section 4 focuses on the problem of automatic control of the oil seal placement, and describes the proposed solution based on computer vision tools. Finally, Section 5 concludes the paper.

Related Works
The enabling technologies offered by the fourth industrial revolution -IoT, Big Data and Machine Learning -carry within them the potential to redefine the Poka Yoke concept, moving from mistake proofing systems to assistance systems for line operators. Intelligent Poka Yoke tools have the potential to lower around 33% of human controls performed along assembly lines, often repetitive and redundant [1]. Among the most promising technological tools are augmented reality (AR) systems, and systems based on computer vision and artificial intelligence.
However, as discussed later, even applications based on simpler and different types of sensors (such as microphones, vibration sensors, force sensors) can lead to excellent results if supported by the possibilities offered by Industry 4.0. A lot of practical applications of these technologies have already been studied and have already begun to spread in the most advanced industries.
In the application domain of end milling, [10] presents a solution to perform condition monitoring on cutting tools, by exploiting a microphone whose data is processed by a Convolutional Neural Network (CNN). The project implements a detector for the state of the tool in use, to alert the operator before an imminent breakage.
Another application related to the analysis of information collected through a microphone is described by [6]. The idea was applied in the context of quality control of a differential, where the sound emitted by the machine during test is analysed to detect whether the component is functional.
Other applications of modern technologies to Computer Numerical Control (CNC) machine monitoring have been proposed by [20], who apply deep learning techniques to data collected by an accelerometer positioned on the tool head in use.
In [24], on the other hand, recurrent neural networks (RNNs) and CNNs are applied to frequency signals obtained from a vibration sensor. Data are pre-processed with the Short-Term Fourier Transform (STFT), in order to correctly classify the health status of a ball bearing. [18] also focus on analysing the vibrations generated by a broken ball bearing in frequency, but applying the S transform instead of the STFT in preprocessing. CNNs and RNNs are also studied by [3], with the goal to minimise the pre-processing of time series of data of a complex system. The system is then validated with an experiment carried out on a service lift whose various types of anomalies are to be predicted.
Machine learning tools are also applied for the purpose of monitoring the manufacturing process of robotic cells, that are automated in order to classify their output and possibly to set the parameters on-the-fly. [21]offer their contribution with a system applied to laser additive manufacturing cells: the data are collected during the process from a low cost coaxial camera and are processed by a CNN in order to detect the porosity of the artefact.
Another example of process monitoring is that offered by [5]: they collect the process information of a hybrid laser-MAG (Metal Active Gas) welding system with two cameras at high frame per second rate and extract the information through a convolution with Gabor filter. A monitoring system for a robotic arc welding process is also proposed by [23]. Their solution is based on an optical system designed specifically for the application , whose images are processed by a CNN in order to classify the welding quality operated by the robot. In a similar context, among the systems operating in real time, [8] propose to insert an adaptative CNC machine parameters system trained with neural networks to obtain the surface roughness within a desired value in an in-process manner. Similarly, [22] implements a controller applied to an injection molded recycled plastic molding system. Data collection is performed by an accelerometer, while data is processed using a classifier based on logistic regression.
The approach described in [14] implements an integrated environment based on AR and force sensors. AR was tested through the use of two types of equipment: the first includes a fully immersive viewer which reported the surrounding reality through the use of a camera, with information projected over the images reproduced by the viewer; the second, on the other hand, simply consists of a camera designed to monitor the work bench and a screen on which information is pre-  sented. The machine's understanding of the surrounding world is operated by tags positioned on the work bench.
In [11], the authors developed a glove capable of monitoring the force and vibrations resulting from connecting two electrical terminals, to understand whether the task was successful or not.
Returning to simpler and less invasive Poka Yoke, we cite the proposal of [2], consisting of an analog camera, an analog-to-digital converter and a computer based on an ARM processor. Their solution saves the image in binary format, to be then processed and classified by a Hopfield neural network (a declination of the RNN). The example studied by [19] also exploits computer vision. Their goal is to replace human operators during the visual inspection of product quality. The implemented system is based on a low cost device (a Raspberry Pi) connected to a camera, which analyses the portion of the image in which the characteristic to be evaluated should be captured. The system was applied and tested in a processing cell with the aim of estimating a posteriori the correct positioning of a component before being processed.
Another simple and low-cost solution is the one designed by [4], whose goal is to operate a fault detection and identification (FDI) in an O-Ring positioning machine. The designed system consists of a greyscale sensor (composed of a photo-resistor and an LED) and two switches designed to send the presence signal of the O-Rings to the processing machine. The data acquired through the sensors are then processed by an artificial network trained with a non-supervised method and the results are then compared with a traditional rule-based method.
Another interesting proposal is the one developed by [12]which implements an X-ray data collection, whose images are then manipulated through the use of computerised tomography and CNNs. The ultimate goal of their project is to understand whether the internal components of a finished and hermetically sealed product have been assembled correctly.
In this project is proposed a Poke Yoke that leverages the enabling technologies offered by Industry 4.0: the solution consists of a simple camera used to recognise what is happening by framing the subject of interest and by monitoring it from different positions. Specifically, the final application sees the operator directly involved in the cycle: in the event that what is resumed does not coincide with the desired process, the process performed by the operator is made unavailable, reactivating its availability only following a correction of the process. In the following, the innovation of the solution proposed in comparison with literature and practise results is deeply analysed. The main contribution with respect of the analysed literature, consists in the fact that the solution is proactive, physical with an affordable cost, resulting a best in class solution for the described problem in the Lean Manufacturing field.
Using the definitions of [16] and [7], we can now categorise the solutions described above, according to some characteristics: -Sensors: the main sensors used to implement the solution; for the solution to be robust, they must be few, cheap, and resistant to a hostile environment; -Data Processing technique (DP): processing technique for the data collected by the sensors, for example using machine learning approaches. -Proactive or Reactive (P/R): definition proposed by [16], whereby a proactive Poka Yoke avoids the onset of the defect; a reactive Poka Yoke detects it without preventing it. -Physical, Functional or Symbolic (P/F/S): definition proposed by [7] and cited by [15] whereby a physical Poka Yoke blocks the flow of mass, energy or information without being dependent on an operator's interpretation; a functional Poka Yoke if it can be activated or deactivated following an event without depending on the interpretation of the operator; symbolic Poka Yoke that can require an interpretation of its behaviour in accordance with the occurring using situation. This definition is again used to classify both technologies explicitly classified as Poka Yoke by the authors and technologies of various nature monitoring quality parameters and assuring the management or elimination of defects. All the solutions presented above attempt to resolve quality problems through timely interception and reporting of the errors or by eliminating the occurrence of the errors at the source; however only a portion of them have been designed with the specific intention of generating a Poka Yoke. Rather, technological solutions of various nature monitoring quality parameters that can generate errors or rejects have been presented. Following such a perspective, mentioned solutions are listed and compared in Table 1. The solution proposed in this paper is indicated in the last line of the table, characterised as defined above. It emerges its peculiarity as a Proactive and Physical Poka Yoke.

Assembly Line Redefining
The considered scenario consists in an assembly shop floor, where the assembled product is a speed increaser, a mechanical instrument that finds its main application in the agricultural field, generally on towed equipment (for example hydraulic gear pumps). Its function is to adapt the motion of the tractor power take-off output to the equipment input. The product consists in a crankcase with a cover; 2 input bearings and 1 oil seal; 2 output bearings and 1 oil seal; 2 centring pins; 3 oil plugs for oil load, unload, and inspection; 1 input shaft equipped with 1 O-Ring and 1 plug; 1 output  shaft equipped with 1 key, 1 Seeger ring, and 1 ring gear; 8 closing screws; 1 gasket. All the components are depicted in Figure 1.
The internal gears are made up of toothed crowns joined with interference to the relative transmission shaft, or directly obtained on the shafts themselves. The shafts are differentiated into "pinions" and "power take-offs": the pinions are the shortest shafts, whose reduction teeth are generally obtained directly on them; power take-offs, on the other hand, are the "longer" shafts, which generally join by interference to the relative crown. All the pieces are shown in Figure 2.
The power take-offs and pinions run on ball bearings in an oil bath, and the tightness of the system is guaranteed by double or single lip axial oil seals, depending on the model. The product unit is enclosed within two shells obtained by fusion (main materials are aluminium or cast iron): the higher shell is called the cover, while the lower one is called the crankcase.

The "As-Is" Analysis
The analysis of the existing assembly line was based on the following steps: 1. choice of model product, that is the product that involves the highest level of resources, or that brings the highest contribution to annual revenue; 1 2. layout analysis, that maps the actual disposal of the existing infrastructure in the "as-is" state; 3. material flow analysis, that maps the material flow between the areas and the other plant infrastructure in the "as-is" state; 4. spaghetti chart, that maps the assembly operators moving in the area in the "as-is" state; 5. Mura analysis, that identifies and classifies all the wastes emerged in the previous analysis; 6. limits of actions, to analyse the constraints given by management in the project implementation.

Choice of the Model Product
In order to select the most suitable product for the analysis, an extraction from the factory database was performed. This analysis showed that more than 190 different codes have been ordered in the past three years.
In particular, 20,216 units have been sold in 2018. Sorting them by volume according to a Pareto diagram, we obtained the chart displayed in Figure 3. The diagram shows that the first 30 codes alone led to the production of 80.46% of the total volume. The code that received most of the orders is the first one, with an impact of 11,83% over the total annual volume. Such an impact is confirmed also by the revenue prospect: the graph displayed in Figure 4 reports the annual revenue per code maintaining the Pareto volume diagram order. Therefore, the product associated to that code was selected for our analysis.

Layout Analysis
The existing production line is represented in Figure 5. The area was characterised by three assembly islands: 1. island F301, where the crankcase and cover subgroups are pre-assembled; 2. island F306, where the pinion sub-groups are preassembled; 1 This choice is crucial as the number of single products assembled in the area is very high (almost 200 codes in the catalogue). Therefore, to produce a significant improvement, it is necessary to choose the model that impacts the most on the business and take it as a reference for the project   3. FIS9 island, where the multiplier assemblies are completed, and which is further divided into two subareas: area A, where assemblies are completed only for small-to-medium multipliers; area B, where assembly of large multipliers and, if necessary, also of medium-to-small multipliers are performed.
The feeding areas were scattered and the feeding logic was not defined. The feeding structures were characterised by a series of shelves arranged around the line   Figure 6 shows the material flow in the areas of interest. Raw materials that had to reach the pre-assembly areas F301 and F306 were taken from the raw materials warehouse and brought to the respective lines in the areas marked with an M. These areas were not identified by horizontal signs but were the places where operators usually placed baskets of raw materials. If the raw material handling areas were occupied, the baskets of raw materials were momentarily stacked along the corridor leading to the finished products warehouse (in the schematic diagram, the lower right area). It should be noted that these movements were not always conducted by the logistic operators: often the assembly operators were involved in that kind of activities.

Material flow analysis
Once the material had been processed in the two pre-assembly areas, it was moved to the area of the finished product, marked with an F (also not standardised). Sometimes to free up space, if the material was not promptly moved by the logistics department, the assembly operators independently chose to move the baskets along the passage corridors of the line (see F in front of the two assembly areas of FIS9).
When the logistics took the baskets of pre-assembled material from areas F301 and F306, it is brought back to the warehouse, at the 902 temporary location. The material remained there temporarily for 1 to 2 days and then was placed back in the raw material warehouse.
Once the final assembly order was launched, the preassembled items stored in the warehouse were taken from the raw materials warehouse and brought to the FIS9 assembly areas (with all the cases already described above). There, once processed, they were placed in the baskets of finished products and moved to the finished products warehouse.

Spaghetti Chart
The Spaghetti Chart graphically highlights the typical movements of operators in the shop floor. The result of the drafting of the Spaghetti Chart for the line in question is presented in Figure 7 (note that this kind of chart is typically hand-drawn). Red lines represent the movements performed by the pre-assembly operators, whereas blue lines are the movements of the operators involved in the final assembly. Only the movements on the FIS9-B side were analysed.
The result of the analysis is as follows: -The operator of the F301 station takes about 60 steps during the analysis, for a total length of 45 meters -The operator of the F306 area takes 103 steps, for a total distance of 77.25 meters. -The operator of the FIS9-B area takes 75 steps, for a total distance of 56,25 meters.
All those movements are considered as extra-work, since are mostly connected to the preparation of the area with the necessary materials needed to start a new work order, as empty baskets to stock the finished product or raw material retrieved from the feeding structures scattered around the workplace. The ideal scenario is where the assembly operator has everything ready for the work to start, with minimum time spent for the machine setup (if any) and all the raw material promptly fed by the logistic department with a rational logic. For that reason, this document highlights the existence of useless movement, due to a low standardisation in the process, as reported in Section 3.1.5.

Muda Analysis
The word Muda derives from Japanese: it means waste. Muda are waste of materials, work and time. Seven types of Muda exists [17]: defects, overproduction, transport, waits, useless stocks, useless movement, useless or expensive processes.
To analyse this process, a specialised software was used 2 . The software took as input the video stream of the process, then gave the possibility to identify microactions within the process and to classify them using video cutting tools. The first software output quantified the number of wastes and their impact on the overall available work time based on the analysis made.
Video cuts representing micro-actions were interchangeable or disposable with respect to the kind of action the user wish to perform. This kind of feature has been used to project the "to-be" state associating every corrective action to perform in the shop floor with the respective gain in efficiency, time and cost. Further information are given in the paragraph 3.2.
The high process variability dictated by the low standardisation, was instead addressed through interviews on the shop floor. In this step, the experience of line operators and their leaders was taken into account.
The result of the analysis is as follows: The working times identified by the analysis were divided into the three production areas according to the chart depicted in Figure 9.
The "tower" chart or Yamazumi, highlights how VA, SVA and NVA operations were distributed in the three areas under consideration. It is worth noting that the isle F301 highlights the time required for the preassembly of both crankcases and covers, while the FIS9 area is distinguished by two "towers" that represents the two stations working in parallel as if they were two separate areas, so the product does not pass through both -in other words, the products are assembled either in the first isle, or in the second. The cycles data  were collected according to the reference model product. Of the seven Muda listed above, four emerge in the analysis: overproduction: represented by two pre-assemblies; these were never launched as a result of the customer's order, but the output material were produced "for the warehouse", thus representing a waste of space, resources and capital immobilisation; -useless stocks: the pre-assembled items were stored waiting for the customer order, thus occupying space; even the related raw materials were not ordered and stored "when needed", but were actually immobilised "for the warehouse"; -useless movements -transport: the materials were moved around the plant twice more than needed, leading to delays and to an increased risk of damaging the material itself; -useless or expensive processes: this waste refers to the operations carried out by assembly operators. In fact, they do not only carried out the assembly operations, but used to move baskets and crates to prepare their working areas; in addition, they took care of the material unpacking, waste management and missed material retrieval.

Limits of action
As additional constraints for the project, some limits of actions were imposed by management: to maximise the reuse of the existing equipment; -to free at minimum of 1 of the 3 working areas involved in the "as-is" state; -to implement a solution with an investment payback not larger than 1 year.

The Proposed "To-Be" Solution
We now describe the proposed solution, focusing on the market requests, forecast and takt time, as well as on the designing actions.

Market Requests, Forecast and Takt Time
The sales forecast for the year in which the analysis was performed (2019) indicates a request of 22,515 pieces. In the previous year (2018) the request was of 20,216 units. The data was provided by the management of the Operations Area, which interfaces directly with the company controllers. The product mix has not been calculated. Based on the provided input data, we could compute the market Takt Time for the current year. The Takt Time is the rate at which the market requires the exit of a finished piece from the assembly line. This is a key information in the division and balance of assembly operations, as well as in defining the number of operators necessary to meet the request. The considered input data are: minimum physiological break: 7% (4% physiological, 3% fatigue) -based on internal standards.
The market Takt Time is computed on a single shift to maintain leeway for any peaks in requests; finally, this choice is useful for recovering the hours lost deriving from the project activity. With the given input data, a Takt Time of 274 seconds per piece is obtained.
In the following section we describe the designed actions to eliminate the detected waste and to standardise processes.

Designing actions: attacking useless movements and useless processes
The attack on these Muda is defined through four reported actions, which we describe in detail below.
-Action 1: the logistics must organise the raw material in crates. With this standardisation, operators do not have to open the packaging of raw materials, being immediately available for assembly. Estimated time saving: 157.2 seconds per piece. -Action 2: definition of standard areas for positioning finished containers and raw materials. In this way, the operator does not have to move outside his area to prepare the finished container or recover that of the raw material. Furthermore, the definition of the areas simplifies the feeding of raw material and withdrawal of the finished product, favouring the coordination of operations between departments. Estimated time saving: 26.1 seconds per piece. -Action 3: introduction of a line feeding system based on customised roller conveyors trolleys, and boxes. In this way, a unique interface is created between the logistics department and the assembly department: this enables the possibility to integrate a reordering kanban based system that standardise the line supply signals with a consequent ease of coordination between departments. Finally, this action leads the isle to operate in all respects with the lean method, abandoning the traditional work strategy. Estimated time saving of 110,1 seconds per piece. -Action 4: better positioning and management of assembly instructions. This action involves the adoption of reading desks (first) and computers (later), avoiding operators to constantly move from the workplace to search for the information necessary to complete the assembly activities. Estimated time savings of 11.2 seconds per piece.
The actions described above lead to a reduction of the estimated cycle time from 658.8 seconds per piece to 354.2 seconds per piece, with a total saving of 304.6 seconds per piece.

Designing actions: attacking useless warehouses and overproduction
Wastes related to useless warehouses and overproduction mainly impact on the planning office and the logistics department. Here, the main change in the proposed solution was the elimination of pre-assemblies, which had no reason to be applied at this point in the supply chain, due to the distance from the decoupling point and the Assembly-to-Order nature of the plant. Office process with ("as-is", left) and without ("to-be", right) the pre-assemblies. Fig. 13: Logistics process with ("as-is", left) and without ("to-be", right) the pre-assemblies. Figure 12 shows the transformation of the office process, where the first two steps involving order production (ODP) and order transfer (OT) for pre-assembly (left) have become unnecessary due to the elimination of pre-assemblies (right). The time saved at the planning office is summarised in Table 2.
Similarly, Figure 13 shows the revised logistics process, where the unnecessary activities are those of preassembly, feeding of raw material and withdrawal of finished subgroups. The saved times in the logistic operations area are summarised in Table 3.
Being the focus of this paper on the production phase, the aforementioned savings have not been considered in the subsequent discussion, since they fall under the logistic pillar. However, we decided to report them for completeness. The results described above and the actions related to them have been assigned to the logistics area, which has separately managed the issues and proposed its improvement.   Table 3: Main activities connected to the launch of a production order from a logistic perspective.

Designing actions: Process definition and balancing
In principle, the elimination of Muda would result in a total cycle time of 354.2 seconds per piece. However, this is greater than the takt time required by the market (274 seconds per piece). Therefore, two options have been considered: (1) assembling the product in two work shifts, with at least with one operator per shift; (2) assembling the product on one shift with the use of two operators. From the point of view of labour costs and required time, the two options are identical. Therefore, we chose the second one, in order to model an assembly line that can absorb any peak demand. On the other hand, in the event that demand fell, the use of two operators at the same time would result in a new waste: to prevent it, the line will be "U-shaped" to favour its functionality even with only one operator. The result of the line balancing process is summarised by Figure 14. Operations in Phase 1 include: greasing of bearing seats in crankcases and covers; assembly of bearings and oil seals in crankcases and covers at the same time; preparation and assembly of oil plugs for crankcases and lids at the same time; pinion capping. Operations in Phase 2 include: inserting dowel pins, gasket and glue for gaskets; preparation and insertion of the power take-off in the crown; insertion of the power take-off and pinion in the crankcase; multiplier closure with lid and pneumatic test.

Results
We hereby summarise the result of our analysis, by highlighting the overall savings that the re-design of the assembly line has produced. In the "as-is" scenario we have the following initial situation: Fig. 14: Yamazumi chart for the "to-be" expected state: note the result of the operations balancing, at which 7 seconds have been added for each phase, to take into account the steps that the operator must perform to move along the line (estimated about 1 second per step). The last item was computed as an indicator of the overall productivity, i.e., considering both the time dedicated to direct and indirect activities of the line, assuming that the indirect activities do not change.
After the re-design of the assembly line, the "to-be" scenario provides the following results: Additionally, 864 hours were saved in the logistics department and programming office, due to the no longer necessary management of the pre-assembled components. The total cost for the implementation of the proposed solution can be estimated as follows: -Roller conveyors, interlocking structures complete with tool racks, structures for electronic screwdriver control units and process support trolleys: 8,000 e; -Renewed piece holder boards for BF10: 5,000 e; -Layout modification, modifications to the electrical system and safe positioning of the manipulator: 3,000 e.
The total cost of implementing the solution is thus 16,000 e. The estimate of benefits on costs is therefore proposed below: Such an estimate was made by assuming to be able to reach 80% of the estimated result, as a precautionary measure. In addition, the hourly cost of operators was valued at 30 e per hour, as per company practice. The result indicates that the project will have a positive impact on the assembly line, with a payback time of just over 6 months.

Oil Seal Control with Deep Learning
During the process of analysis of the assembly line, a frequent quality problem emerged: the leakage of the speed increaser around the shaft. Most of the time the issue popped out as a customer claim, so after the customer bought the speed increaser and tried it directly in the field. Despite the problem was not directly involved in the productivity improvement project, it affects the First Time Quality index of the assembly line, lowering its final overall performance. We devised a solution to be easily plugged in the assembly line, based on Poka-Yoke and deep learning.

Problem description
The problem appeared indiscriminately for any final product. The inspections made after the customer re-turn highlighted that all cases were generated because of the oil sealing had been mounted upside down. The inspection process was performed using compressed air. Basically, a compressor was mounted at the oil load seat and air was pushed inside the speed increaser at 3 to 5 bar. Then, a control unit monitored the test cycle and, in case the requirements are met, the product is validated. The air test, anyway, does not reproduce exactly the presence of oil. Therefore, spotting a leakage generated by an inverted seal is not guaranteed. Instead, spotting a missed seal in these conditions is always guaranteed.
A possible solution could emerge by adding a different testing gas to the receipt (e.g., nitrogen or helium). In this scenario, a higher level of leakage sensitivity could be obtained. Anyhow, this solution only partially solves the problem, because of the position of the test within the assembly line. In fact, the leakage test has to be performed at the end of the line, 3 despite the sealing mounting is performed far before it. In case of identification of a wrongly placed seal, the problem could only be fixed with a complete disassembly of the piece, as the oil seal is mounted under the bearing and is entirely surrounded by the bearing itself and the crankcase/cover. The bearing extraction, in particular, is a critical phase, because it is coupled with interference in its seat. Therefore, to extract it, specific tools are needed (extractors), a high use of force is required, and a long time is needed as well. For those reasons, even the ability to spot the wrong piece at the end of the line is not enough, cause the scenario would still require the use of a dedicated correcting area, with a dedicated high skilled operator. To completely eliminate the problem, it is therefore necessary to implement a monitoring system in the place where the oil seal and the relative bearings are mounted. Nevertheless, to implement a quality check test or a traditional Poka-Yoke might be challenging and costly, because of the nature of the involved pieces. Moreover, no process solution had been found by the company so far, and even a product re-design (which is also a costly option) could not guarantee its effectiveness. For all those reasons, a solution that overcomes the traditional lean tools and that can seamlessly integrate with them, is needed.

Proposed framework
The diameters of the oil seals vary between approximately 50 and 70 millimetres, depending on the model in which they are used. Given the small size of the oil seal, together with the uniformly black colour, recognising one side or the other turns out to be an activity that requires a high focus by the operator: with an insufficient light for the inspection, and with many working hours behind (resulting in an accumulation of mental fatigue), it is easy to commit mistakes ( Figure 16).
The challenge lies in implementing a method of verifying the proper positioning of the oil seal before the relative bearing insertion, while the operator is performing the assembly operation. The reason is that, in the event that there is no simultaneity between the control and the assembly, there is a risk that the operator inadvertently positions the oil seal upside down (or even forgets it), making the control process itself useless.
The proposed solution consists of a camera, fixed in the lower part of the press arm, which has to inspect the whole process and to detect possible mistakes The recognition system must be able to detect the components even if they are not positioned exactly in the same way at each cycle. This is necessary, because the oil seal can assume slightly different positions before the normal activation of the press: in particular, in addition to being positioned straight or upside down, during straight positioning the lower face of the oil seal may not be perfectly parallel with respect to the support surface of the crankcase, resulting "crooked" in an unpredictable direction. On the process side, this is not (a) Oil seal side that has to face the inside of the product.
(b) Oil seal side that has to face its crankcase housing.  a crucial problem, due to the rubber nature of the oil seal: it is sufficient for it being positioned in the surroundings of its seat to be placed correctly using the press. Nevertheless, the monitoring unit has to be able to discern this characteristic, without losing the ability to recognise the side of the oil seal in place. Finally, the system must recognise the components from different angles, as the camera will move along with the head of the press along an arc of circumference (See Figure 19). The descent process of the press head would take place only if the camera detects the correct pre-positioning of the oil seal in its place. A diagram of the resulting process is depicted in Figure 20.
The schema highlights how the control unit allows the activation of the press to recognise the correct positioning of the oil seal, fulfilling in all aspects the role of direct controller of the process, preventing, at any occasion, the error in a full Poka-Yoke spirit. This solution is not only easy to integrate into the process, but it ensures complete and easy scalability of the inspection for all the speed increasers models assembled here.
Among the other errors often made by the operator due to a dated engineering of the press drives, there is the wrong selection of the driving force of the bearings and oil seals: in fact, the press offers the possibility to carry out the operation with 50kg, 750 kg and 1,250 kg; the oil seals are planted with 50 kg of force, the bearings with 750 kg of force. The incorrect selection  of the planting force does not represent a quality risk; however, once the solution proposed above has been implemented, it would be very simple to integrate the automatic selection of the working pressure according to the component positioned on the crankcase/lid.

Methods
The problem described above can be addressed as a classification task: given the image of an oil seal, the goal is to recognise whether the object (1) is in the correct position, (2) has been positioned backwards, or (3) has not been positioned at all. In this work, we use a state-of-the-art algorithm for image classification, namely Convolutional Neural Networks (CNNs).
Convolutional Neural Networks are artificial neural networks equipped with the so-called convolutional filters, whose application leads to an efficient recognition of the images by the machine during the learning phase. Those filters are applied at the very beginning of the network. Their task is to extract useful information (i.e., features) from images, such as horizontal lines, vertical lines or angles. The filtered image is called feature map, because it emphasises the feature extracted using the convolutional filter. This kind of network has proven extremely powerful for several computer vision

Dataset
In order to train the CNN, 500 Full HD format images (1920 × 1080 pixels) has been collected through the use of a common mid-range smartphone and a tripod. The pictures depict a crankcase and an oil seal. The chosen model was the 12610004, the model product involved in the previous assembly line re-design. We collected samples for the three possible oil seal configurations (not positioned, positioned upside-down, correctly positioned) that we want the system to learn and recognise. Figure 21 shows an example of image collected for each class. All images were resized to 240 × 320 pixels and converted to grayscale, 4 to reduce the computational burden. A standard pre-processing phase with a 5 × 5 high-pass filter was also applied, in order to highlight borders and other high-frequency information, that are crucial for the classification task. Fig. 21: Example images of the data collected; in the first three pictures the oil seal is positioned in the right way (first class); in the second three pictures the oil seal is positioned upside down (second class) and in the last three is absent (third class); note the difficulty in recognising the difference between the first and second class, key point of the project.

Experiments
In our experiments, we aimed to trade-off accuracy and model complexity, in order to obtain a solution that does not require large computational resources and could be easily embedded within an on-board system. We used a CNN with a single convolutional layer consisting of 32 filters with dimension 3 × 3 and rectifier activation function. We then applied a max pooling layer with size 2 × 2. After flattening the output, we used a dense layer with 64 neurons, again a rectifier activation function, a dropout layer with probability 0.5, and finally an output layer with 3 neurons to perform multi-class classification. The Adam optimiser was used to train the network, using categorical cross-entropy as the loss function, as customary in multi-class problems. During training, we used mini-batches of size 32, and performed early stopping on the validation loss with a patience equal to 15 epochs. The training phase took place in the cloud, through the use of the GPUs offered by the Google Colab service. 5 Note that the hyper-parameters defined so far are the result of a try and error phase, where their combination provided the best result on the validation set.
For the evaluation of our approach, we performed a repeated k-fold cross-validation. In a k-fold crossvalidation, the original data-set is partitioned in k sets: in turn, each set acts as the test set, while the remaining k − 1 sets are used for training and validation. Results can be aggregated either via macro-average or microaverage. To make the procedure robust, the k-fold crossvalidation can be repeated n times, and average performance measures are usually reported. In our case, the number of fold k was set equal to 5, and we run a number n of repetitions equal to 10.
The average micro-accuracy on the 10 folds results to be equal to 90.0%, ranging from 83.7% up to 99.2% in the 10 repetitions. Given the small amount of images used in the training set, the performance of the CNN are indeed very encouraging.

Conclusions
In this work we described the re-engineering process of an assembly line addressed with Lean Manufacturing methods. The result of the process led to an increment of the line productivity from 46% to 80%. Then, the reengineering process addressed the problem of the incorrect assembly of oil seals in the final assembled product that affects the First Time Quality index of the area. Because of the nature of the problem, a novel solution approach was needed. We proposed to integrate a deep learning approach, namely a convolutional neural network, to automatically detect a wrong positioning of the oil seal. The designed architecture resulted to be a Poka Yoke, thus representing an interesting application of modern technologies based on artificial intelligence directly in the shop floor. We believe that similar applications of this kind of techniques will be more and more present in the manufacturing industry for the coming years, as a key component of Lean Manufacturing tools and methods.