## 2 Materials and Methods  
This work presents a remote collaboration approach through an IoT infrastructure. It evaluates the possibility of replacing a human operator with an AI-based solution in line with Industry 4.0 concepts. The authors outline several challenges to this implementation and propose various potential solutions. However, the authors emphasize the necessity of collaboration between AI solutions and human operators within an IoT infrastructure, a principle characteristic of Industry 5.0. The Azure IoT Hub infrastructure mediates the communication of manufacturing equipment in Industry 4.0 with minimal implications for humans. In this scenario, an IoT ecosystem facilitates interaction between numerous devices and allows real-time data sharing, analysis, and decision-making. This research investigates the real-time reporting of production problems in cast manufacturing. We provide a specific IoT framework developed for Industry 4.0 applications that automates quality control while reducing human participation. Our architecture combines sensor technologies, data processing algorithms, and cloud-based services for continuous communication and on-the-spot tracking of production faults. In this study, real-time sensor fusion refers specifically to integrating and processing visual data from the ESP32-CAM in real-time. While the term \"sensor fusion\" is often used to describe the combination of data from multiple sensor modalities, here it applies exclusively to visual inputs. This approach ensures accurate defect detection by analyzing multiple frames or perspectives captured by the ESP32-CAM. Our approach demonstrates defect detection with high accuracy. This makes it suitable for industry usage. Figure 1 illustrates an Industry 4.0 manufacturing process for cast production that leverages AI methods and Azure cloud services for quality control and device communication. The proposed infrastructure includes the following:  
* Image Capture. The ESP32-CAM device captures images of each cast as it moves along the conveyor belt. Multiple photos are taken from different angles to improve detection accuracy. The detection functionality is achieved by analyzing multiple frames from slightly different angles generated by the piece's movement on the conveyor belt. The images from varied angles are obtained by physically positioning the components on the conveyor belt. This allows the camera to capture successive frames as the product moves;
* Image Analysis. The captured images are sent to Azure Custom Vision in real-time. This AI-based platform analyzes the images to identify potential defects such as cracks, wear, or missing parts of the product;
* Result Aggregation. The NIA aggregates the results from multiple images of the same cast;
* Alert Transmission. If a defect is detected, the ESP32-CAM sends an alert message through Azure IoT Hub. This hub manages communication between devices and facilitates data flow to other components, such as the SQL database or user interface;
* Storage and Analysis. Defect-related data are stored in an Azure SQL database for further analysis and process optimization. The Azure IoT Hub-based architecture uses AI-based inspection and cloud services to streamline quality control in cast manufacturing. Industry 4.0 emphasizes smart manufacturing, which relies heavily on the IoT, AI, and cloud computing to increase productivity and reduce human intervention. By establishing a standardized communication layer, Azure IoT Hub allows for a unified, device-agnostic infrastructure that promotes the characteristics of Industry 4.0 environments. Through this setup, quality control, monitoring, and alerting processes are streamlined, and human intervention is minimized, optimizing productivity and increasing precision in the quality assessment of manufactured casts. Azure IoT Hub is thecentral communication element that maintains device interaction and supports the overall automation framework associated with modern manufacturing.