def F_from_ransac(x1,x2,model,maxiter=5000,match_theshold=1e-6):

    from PCV.tools import ransac

    data = vstack((x1,x2))
    
    # compute F and return with inlier index
    F,ransac_data = ransac.ransac(data.T,model,8,maxiter,match_theshold,20,return_all=True)
    return F, ransac_data['inliers']
Robust estimation of a fundamental matrix F from point 
dataset/ETHPy150Open jesolem/PCV/PCV/geometry/sfm.py/F_from_ransac