Short-wave infrared (SWIR) light is suitable for image recognition and biomedical applications due to the ability to perform unique absorption of material components. In this study, the partial inversion of a spinel structure was modified through cation substitution to induce an inverse behavior and charge variation. For MgGa 2 O 4 , the substitution of Ga 3+ with Sn 4+ expanded lattice parameters (a, b, c, and V), and Mg 2+ was used to achieve charge balance. When the concentration of Sn increased, the T 2g vibrational mode exhibited a significant decline at 638 cm −1 , which was ascribed to GaO 4 , and another retentive T 2g vibrational mode at 542 cm −1 was ascribed to MgO 4 . This demonstrated that MgGa 2 O 4 was a local structure with partial inversion. The clusters of (Ga/MgO 4 −MgO 4 ) from y = 0.5 to 0.7 revealed a disordered broadband signal in the same Raman shift, and octahedral sites retained their ordering structure. The local structure induced Ni 2+/3+ to coexist and transform into pure Ni 2+ at octahedral sites through increasing Sn concentration. The time-resolved photoluminescence and emission spectrum revealed high energy transfer efficiency (>90%). The long SWIR emission achieved through Sn substitution enabled the fabrication of an SWIR light-emitting diode device; this device, along with a two-dimensional convolutional neural network, increased the accuracy of an artificial intelligencebased image recognition system from 72.2% to 94.4%. This study promotes research on sequences for inverse tetrahedral sites such as Mg, Al, Ga, In, and other transition metals in spinel structures. In addition, the applicability of artificial intelligence to complete everyday tasks was demonstrated.