localization transition in model porous media