Microfluidics has emerged as a foundational process for creating highly uniform emulsions and bubbles. To enable integration of microfluidic platforms into industrial processes, achieving precise control over the size uniformity of microfluidic-generated bubbles and emulsions is crucial. Even if the external variables such as flow rates or pressures are kept constant, microfluidic processes can be easily disturbed by unknown factors that would substantially compromise the uniformity of resulting emulsions and bubbles. In this study, we introduce a two-step soft-sensor approach that combines a convolutional neural network (CNN) and an image recognition algorithm for feature extraction to detect both the flow regime and the size and uniformity of resulting bubbles. By using a CNN to detect flow regimes, our controller is able to restore the bubble-producing flow regime in response to disturbances. Beyond self-recovery, our controller actively adjusts to minimize errors, maintain setpoints, mitigate disturbances, and ensure system stability over extended periods. 99.2% of bubbles produced during an 8-hour period remain within 5% of the setpoint with our controller acting. By leveraging the soft sensor and artificial intelligence-assisted feedback control, our work presents a widely applicable approach for precise and automated control of microfluidics in diverse applications.