Stiffness estimates in small focal lesions by magnetic resonance elastography are often inaccurate. One factor contributing to these errors is the assumption of local material homogeneity made by most inversion algorithms. Here we describe an artificial neural network based inversion technique that accounts for material inhomogeneity (NNI_inh) and evaluate it in simulation, phantom, and in-vivo experiments. NNI_inh provides higher contrast-to-noise ratio for inclusions and may provide clearer delineation of inclusion boundaries when compared to two inversion algorithms that assume local material homogeneity. Preliminary clinical results in a case of hepatocellular carcinoma are also shown.