# The Vision-Based Data Reader in IoT System for Smart Factory
## 1 Introduction
Conventional feature descriptors in computer vision such as Scale Invariant Feature Transform (SIFT) [15], Speeded Up Robust Features (SURF) [16], Binary Robust Independent Elementary Features (BRIEF) [17], etc. are used in object detection for IoT cases to extract features for image classification tasks. However, these methods rely on hand-crafted features from input images using conventional machine learning or pattern recognition algorithms. They also requires a lot of domain knowledge and research experience to extract useful features from the input image to construct feature extractors for such applications. They are then used as input vectors for the classifiers, like Logistic Regression [17], Support Vector Machines [18], etc. to identify the label associated with an entire image (region of interest) in the case of a scene classification (object detection) problem. Therefore, the performance of the classification model is highly dependent on the feature extractor that can effectively and appropriately characterize the semantic features from the concerned images. Recently, the deep learning models combined with computer vision technologies have been able to convert general IoT devices into intelligent IoT devices that can solve a wide variety of realistic problems. For example, a smart speaker based on a face recognition algorithm was trained using a deep neural network. An object detection model was also deployed in the smart speaker; thus, the smart speaker's camera turns on and calls out the names of detected objects to respond to the user's command [19]. Most of the past study regarding AI/Computer Vision inspection for smart factories might not be applied to this study directly. They focused on accurate product inspection, including object detection and recognition. Computing resources are not the most important consideration. In general, the more powerful platform the system uses, the better inspection result it obtains. Recently, some studies based on computer vision had been proposed to recognize digits [20; 21]. Some deep learning results were only focused on analog meters to perform digit number recognition but not on PLC screens [22], and even a large R-CNN network was used to train the recognition model [23]. It really needs high computing power like GPU to train the object detection and recognition models. These techniques can successfully detect and recognize digits under some special conditions. However, these models are quite expensive and consume high power, such that it makes them almost impossible to run applications on using edge devices for solving various real problems. This background highlights the following two research questions:  
1. How do we build a vision-based data reader in an IoT system by a deep learning network to monitor machine conditions in real time and have a high precision rate? 2. How do we design a lightweight algorithm and compact model for a vision-based data reader used on edge devices? The proposed method applied robust image recognition to construct an automatic IoT system to monitor the processing condition and performance of connected machines to improve their productivity and performance. It focused on building a system to perform digit recognition tasks through a deep learning network. A simple camera embedded in Field Programmable Gate Array (FPGA) was attached to monitor the screen on the control panel of machines, and it was pre-programmed to capture images in real-time. The pre-processing step was then performed to have the normalized illumination of the captured image, and a saliency map was generated to reduce the detection time of the required region for recognition. Finally, digit recognition was performed and the recognized digits were transmitted through the IoT system for machine monitoring. The most significant part of the proposed system is the Vision-based Data Reader (VDR) system that uses the designed compact model for training and validation purposes to fit the requirements of cost consideration and real-time monitoring in edge computing.