Upscaling relative permeabilities in a structured porous medium