# Vision Transformer in Industrial Visual Inspection
## 3 Learning Task Description  
As stated in the introduction, with this paper we want to reach a more general conclusion about the suitability and performance of vision transformers in industrial VI scenarios with small datasets. For this purpose, we have selected learning tasks from the context of rail freight transport. Specifically, we investigate the inspection of returning freight cars after train decomposition at railroad yards. The damage register contains over 1000 defect codes that cover things such as damaged load spaces, damaged or disconnected grounding cables, damage to bogie parts such as springs or wheels, but also unreadable captions or warning signs because of abrasion or graffiti contamination. Out of the wide variety of possible use cases, we consider three learning tasks, characterized by differences in intra-class variation, number of classes and detection targets per image. The first use case, in the following referred to as sheet metal (SM) use case, covers the detection of small to medium size holes in sheet metal floorings of wagons, that cover \(2\times 10^{-2}\%\) of the inspection image on average. This is important as load, for these wagons usually bulk cargo, induced by vibrations during transport, can fall through the holes, which, on the one hand, is a commercial damage because of the lost goods and on the other hand particles or small gravel-like objects that land on the railway tracks pose a danger to traffic safety. Figure 5 illustrates the two main challenges of this use case: On the one hand, the generally small size of the defects (left) and on the other hand the varying light conditions, as well as eventual reflections caused by wet surfaces (right). The task is formulated as a one-class object detection problem. The dataset of this use case consists of 192 top view images, that contain a total of 394 damages, which is equal to 2.05 damages per image. The second use case features three different damage types on wooden freight car load spaces (WLS). Its dataset is made up of 156 top view images including 255 annotations, with eight samples for damaged load support bearings or frames, 56 damaged wooden fillings of load supports, and 207 damages to floor boards (Table 1). The three damage types are depicted by example in Figure 6: the leftmost image shows that the connection to the bearing of a foldable load support has been detached by overstrain. In the middle one, a part of the wooden filling of a load support broke out of its frame and the one right shows a broken floor board. Broken floor boards mainly pose the threat of injury to loading or maintenance personal, when stepping on them, while damages to the load supports are influencing the proper securing of the cargo. The dataset characteristics are high color variety of the wooden components and a higher number of classes compared to sheet metal, as well as strong class imbalance. The third use case, character recognition (CR), is the recognition of errors of captions on the side of the cars, such as loading tables, maximum load volume, length of the wagon from buffer to buffer, and other specifications. Most of these captions must be present and properly readable for the wagons to be legally in operation. Additionally, caption matching with an internal database can be the corner stone for a future system that automatically detects damage, assigns them to the database entry of the corresponding wagon and schedules its next workshop maintenance date. Figure 7 depicts some examples of captions. The base for the caption matching is the localization and classification of 43 different characters including letters, numbers, and special characters. The corresponding dataset features 200 side view greyscale images containing 21,571 bounding boxes, which is equal to 108 per image on average. Figure 8 visualizes the strongly imbalanced distribution of the 43 classes, which is one of its challenges, in addition to it featuring a lot of classes and detection targets per image.