Reservoir simulation is commonly performed on upscaled models of complex geological models. The upscaling process introduces a principal challenge in accurately simulating two-phase fluid dynamics in porous media. To tackle this challenge, it is important to upscale relative permeability accurately. In this paper, a numerical method, which is based on the mimetic finite difference method (MFD) and digital rock analysis (DRA), is proposed for relative permeability upscaling. The validation of MFD is tested by two different cases with exact pressure solution. Then, the relative permeability of the digital rock (small element) is calculated based on the pore network modeling. The small elements are combined together to make up a larger model with different sizes (444, 666, 888, 101010 elements). Finally, the accuracy of the proposed method is verified by comparing simulated results of the different sizes with that of the original one. The results show that MFD can solve the multi-phase flow scenarios with high accuracy and the L2 error follows the opposite trend to that of mesh size, which means that more refinement level gives less L2 error. For the upscaling of absolute permeability, the relative error can be decreased to 2.27%, which confirms that the proposed method is capable of calculating the absolute permeability with higher refinement levels. The fitting degree of the simulated water phase relative permeability to the original one is better than that of oil phase. The average relative error of water pahse relative permeability upscaling can decrease to less than 5.0%. It is found that the results will get worse when the model includes less elements. Especially at low water saturation, there exists some fluctuations for relative permeability curves and it may be due to the unstable state of the waterflood front with less elements involved.