threshold_lfw = {
    "ShuffleNet_V2_GDConv-stride1": {"cos": 0.22403636574745178, "cos_acc": 0.9915},
    "Mobilenet": {"cos": 0.15846577286720276, "cos_acc": 0.9935},
    "MobilenetV2-stride1": {"cos": 0.24340271949768066, "cos_acc": 0.9905},
    "CosFace": {"cos": 0.24625787138938904, "cos_acc": 0.9868333333333333},
    "FaceNet-VGGFace2": {"cos": 0.42074376344680786, "cos_acc": 0.9923333333333333},
    "Mobilenet-stride1": {"cos": 0.19342336058616638, "cos_acc": 0.9956666666666667},
    "SphereFace": {"cos": 0.34931832551956177, "cos_acc": 0.9818333333333333},
    "MobileFace": {"cos": 0.21116749942302704, "cos_acc": 0.9945},
    "FaceNet-casia": {"cos": 0.4289606213569641, "cos_acc": 0.981},
    "MobilenetV2": {"cos": 0.22666725516319275, "cos_acc": 0.9933333333333333},
    "ArcFace": {"cos_acc": 0.995, "cos": 0.28402677178382874},
    "ResNet50": {"cos": 0.19116485118865967, "cos_acc": 0.9971666666666666},
    "ShuffleNet_V1_GDConv": {"cos_acc": 0.9946666666666667, "cos": 0.19073212146759033},
    "ResNet50-casia": {"cos": 0.1854616403579712, "cos_acc": 0.986},
    "IR50-Am": {"cos": 0.45836973190307617, "cos_acc": 0.9921666666666666},
    "IR50-ArcFace": {"cos_acc": 0.997, "cos": 0.27737492322921753},
    "IR50-CosFace": {"cos_acc": 0.997, "cos": 0.22401964664459229},
    "IR50-Softmax": {"cos": 0.34233152866363525, "cos_acc": 0.996},
    "IR50-SphereFace": {"cos_acc": 0.9958333333333333, "cos": 0.361619234085083},
    "IR50-PGDSoftmax": {"cos_acc": 0.913, "cos": 0.3052944242954254},
    "IR50-TradesSoftmax": {"cos": 0.32782697677612305, "cos_acc": 0.9095},
    "IR50-PGDArcFace": {"cos_acc": 0.8766666666666667, "cos": 0.37509775161743164},
    "IR50-TradesArcFace": {"cos": 0.852626383304596, "cos_acc": 0.9506666666666667},
    "IR50-PGDCosFace": {"cos": 0.2336357682943344, "cos_acc": 0.8618333333333333},
    "IR50-TradesCosFace": {"cos": 0.6367585062980652, "cos_acc": 0.9073333333333333},
    "IR50-PGDAm": {"cos": 0.415134072303772, "cos_acc": 0.85},
    "IR50-PGDSphereFace": {"cos": 0.5209366679191589, "cos_acc": 0.8881666666666667},
    "CASIA-Am": {"cos": 0.4614875912666321, "cos_acc": 0.978},
    "CASIA-ArcFace": {"cos": 0.3242388069629669, "cos_acc": 0.9905},
    "CASIA-CosFace": {"cos": 0.23147112131118774, "cos_acc": 0.9911666666666666},
    "CASIA-Softmax": {"cos": 0.3241730332374573, "cos_acc": 0.9883333333333333},
    "CASIA-SphereFace": {"cos": 0.4365990459918976, "cos_acc": 0.9765},
    "IR50-Softmax-BR": {"cos": 0.33871138095855713, "cos_acc": 0.996},
    "IR50-Softmax-JPEG": {"cos": 0.34150177240371704, "cos_acc": 0.9958333333333333},
    "IR50-Softmax-RP": {"cos": 0.35351189970970154, "cos_acc": 0.9941666666666666},
    "tencent": {"cos": 63.18, "cos_acc": 0.99},
}

