We propose a dipole inversion method for improving quantitative susceptibility mapping. In conventional methods, shading artifacts often occur near the longitudinal fissure (LF) region of the estimated susceptibility map. Here, we propose an algorithm for LF region detection and regularized inversion, to reduce the shading artifacts. The LF region is automatically detected using information from the T2* map as well as training datasets via machine learning. The proposed method eliminates shading artifacts near the LF region in the susceptibility maps, while also showing negligible change in regions that do not suffer from shading artifacts, such as the basal ganglia.