The objective of this study is determination of relative permeability curves from an analysis of the pore space geometry. The main assumptions are that the capillary pressure determines the fluid distribution and the rock is water-wet. Maximal inscribed spheres computations characterize the portion of the pore space occupied by each fluid at a given saturation. Numerical solution of the Stokes equations evaluates the pore-scale flow field, which is averaged to estimate the permeability to each fluid. The computed relative permeability curves are in good agreement with published data. The input for the proposed procedure can be either a computer tomography image of a sample of the rock of interest, or a computer-generated image based on depositional simulations. Partitioning of the entire domain into parts significantly improves the convergence and makes feasible implementation of the computational procedure on a desktop computer. The stability of the results with respect to the choice of computational parameters makes the proposed method suitable for routine applications. The model admits generalizations relaxing the requirement of water wetness of the rock. This model can be applied to evaluate the evolution of the rock flow properties under deformation, damage, mineral dissolution and precipitation.