This study contributes to improving Morocco's fish canning industry by integrating artificial intelligence (AI). The primary objective involves developing an AI and image processing-based system to monitor and guarantee canning process quality in the facility. It commenced with an IoT-enabled device capable of capturing and processing images, leading to the creation of an AI-driven system adept at accurately categorizing improperly crimped cans. Further advancements focused on reinforcing communication between IoT devices and servers housing individual client's neural network weights. These weights are vital, ensuring the functionality of our IoT device. The efficiency of the IoT device in categorizing cans relies on updated neural network weights from the Fog server, crucial for continual refinement and adaptation to diverse can shapes. Securing communication integrity between devices and the server is imperative to avoid disruptions in can classification, emphasizing the need for secure channels. In this paper, our key scientific contribution revolves around devising a security protocol founded on HMAC. This protocol guarantees authentication and preserves the integrity of neural network weights exchanged between Fog computing nodes and IoT devices. The innovative addition of a comprehensive dictionary within the Fog server significantly bolsters security measures, enhancing the overall safety between these interconnected entities.