1. A method, comprising: disposing an electromagnetic tool in a borehole penetrating a formation, the electromagnetic logging tool being part of a drill string in the formation, the drill string comprising a drill bit; acquiring measurements using the electromagnetic logging tool; and using a processor, applying a pixel-based inversion to the acquired measurements to determine at least one formation property, wherein applying the pixel-based inversion comprises using adaptive regularization.