-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Args in file facemodel.py #1
Comments
The first thing I want to declare is that this project is based on InsightFace. def start_up_init(train_mode=False):
parser = argparse.ArgumentParser(description='Arc Face Online Test')
# =================== General ARGS ====================
if not train_mode:
parser.add_argument('ip_address', type=str,
help='相机的IP地址或测试用视频文件名')
parser.add_argument('--face_recognize_threshold', type=float,
help='可疑人员识别阈值', default=0.95)
parser.add_argument('--max_face_number', type=int,
help='同时检测的最大人脸数量', default=8)
parser.add_argument('--max_frame_rate', type=int,
help='最大FPS', default=25)
parser.add_argument('--image-size', default='112,112',
help='输入特征提取网络的图片大小')
parser.add_argument('--dangerous_threshold', type=int,
help='1/2报警窗口长度', default=16)
parser.add_argument('--model', default='./model-r100-ii/model,0',
help='特征提取网络预训练模型路径')
parser.add_argument('--gpu', default=0, type=int,
help='GPU设备ID,-1代表使用CPU')
parser.add_argument('--det', default=0, type=int,
help='设置为1代表使用R+O网络进行检测, 0代表使用P+R+O进行检测')
parser.add_argument('--flip', default=1, type=int,
help='是否在训练时进行左右翻转相加操作')
parser.add_argument('--threshold', default=1.24, type=float,
help='空间向量距离阈值')
parser.add_argument('-v', '--video_mode', action="store_true",
help='设置从视频读取帧数据', default=False)
parser.add_argument('-c', '--cv_test_mode', action="store_true",
help='设置本地预览', default=False)
parser.add_argument('--mtcnn_minsize', type=int,
help='mtcnn最小检测框的尺寸(越小检测精度越高)', default=50)
parser.add_argument('--mtcnn_factor', type=float,
help='mtcnn图像缩放系数(关联图像金字塔层数,越大检测精度越高)', default=0.709)
parser.add_argument('--mtcnn_threshold', type=float, nargs='+',
help='mtcnn三层阈值', default=[0.6, 0.7, 0.92])
return parser.parse_args() And the entrance of this system is To launch this system you'll need node-js and python3.7. In this system we use Node-js as the websocket server to transfer image data from python client to webpage client. I will update the project in the next few days. Thank you for your interest in this project. |
Thank you for your explain, it's very helpful for me. In this project, will you use a search algorithm to compare an image input with the dataset? |
In this system we have to load 3 models Once we have detected a face, put it into ArcFace model to get 512 dims embedding vector async def embedding_loop(preload):
# =================== FR MODEL ====================
mlp, class_names = read_pkl_model('./model-mlp/mlp.pkl')
preload.gpu = -1
embedding = face_embedding.EmbeddingModel(preload)
while True:
img = suspicion_face_queue.get()
dt = time.strftime('%m-%d %H:%M:%S')
predict = mlp.predict_proba([embedding.get_one_feature(img)])
prob = predict.max(1)[0]
result_queue.put((img, dt, prob, class_names[predict.argmax(1)[0]])) =========Some argument have been deprecated, I will tell you the currently availables:
The system can be CPU real-time (upload image with max_frame_rate), but it cost nearly 3GB memory. |
Thank you very much, I hope to see the next update soon 💯 |
@1996scarlet 用webcam试了一下,我有一张照片和stalin的相似度高达99%:) |
No description provided.
The text was updated successfully, but these errors were encountered: