An intelligent mid-infrared (mid-IR) integrated photonic device was demonstrated applying a machine learning (ML) algorithm. The design model and the estimation model of mid-IR micro-rings were trained by the artificial neural network (ANN) to create the performance-structure relationships. The sensing devices were then designed to align the micro-ring resonance with the characteristic mid-IR absorption wavelengths according to the gases of interest. Further applying the cascade micro-ring structures enables the device to monitor several gas analytes simultaneously. The ML-based mid-IR device provides a miniaturized sensing platform for remote and precise environmental monitoring.