In a rapidly evolving manufacturing landscape, digital twins of factory processes have emerged as a game-changing technology. Digital twins serve as virtual replicas of physical manufacturing processes, allowing organizations to simulate and analyze their operations in a virtual environment. Real-time data, especially inventory information, plays a crucial role in these virtual factories, providing up-to-the-minute insights for accurate simulations and dynamic adjustments. To implement a real-time computer vision inventory inference solution with MongoDB Atlas, the first task is transmitting data from the physical factory to MongoDB Atlas using the MQTT protocol, where images are sent as base64 encoded strings through AWS IoT Core. The model trained on these images uses object detection algorithms to predict the presence of specific pieces in the stock, and this prediction is stored in a collection for real-time inventory management. MongoDB Realm is then used to connect the digital twin with MongoDB Atlas, enabling seamless bidirectional communication and automatic conflict resolution. This setup enables transformative real-time inventory management for manufacturing companies, providing up-to-the-minute insights for accurate simulations and dynamic adjustments.