Virtual reality and Internet of Things (IoT) are widely used in various fields ranging from smart healthcare to smart factories. Among these systems, it is indispensable to obtain security, productivity, and other aspects of verification through the input data. We propose to detect the production status of tobacco cabinets in real-time and the safety detection of foreign objects in cigarette cabinets based on deep learning with the Internet of Things environment, and build foreign object detection and production state detection data sets and monitoring models. In the actual detection, the detection accuracy for different foreign objects reaches 97.75%; the accuracy for the feeding in materials status of the tobacco cabinet reaches 96.36%; the accuracy for the detection of the status of the tobacco cabinet conveyor belt is 91.76%; the overall detection time was less than 1 second. The proposed method has important practical significance for the safety, well-being, and efficient production of cigarette factories.