train_simple.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:tensorflow-siamese-fc 作者: www0wwwjs1 项目源码 文件源码
def precisionAuc(positions, groundTruth, radius, nStep):
    thres = np.linspace(0, radius, nStep)

    errs = np.zeros([nStep], dtype=np.float32)

    distances = np.sqrt(np.power(positions[:, 0]-groundTruth[:, 0], 2)+np.power(positions[:, 1]-groundTruth[:, 1], 2))
    distances[np.where(np.isnan(distances))] = []

    for p in range(0, nStep):
        errs[p] = np.shape(np.where(distances > thres[p]))[-1]

    score = np.trapz(errs)

    return score
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号