threshold_ytf = {
    "ArcFace": {"cos_acc": 0.9242, "cos": 0.19488728046417236},
    "CosFace": {"cos": 0.1857828050851822, "cos_acc": 0.8832},
    "FaceNet-VGGFace2": {"cos_acc": 0.9116, "cos": 0.31023329496383667},
    "FaceNet-casia": {"cos_acc": 0.8808, "cos": 0.3301801383495331},
    "IR50-ArcFace": {"cos": 0.1691020429134369, "cos_acc": 0.9248},
    "IR50-CosFace": {"cos": 0.15510299801826477, "cos_acc": 0.9252},
    "IR50-Softmax": {"cos_acc": 0.9238, "cos": 0.24214166402816772},
    "IR50-SphereFace": {"cos_acc": 0.925, "cos": 0.28270912170410156},
    "IR50-Am": {"cos_acc": 0.9072, "cos": 0.43860968947410583},
    "MobileFace": {"cos_acc": 0.9156, "cos": 0.14553602039813995},
    "Mobilenet": {"cos": 0.10296428203582764, "cos_acc": 0.9084},
    "MobilenetV2": {"cos": 0.15823234617710114, "cos_acc": 0.9054},
    "ResNet50": {"cos_acc": 0.9236, "cos": 0.12141724675893784},
    "ShuffleNet_V1_GDConv": {"cos": 0.16240093111991882, "cos_acc": 0.9124},
    "ShuffleNet_V2_GDConv-stride1": {"cos_acc": 0.909, "cos": 0.17131713032722473},
    "SphereFace": {"cos": 0.27045994997024536, "cos_acc": 0.8644},
    "IR50-PGDArcFace": {"cos": 0.9603925943374634, "cos_acc": 0.7906},
    "IR50-PGDCosFace": {"cos": 0.2164868712425232, "cos_acc": 0.7244},
    "IR50-PGDSoftmax": {"cos": 0.23339605331420898, "cos_acc": 0.7948},
    "IR50-PGDAm": {"cos": 0.3471382260322571, "cos_acc": 0.735},
    "IR50-PGDSphereFace": {"cos": 0.5446636080741882, "cos_acc": 0.7728},
}

threshold_cfp = {
    "ArcFace": {"cos": 0.180694118142128, "cos_acc": 0.927},
    "CosFace": {"cos": 0.13066118955612183, "cos_acc": 0.8877142857142857},
    "FaceNet-casia": {"cos": 0.27191388607025146, "cos_acc": 0.9137142857142857},
    "FaceNet-VGGFace2": {"cos": 0.3006403148174286, "cos_acc": 0.9521428571428572},
    "IR50-ArcFace": {"cos_acc": 0.9448571428571428, "cos": 0.17956402897834778},
    "IR50-CosFace": {"cos": 0.15117278695106506, "cos_acc": 0.9458571428571428},
    "IR50-Softmax": {"cos_acc": 0.9395714285714286, "cos": 0.23303867876529694},
    "IR50-SphereFace": {"cos": 0.24293090403079987, "cos_acc": 0.943},
    "MobileFace": {"cos_acc": 0.9237142857142857, "cos": 0.11885908991098404},
    "Mobilenet": {"cos": 0.09211122244596481, "cos_acc": 0.8952857142857142},
    "MobilenetV2": {"cos": 0.11615722626447678, "cos_acc": 0.8871428571428571},
    "ResNet50": {"cos_acc": 0.9358571428571428, "cos": 0.12683597207069397},
    "ShuffleNet_V1_GDConv": {"cos_acc": 0.9121428571428571, "cos": 0.11991611123085022},
    "ShuffleNet_V2_GDConv-stride1": {
        "cos": 0.1374741792678833,
        "cos_acc": 0.8902857142857142,
    },
    "SphereFace": {"cos": 0.1759859174489975, "cos_acc": 0.8002857142857143},
    "IR50-Am": {"cos": 0.3824825882911682, "cos_acc": 0.9018571428571428},
    "IR50-PGDArcFace": {"cos": 0.9559742212295532, "cos_acc": 0.7621428571428571},
    "IR50-PGDCosFace": {"cos": 0.13608279824256897, "cos_acc": 0.6872857142857143},
    "IR50-PGDSoftmax": {"cos": 0.21237587928771973, "cos_acc": 0.7352857142857143},
}

THRESHOLD_DICT = {"lfw": threshold_lfw, "ytf": threshold_ytf, "cfp": threshold_cfp}
