A numerical method, based on the design of two artificial neural networks, is presented in order to approximate the viscosity and density features of fluids from the eigenvalues of the Stokes operator. The finite element method is used to solve the direct problem by training a first artificial neural network. A nonlinear map of eigenvalues of the Stokes operator as a function of the viscosity and density of the fluid under study is then obtained. This relationship is later inverted and refined by training a second artificial neural network, solving the aforementioned inverse problem. Numerical examples are presented in order to show the effectiveness and the limitations of this methodology.