Using a finite element method to numerically solve the time-dependent Ginzburg-Landau equations, we study the vortex-antivortex dynamics in a hybrid structure consisting of a finite size superconducting film with two magnetic dipoles on top which generate vortices and antivortices in the presence of a external homogeneous magnetic field. We obtain the different vortex-antivortex patterns for different arrangement and magnetic moments of two magnetic dipoles. Our results provide a tool for an effective manipulation of magnetic flux in mesoscopic hybrid structures.