A general method to build a pore network model from a 3D image of a porous material ispresented in this work in order to compute its permeability. A skeleton of the void spaceis first used to define pores position. This skeleton is converted to a first graph. Mergingsteps are necessary to obtain a relevant network. A volume is allocated to the pores using awatershed algorithm, starting with markers defined from the nodes of the graph. The linearsystem of equations to solve is deduced by integrating the Stokes equations on pore spacepartitioning elements. The proportionality coefficient linking the pressure drop betweentwo pore centers and the flow going through the surface separating them is calculated withan original method. Application of the complete process to a real material is presented.