diff --git a/README.md b/README.md index f67e77f4d65fb49a2046cda7fa5bfd3e527e4668..c9ff1c26fba7eb4cb7e8ff470d98a38ced900624 100644 --- a/README.md +++ b/README.md @@ -107,19 +107,19 @@ DeepSparkHub甄选上百个应用算法和模型,覆盖AI和通用计算各领 #### Face Detection -| Model | Framework | Dataset | -|------------------------------------------|-----------|------------| -| [RetinaFace](cv/face/retinaface/pytorch) | PyTorch | WIDER FACE | +| Model | Framework | Dataset | +|----------------------------------------------------|-----------|------------| +| [RetinaFace](cv/face_detection/retinaface/pytorch) | PyTorch | WIDER FACE | #### Face Recognition -| Model | Framework | Dataset | -|---------------------------------------------|--------------|--------------------| -| [ArcFace](cv/face/arcface/pytorch) | PyTorch | CASIA-WebFaces&LFW | -| [BlazeFace](cv/face/blazeface/paddlepaddle) | PaddlePaddle | WIDER FACE | -| [CosFace](cv/face/cosface/pytorch) | PyTorch | CASIA-WebFaces&LFW | -| [FaceNet](cv/face/facenet/pytorch) | PyTorch | CASIA-WebFaces&LFW | -| [FaceNet](cv/face/facenet/tensorflow) | TensorFlow | CASIA-WebFaces&LFW | +| Model | Framework | Dataset | +|---------------------------------------------------------|--------------|--------------------| +| [ArcFace](cv/face_recognition/arcface/pytorch) | PyTorch | CASIA-WebFaces&LFW | +| [BlazeFace](cv/face_recognition/blazeface/paddlepaddle) | PaddlePaddle | WIDER FACE | +| [CosFace](cv/face_recognition/cosface/pytorch) | PyTorch | CASIA-WebFaces&LFW | +| [FaceNet](cv/face_recognition/facenet/pytorch) | PyTorch | CASIA-WebFaces&LFW | +| [FaceNet](cv/face_recognition/facenet/tensorflow) | TensorFlow | CASIA-WebFaces&LFW | #### Instance Segmentation diff --git a/cv/face/README.md b/cv/face/README.md deleted file mode 100644 index a83efc050893f19d44da5c29951926b4a1ba8061..0000000000000000000000000000000000000000 --- a/cv/face/README.md +++ /dev/null @@ -1 +0,0 @@ -# Face Recognition diff --git a/cv/face/arcface/pytorch/.gitignore b/cv/face_recognition/arcface/pytorch/.gitignore similarity index 100% rename from cv/face/arcface/pytorch/.gitignore rename to cv/face_recognition/arcface/pytorch/.gitignore diff --git a/cv/face/arcface/pytorch/LICENSE b/cv/face_recognition/arcface/pytorch/LICENSE similarity index 100% rename from cv/face/arcface/pytorch/LICENSE rename to cv/face_recognition/arcface/pytorch/LICENSE diff --git a/cv/face/arcface/pytorch/README.md b/cv/face_recognition/arcface/pytorch/README.md similarity index 65% rename from cv/face/arcface/pytorch/README.md rename to cv/face_recognition/arcface/pytorch/README.md index 0ddc780f0292c77e406d444eedafb80f1b6b544f..f478e2e6087818a86b4462f2b8c909f3f8574f27 100644 --- a/cv/face/arcface/pytorch/README.md +++ b/cv/face_recognition/arcface/pytorch/README.md @@ -1,7 +1,11 @@ # ArcFace ## Model description -This repo is a pytorch implement of ArcFace, which propose an Additive Angular Margin Loss to obtain highly discriminative features for face recognition. The proposed ArcFace has a clear geometric interpretation due to the exact correspondence to the geodesic distance on the hypersphere. ArcFace consistently outperforms the state-of-the-art and can be easily implemented with negligible computational overhead + +This repo is a pytorch implement of ArcFace, which propose an Additive Angular Margin Loss to obtain highly +discriminative features for face recognition. The proposed ArcFace has a clear geometric interpretation due to the exact +correspondence to the geodesic distance on the hypersphere. ArcFace consistently outperforms the state-of-the-art and +can be easily implemented with negligible computational overhead ## Step 1: Installation @@ -36,10 +40,10 @@ bash run.sh $GPUS ## Results -| model | FPS | LFW_Accuracy | +| Model | FPS | LFW_Accuracy | |---------|--------| -----------------| -| arcface | 38.272 | 0.99000+-0.00615 | +| ArcFace | 38.272 | 0.99000+-0.00615 | ## Reference -- [arcface-pytorch](https://github.com/bubbliiiing/arcface-pytorch) +- [arcface-pytorch](https://github.com/bubbliiiing/arcface-pytorch) diff --git a/cv/face/arcface/pytorch/arcface.py b/cv/face_recognition/arcface/pytorch/arcface.py similarity index 100% rename from cv/face/arcface/pytorch/arcface.py rename to cv/face_recognition/arcface/pytorch/arcface.py diff --git a/cv/face/arcface/pytorch/eval_LFW.py b/cv/face_recognition/arcface/pytorch/eval_LFW.py similarity index 100% rename from cv/face/arcface/pytorch/eval_LFW.py rename to cv/face_recognition/arcface/pytorch/eval_LFW.py diff --git a/cv/face/arcface/pytorch/img/1_001.jpg b/cv/face_recognition/arcface/pytorch/img/1_001.jpg similarity index 100% rename from cv/face/arcface/pytorch/img/1_001.jpg rename to cv/face_recognition/arcface/pytorch/img/1_001.jpg diff --git a/cv/face/arcface/pytorch/img/1_002.jpg b/cv/face_recognition/arcface/pytorch/img/1_002.jpg similarity index 100% rename from cv/face/arcface/pytorch/img/1_002.jpg rename to cv/face_recognition/arcface/pytorch/img/1_002.jpg diff --git a/cv/face/arcface/pytorch/img/2_001.jpg b/cv/face_recognition/arcface/pytorch/img/2_001.jpg similarity index 100% rename from cv/face/arcface/pytorch/img/2_001.jpg rename to cv/face_recognition/arcface/pytorch/img/2_001.jpg diff --git a/cv/face/arcface/pytorch/nets/__init__.py b/cv/face_recognition/arcface/pytorch/nets/__init__.py similarity index 100% rename from cv/face/arcface/pytorch/nets/__init__.py rename to cv/face_recognition/arcface/pytorch/nets/__init__.py diff --git a/cv/face/arcface/pytorch/nets/arcface.py b/cv/face_recognition/arcface/pytorch/nets/arcface.py similarity index 100% rename from cv/face/arcface/pytorch/nets/arcface.py rename to cv/face_recognition/arcface/pytorch/nets/arcface.py diff --git a/cv/face/arcface/pytorch/nets/arcface_training.py b/cv/face_recognition/arcface/pytorch/nets/arcface_training.py similarity index 100% rename from cv/face/arcface/pytorch/nets/arcface_training.py rename to cv/face_recognition/arcface/pytorch/nets/arcface_training.py diff --git a/cv/face/arcface/pytorch/nets/iresnet.py b/cv/face_recognition/arcface/pytorch/nets/iresnet.py similarity index 100% rename from cv/face/arcface/pytorch/nets/iresnet.py rename to cv/face_recognition/arcface/pytorch/nets/iresnet.py diff --git a/cv/face/arcface/pytorch/nets/mobilefacenet.py b/cv/face_recognition/arcface/pytorch/nets/mobilefacenet.py similarity index 100% rename from cv/face/arcface/pytorch/nets/mobilefacenet.py rename to cv/face_recognition/arcface/pytorch/nets/mobilefacenet.py diff --git a/cv/face/arcface/pytorch/nets/mobilenet.py b/cv/face_recognition/arcface/pytorch/nets/mobilenet.py similarity index 100% rename from cv/face/arcface/pytorch/nets/mobilenet.py rename to cv/face_recognition/arcface/pytorch/nets/mobilenet.py diff --git a/cv/face/arcface/pytorch/predict.py b/cv/face_recognition/arcface/pytorch/predict.py similarity index 100% rename from cv/face/arcface/pytorch/predict.py rename to cv/face_recognition/arcface/pytorch/predict.py diff --git a/cv/face/arcface/pytorch/requirements.txt b/cv/face_recognition/arcface/pytorch/requirements.txt similarity index 100% rename from cv/face/arcface/pytorch/requirements.txt rename to cv/face_recognition/arcface/pytorch/requirements.txt diff --git a/cv/face/arcface/pytorch/run.sh b/cv/face_recognition/arcface/pytorch/run.sh similarity index 100% rename from cv/face/arcface/pytorch/run.sh rename to cv/face_recognition/arcface/pytorch/run.sh diff --git a/cv/face/arcface/pytorch/summary.py b/cv/face_recognition/arcface/pytorch/summary.py similarity index 100% rename from cv/face/arcface/pytorch/summary.py rename to cv/face_recognition/arcface/pytorch/summary.py diff --git a/cv/face/arcface/pytorch/train.py b/cv/face_recognition/arcface/pytorch/train.py similarity index 100% rename from cv/face/arcface/pytorch/train.py rename to cv/face_recognition/arcface/pytorch/train.py diff --git a/cv/face/arcface/pytorch/txt_annotation.py b/cv/face_recognition/arcface/pytorch/txt_annotation.py similarity index 100% rename from cv/face/arcface/pytorch/txt_annotation.py rename to cv/face_recognition/arcface/pytorch/txt_annotation.py diff --git a/cv/face/arcface/pytorch/utils/__init__.py b/cv/face_recognition/arcface/pytorch/utils/__init__.py similarity index 100% rename from cv/face/arcface/pytorch/utils/__init__.py rename to cv/face_recognition/arcface/pytorch/utils/__init__.py diff --git a/cv/face/arcface/pytorch/utils/callback.py b/cv/face_recognition/arcface/pytorch/utils/callback.py similarity index 100% rename from cv/face/arcface/pytorch/utils/callback.py rename to cv/face_recognition/arcface/pytorch/utils/callback.py diff --git a/cv/face/arcface/pytorch/utils/dataloader.py b/cv/face_recognition/arcface/pytorch/utils/dataloader.py similarity index 100% rename from cv/face/arcface/pytorch/utils/dataloader.py rename to cv/face_recognition/arcface/pytorch/utils/dataloader.py diff --git a/cv/face/arcface/pytorch/utils/utils.py b/cv/face_recognition/arcface/pytorch/utils/utils.py similarity index 100% rename from cv/face/arcface/pytorch/utils/utils.py rename to cv/face_recognition/arcface/pytorch/utils/utils.py diff --git a/cv/face/arcface/pytorch/utils/utils_fit.py b/cv/face_recognition/arcface/pytorch/utils/utils_fit.py similarity index 100% rename from cv/face/arcface/pytorch/utils/utils_fit.py rename to cv/face_recognition/arcface/pytorch/utils/utils_fit.py diff --git a/cv/face/arcface/pytorch/utils/utils_metrics.py b/cv/face_recognition/arcface/pytorch/utils/utils_metrics.py similarity index 100% rename from cv/face/arcface/pytorch/utils/utils_metrics.py rename to cv/face_recognition/arcface/pytorch/utils/utils_metrics.py diff --git a/cv/face/blazeface/paddlepaddle/README.md b/cv/face_recognition/blazeface/paddlepaddle/README.md similarity index 94% rename from cv/face/blazeface/paddlepaddle/README.md rename to cv/face_recognition/blazeface/paddlepaddle/README.md index e71aafd0cac69cb27e86d923ce231d5cff815b9d..b5b510c840f3eb418185708392c4df7ddbd3c3d7 100644 --- a/cv/face/blazeface/paddlepaddle/README.md +++ b/cv/face_recognition/blazeface/paddlepaddle/README.md @@ -1,9 +1,12 @@ # BlazeFace ## Model description -BlazeFace is Google Research published face detection model. It's lightweight but good performance, and tailored for mobile GPU inference. It runs at a speed of 200-1000+ FPS on flagship devices. + +BlazeFace is Google Research published face detection model. It's lightweight but good performance, and tailored for +mobile GPU inference. It runs at a speed of 200-1000+ FPS on flagship devices. ## Step 1: Installing + ```bash git clone https://github.com/PaddlePaddle/PaddleDetection.git ``` @@ -20,11 +23,13 @@ pip3 install install numba==0.56.4 ``` ## Step 2: Prepare Datasets + We use WIDER-FACE dataset for training and model tests, the official web site provides detailed data is introduced. - WIDER-Face data source: - Load a dataset of type wider_face using the following directory structure: + ```bash dataset/wider_face/ ├── wider_face_split @@ -47,7 +52,9 @@ dataset/wider_face/ │ │ ├── 10--People_Marching │ │ │ ... ``` + - Manually download the dataset: To download the WIDER-FACE dataset, run the following command: + ```bash cd dataset/wider_face && ./download_wider_face.sh ``` @@ -61,7 +68,9 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python3 -m paddle.distributed.launch --gpus 0,1,2,3,4,5,6,7 tools/train.py -c configs/face_detection/blazeface_fpn_ssh_1000e.yml ``` + ## Step 4: Evaluation + ```bash python3 -u tools/eval.py -c configs/face_detection/blazeface_fpn_ssh_1000e.yml \ -o weights=output/blazeface_fpn_ssh_1000e/model_final.pdopt \ @@ -76,11 +85,12 @@ python3 setup.py build_ext --inplace python3 evaluation.py -p ../output/pred/ -g ../eval_tools/ground_truth ``` - ## Step 5: result | GPUs | Network structure | Easy/Medium/Hard Set | Ips |-------------|-----------|-----------|---—------| | BI-V100 x 8 | BlazeFace-FPN-SSH | 0.886/0.860/0.753 | 8.6813 | + ## Reference + - [PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection) diff --git a/cv/face/cosface/pytorch/LICENSE b/cv/face_recognition/cosface/pytorch/LICENSE similarity index 100% rename from cv/face/cosface/pytorch/LICENSE rename to cv/face_recognition/cosface/pytorch/LICENSE diff --git a/cv/face/cosface/pytorch/README.md b/cv/face_recognition/cosface/pytorch/README.md similarity index 69% rename from cv/face/cosface/pytorch/README.md rename to cv/face_recognition/cosface/pytorch/README.md index caea2d804d706223e9c303cc2f26feb3a83cae8f..e2076e8e8f35a58d18c4b408356bcb2061d867d6 100644 --- a/cv/face/cosface/pytorch/README.md +++ b/cv/face_recognition/cosface/pytorch/README.md @@ -2,7 +2,9 @@ ## Model description -CosFace is a face recognition model that achieves state-of-the-art results by introducing a cosine margin penalty in the loss function when training the neural network, which learns highly discriminative facial embeddings by maximizing inter-class differences and minimizing intra-class variations. +CosFace is a face recognition model that achieves state-of-the-art results by introducing a cosine margin penalty in the +loss function when training the neural network, which learns highly discriminative facial embeddings by maximizing +inter-class differences and minimizing intra-class variations. ## Step 1: Installation @@ -41,11 +43,10 @@ bash train.sh 0,1,2,3,4,5,6,7 ## Results -| model | FPS | LFW_Accuracy | -|---------|--------| -----------------| -| Cosface | 5492.08 | 0.9865 | +| Model | FPS | LFW_Accuracy | +|---------|---------|--------------| +| Cosface | 5492.08 | 0.9865 | ## Reference -- [CosFace_pytorch](https://github.com/MuggleWang/CosFace_pytorch) - +- [CosFace_pytorch](https://github.com/MuggleWang/CosFace_pytorch) diff --git a/cv/face/cosface/pytorch/dataset.py b/cv/face_recognition/cosface/pytorch/dataset.py similarity index 100% rename from cv/face/cosface/pytorch/dataset.py rename to cv/face_recognition/cosface/pytorch/dataset.py diff --git a/cv/face/cosface/pytorch/datasets/lfw_pair.txt b/cv/face_recognition/cosface/pytorch/datasets/lfw_pair.txt similarity index 100% rename from cv/face/cosface/pytorch/datasets/lfw_pair.txt rename to cv/face_recognition/cosface/pytorch/datasets/lfw_pair.txt diff --git a/cv/face/cosface/pytorch/layer.py b/cv/face_recognition/cosface/pytorch/layer.py similarity index 100% rename from cv/face/cosface/pytorch/layer.py rename to cv/face_recognition/cosface/pytorch/layer.py diff --git a/cv/face/cosface/pytorch/lfw_eval.py b/cv/face_recognition/cosface/pytorch/lfw_eval.py similarity index 100% rename from cv/face/cosface/pytorch/lfw_eval.py rename to cv/face_recognition/cosface/pytorch/lfw_eval.py diff --git a/cv/face/cosface/pytorch/main.py b/cv/face_recognition/cosface/pytorch/main.py similarity index 100% rename from cv/face/cosface/pytorch/main.py rename to cv/face_recognition/cosface/pytorch/main.py diff --git a/cv/face/cosface/pytorch/net.py b/cv/face_recognition/cosface/pytorch/net.py similarity index 100% rename from cv/face/cosface/pytorch/net.py rename to cv/face_recognition/cosface/pytorch/net.py diff --git a/cv/face/cosface/pytorch/train.sh b/cv/face_recognition/cosface/pytorch/train.sh similarity index 100% rename from cv/face/cosface/pytorch/train.sh rename to cv/face_recognition/cosface/pytorch/train.sh diff --git a/cv/face/cosface/pytorch/txt_annotation.py b/cv/face_recognition/cosface/pytorch/txt_annotation.py similarity index 100% rename from cv/face/cosface/pytorch/txt_annotation.py rename to cv/face_recognition/cosface/pytorch/txt_annotation.py diff --git a/cv/face/facenet/pytorch/LICENSE b/cv/face_recognition/facenet/pytorch/LICENSE similarity index 100% rename from cv/face/facenet/pytorch/LICENSE rename to cv/face_recognition/facenet/pytorch/LICENSE diff --git a/cv/face/facenet/pytorch/README.md b/cv/face_recognition/facenet/pytorch/README.md similarity index 67% rename from cv/face/facenet/pytorch/README.md rename to cv/face_recognition/facenet/pytorch/README.md index 53f10d95b301c1e894ece28ac88668e31eacb0bb..3cd9d1f502136f50e141b274811e8226e584a4d7 100644 --- a/cv/face/facenet/pytorch/README.md +++ b/cv/face_recognition/facenet/pytorch/README.md @@ -3,13 +3,12 @@ ## Model Description This is a facenet-pytorch library that can be used to train your own face recognition model. -> Despite significant recent advances in the field of face recognition, implementing face -verification and recognition efficiently at scale presents serious challenges to current -approaches. In this paper we present a system, called FaceNet, that directly learns a mapping -from face images to a compact Euclidean space where distances directly correspond to a measure -of face similarity. Once this space has been produced, tasks such as face recognition, -verification and clustering can be easily implemented using standard techniques with FaceNet -embeddings as feature vectors. +> Despite significant recent advances in the field of face recognition, implementing face verification and recognition +efficiently at scale presents serious challenges to current approaches. In this paper we present a system, called +FaceNet, that directly learns a mapping from face images to a compact Euclidean space where distances directly +correspond to a measure of face similarity. Once this space has been produced, tasks such as face recognition, +verification and clustering can be easily implemented using standard techniques with FaceNet embeddings as feature +vectors. ## Step 1: Installation @@ -49,10 +48,11 @@ python3 train.py ## Results -| model | FPS | LFW_Accuracy | +| Model | FPS | LFW_Accuracy | |---------|--------| -----------------| -| facenet | 1256.96| 0.97933+-0.00624 | +| Facenet | 1256.96| 0.97933+-0.00624 | ## Reference + - [paper](https://arxiv.org/abs/1503.03832) - [facenet-pytorch](https://github.com/bubbliiiing/facenet-pytorch) diff --git a/cv/face/facenet/pytorch/eval_LFW.py b/cv/face_recognition/facenet/pytorch/eval_LFW.py similarity index 100% rename from cv/face/facenet/pytorch/eval_LFW.py rename to cv/face_recognition/facenet/pytorch/eval_LFW.py diff --git a/cv/face/facenet/pytorch/facenet.py b/cv/face_recognition/facenet/pytorch/facenet.py similarity index 100% rename from cv/face/facenet/pytorch/facenet.py rename to cv/face_recognition/facenet/pytorch/facenet.py diff --git a/cv/face/facenet/pytorch/img/1_001.jpg b/cv/face_recognition/facenet/pytorch/img/1_001.jpg similarity index 100% rename from cv/face/facenet/pytorch/img/1_001.jpg rename to cv/face_recognition/facenet/pytorch/img/1_001.jpg diff --git a/cv/face/facenet/pytorch/img/1_002.jpg b/cv/face_recognition/facenet/pytorch/img/1_002.jpg similarity index 100% rename from cv/face/facenet/pytorch/img/1_002.jpg rename to cv/face_recognition/facenet/pytorch/img/1_002.jpg diff --git a/cv/face/facenet/pytorch/img/2_001.jpg b/cv/face_recognition/facenet/pytorch/img/2_001.jpg similarity index 100% rename from cv/face/facenet/pytorch/img/2_001.jpg rename to cv/face_recognition/facenet/pytorch/img/2_001.jpg diff --git a/cv/face/facenet/pytorch/model_data/lfw_pair.txt b/cv/face_recognition/facenet/pytorch/model_data/lfw_pair.txt similarity index 100% rename from cv/face/facenet/pytorch/model_data/lfw_pair.txt rename to cv/face_recognition/facenet/pytorch/model_data/lfw_pair.txt diff --git a/cv/face/facenet/pytorch/model_data/roc_test.png b/cv/face_recognition/facenet/pytorch/model_data/roc_test.png similarity index 100% rename from cv/face/facenet/pytorch/model_data/roc_test.png rename to cv/face_recognition/facenet/pytorch/model_data/roc_test.png diff --git a/cv/face/facenet/pytorch/nets/facenet.py b/cv/face_recognition/facenet/pytorch/nets/facenet.py similarity index 100% rename from cv/face/facenet/pytorch/nets/facenet.py rename to cv/face_recognition/facenet/pytorch/nets/facenet.py diff --git a/cv/face/facenet/pytorch/nets/facenet_training.py b/cv/face_recognition/facenet/pytorch/nets/facenet_training.py similarity index 100% rename from cv/face/facenet/pytorch/nets/facenet_training.py rename to cv/face_recognition/facenet/pytorch/nets/facenet_training.py diff --git a/cv/face/facenet/pytorch/nets/inception_resnetv1.py b/cv/face_recognition/facenet/pytorch/nets/inception_resnetv1.py similarity index 100% rename from cv/face/facenet/pytorch/nets/inception_resnetv1.py rename to cv/face_recognition/facenet/pytorch/nets/inception_resnetv1.py diff --git a/cv/face/facenet/pytorch/nets/mobilenet.py b/cv/face_recognition/facenet/pytorch/nets/mobilenet.py similarity index 100% rename from cv/face/facenet/pytorch/nets/mobilenet.py rename to cv/face_recognition/facenet/pytorch/nets/mobilenet.py diff --git a/cv/face/facenet/pytorch/predict.py b/cv/face_recognition/facenet/pytorch/predict.py similarity index 100% rename from cv/face/facenet/pytorch/predict.py rename to cv/face_recognition/facenet/pytorch/predict.py diff --git a/cv/face/facenet/pytorch/requirements.txt b/cv/face_recognition/facenet/pytorch/requirements.txt similarity index 100% rename from cv/face/facenet/pytorch/requirements.txt rename to cv/face_recognition/facenet/pytorch/requirements.txt diff --git a/cv/face/facenet/pytorch/summary.py b/cv/face_recognition/facenet/pytorch/summary.py similarity index 100% rename from cv/face/facenet/pytorch/summary.py rename to cv/face_recognition/facenet/pytorch/summary.py diff --git a/cv/face/facenet/pytorch/train.py b/cv/face_recognition/facenet/pytorch/train.py similarity index 100% rename from cv/face/facenet/pytorch/train.py rename to cv/face_recognition/facenet/pytorch/train.py diff --git a/cv/face/facenet/pytorch/txt_annotation.py b/cv/face_recognition/facenet/pytorch/txt_annotation.py similarity index 100% rename from cv/face/facenet/pytorch/txt_annotation.py rename to cv/face_recognition/facenet/pytorch/txt_annotation.py diff --git a/cv/face/facenet/pytorch/utils/__init__.py b/cv/face_recognition/facenet/pytorch/utils/__init__.py similarity index 100% rename from cv/face/facenet/pytorch/utils/__init__.py rename to cv/face_recognition/facenet/pytorch/utils/__init__.py diff --git a/cv/face/facenet/pytorch/utils/callback.py b/cv/face_recognition/facenet/pytorch/utils/callback.py similarity index 100% rename from cv/face/facenet/pytorch/utils/callback.py rename to cv/face_recognition/facenet/pytorch/utils/callback.py diff --git a/cv/face/facenet/pytorch/utils/dataloader.py b/cv/face_recognition/facenet/pytorch/utils/dataloader.py similarity index 100% rename from cv/face/facenet/pytorch/utils/dataloader.py rename to cv/face_recognition/facenet/pytorch/utils/dataloader.py diff --git a/cv/face/facenet/pytorch/utils/utils.py b/cv/face_recognition/facenet/pytorch/utils/utils.py similarity index 100% rename from cv/face/facenet/pytorch/utils/utils.py rename to cv/face_recognition/facenet/pytorch/utils/utils.py diff --git a/cv/face/facenet/pytorch/utils/utils_fit.py b/cv/face_recognition/facenet/pytorch/utils/utils_fit.py similarity index 100% rename from cv/face/facenet/pytorch/utils/utils_fit.py rename to cv/face_recognition/facenet/pytorch/utils/utils_fit.py diff --git a/cv/face/facenet/pytorch/utils/utils_metrics.py b/cv/face_recognition/facenet/pytorch/utils/utils_metrics.py similarity index 100% rename from cv/face/facenet/pytorch/utils/utils_metrics.py rename to cv/face_recognition/facenet/pytorch/utils/utils_metrics.py diff --git a/cv/face/facenet/tensorflow/LICENSE.md b/cv/face_recognition/facenet/tensorflow/LICENSE.md similarity index 100% rename from cv/face/facenet/tensorflow/LICENSE.md rename to cv/face_recognition/facenet/tensorflow/LICENSE.md diff --git a/cv/face/facenet/tensorflow/README.md b/cv/face_recognition/facenet/tensorflow/README.md similarity index 38% rename from cv/face/facenet/tensorflow/README.md rename to cv/face_recognition/facenet/tensorflow/README.md index e4f5cd5a58548d22a2680f9d8c0d1a5c9470d2dd..547d4e76d582d25446174439b89b271e6d12ed51 100644 --- a/cv/face/facenet/tensorflow/README.md +++ b/cv/face_recognition/facenet/tensorflow/README.md @@ -1,4 +1,4 @@ -## Facenet +# Facenet ## Model description @@ -14,8 +14,11 @@ pip3 install numpy==1.23.5 ## Step 2: Preparing datasets -The [CASIA-WebFace](http://www.cbsr.ia.ac.cn/english/CASIA-WebFace-Database.html) dataset has been used for training. This training set consists of total of 453 453 images over 10 575 identities after face detection. Some performance improvement has been seen if the dataset has been filtered before training. Some more information about how this was done will come later. -The best performing model has been trained on the [VGGFace2](https://www.robots.ox.ac.uk/~vgg/data/vgg_face2/) dataset consisting of ~3.3M faces and ~9000 classes. +The [CASIA-WebFace](http://www.cbsr.ia.ac.cn/english/CASIA-WebFace-Database.html) dataset has been used for training. +This training set consists of total of 453 453 images over 10 575 identities after face detection. Some performance +improvement has been seen if the dataset has been filtered before training. Some more information about how this was +done will come later. The best performing model has been trained on the +[VGGFace2](https://www.robots.ox.ac.uk/~vgg/data/vgg_face2/) dataset consisting of ~3.3M faces and ~9000 classes. ## download @@ -38,13 +41,21 @@ lfw lfw_160 lfw.tgz ### Face alignment using MTCNN -One problem with the above approach seems to be that the Dlib face detector misses some of the hard examples (partial occlusion, silhouettes, etc). This makes the training set too "easy" which causes the model to perform worse on other benchmarks. -To solve this, other face landmark detectors has been tested. One face landmark detector that has proven to work very well in this setting is the -[Multi-task CNN](https://kpzhang93.github.io/MTCNN_face_detection_alignment/index.html). A Matlab/Caffe implementation can be found [here](https://github.com/kpzhang93/MTCNN_face_detection_alignment) and this has been used for face alignment with very good results. A Python/Tensorflow implementation of MTCNN can be found [here](https://github.com/davidsandberg/facenet/tree/master/src/align). This implementation does not give identical results to the Matlab/Caffe implementation but the performance is very similar. +One problem with the above approach seems to be that the Dlib face detector misses some of the hard examples (partial +occlusion, silhouettes, etc). This makes the training set too "easy" which causes the model to perform worse on other +benchmarks. To solve this, other face landmark detectors has been tested. One face landmark detector that has proven to +work very well in this setting is the [Multi-task +CNN](https://kpzhang93.github.io/MTCNN_face_detection_alignment/index.html). A Matlab/Caffe implementation can be found +[here](https://github.com/kpzhang93/MTCNN_face_detection_alignment) and this has been used for face alignment with very +good results. A Python/Tensorflow implementation of MTCNN can be found +[here](https://github.com/davidsandberg/facenet/tree/master/src/align). This implementation does not give identical +results to the Matlab/Caffe implementation but the performance is very similar. ## Step 3: Training -Currently, the best results are achieved by training the model using softmax loss. Details on how to train a model using softmax loss on the CASIA-WebFace dataset can be found on the page [Classifier training of Inception-ResNet-v1](https://github.com/davidsandberg/facenet/wiki/Classifier-training-of-inception-resnet-v1) and . +Currently, the best results are achieved by training the model using softmax loss. Details on how to train a model using +softmax loss on the CASIA-WebFace dataset can be found on the page [Classifier training of +Inception-ResNet-v1](https://github.com/davidsandberg/facenet/wiki/Classifier-training-of-inception-resnet-v1) and . ### One Card @@ -61,11 +72,10 @@ bash train_facenet_ddp.sh ## Results - -| model | FPS | LFW_Accuracy | -| --------- | -------- | ------------------ | -| facenet | 216.96 | 0.98900+-0.00642 | +| Model | FPS | LFW_Accuracy | +|---------|--------|------------------| +| Facenet | 216.96 | 0.98900+-0.00642 | ## Reference -https://github.com/davidsandberg/facenet +- [facenet](https://github.com/davidsandberg/facenet) diff --git a/cv/face/facenet/tensorflow/__init__.py b/cv/face_recognition/facenet/tensorflow/__init__.py similarity index 100% rename from cv/face/facenet/tensorflow/__init__.py rename to cv/face_recognition/facenet/tensorflow/__init__.py diff --git a/cv/face/facenet/tensorflow/contributed/__init__.py b/cv/face_recognition/facenet/tensorflow/contributed/__init__.py similarity index 100% rename from cv/face/facenet/tensorflow/contributed/__init__.py rename to cv/face_recognition/facenet/tensorflow/contributed/__init__.py diff --git a/cv/face/facenet/tensorflow/contributed/batch_represent.py b/cv/face_recognition/facenet/tensorflow/contributed/batch_represent.py similarity index 100% rename from cv/face/facenet/tensorflow/contributed/batch_represent.py rename to cv/face_recognition/facenet/tensorflow/contributed/batch_represent.py diff --git a/cv/face/facenet/tensorflow/contributed/cluster.py b/cv/face_recognition/facenet/tensorflow/contributed/cluster.py similarity index 100% rename from cv/face/facenet/tensorflow/contributed/cluster.py rename to cv/face_recognition/facenet/tensorflow/contributed/cluster.py diff --git a/cv/face/facenet/tensorflow/contributed/clustering.py b/cv/face_recognition/facenet/tensorflow/contributed/clustering.py similarity index 100% rename from cv/face/facenet/tensorflow/contributed/clustering.py rename to cv/face_recognition/facenet/tensorflow/contributed/clustering.py diff --git a/cv/face/facenet/tensorflow/contributed/export_embeddings.py b/cv/face_recognition/facenet/tensorflow/contributed/export_embeddings.py similarity index 100% rename from cv/face/facenet/tensorflow/contributed/export_embeddings.py rename to cv/face_recognition/facenet/tensorflow/contributed/export_embeddings.py diff --git a/cv/face/facenet/tensorflow/contributed/face.py b/cv/face_recognition/facenet/tensorflow/contributed/face.py similarity index 100% rename from cv/face/facenet/tensorflow/contributed/face.py rename to cv/face_recognition/facenet/tensorflow/contributed/face.py diff --git a/cv/face/facenet/tensorflow/contributed/predict.py b/cv/face_recognition/facenet/tensorflow/contributed/predict.py similarity index 100% rename from cv/face/facenet/tensorflow/contributed/predict.py rename to cv/face_recognition/facenet/tensorflow/contributed/predict.py diff --git a/cv/face/facenet/tensorflow/contributed/real_time_face_recognition.py b/cv/face_recognition/facenet/tensorflow/contributed/real_time_face_recognition.py similarity index 100% rename from cv/face/facenet/tensorflow/contributed/real_time_face_recognition.py rename to cv/face_recognition/facenet/tensorflow/contributed/real_time_face_recognition.py diff --git a/cv/face/facenet/tensorflow/data/images/Anthony_Hopkins_0001.jpg b/cv/face_recognition/facenet/tensorflow/data/images/Anthony_Hopkins_0001.jpg similarity index 100% rename from cv/face/facenet/tensorflow/data/images/Anthony_Hopkins_0001.jpg rename to cv/face_recognition/facenet/tensorflow/data/images/Anthony_Hopkins_0001.jpg diff --git a/cv/face/facenet/tensorflow/data/images/Anthony_Hopkins_0002.jpg b/cv/face_recognition/facenet/tensorflow/data/images/Anthony_Hopkins_0002.jpg similarity index 100% rename from cv/face/facenet/tensorflow/data/images/Anthony_Hopkins_0002.jpg rename to cv/face_recognition/facenet/tensorflow/data/images/Anthony_Hopkins_0002.jpg diff --git a/cv/face/facenet/tensorflow/data/learning_rate_retrain_tripletloss.txt b/cv/face_recognition/facenet/tensorflow/data/learning_rate_retrain_tripletloss.txt similarity index 100% rename from cv/face/facenet/tensorflow/data/learning_rate_retrain_tripletloss.txt rename to cv/face_recognition/facenet/tensorflow/data/learning_rate_retrain_tripletloss.txt diff --git a/cv/face/facenet/tensorflow/data/learning_rate_schedule_classifier_casia.txt b/cv/face_recognition/facenet/tensorflow/data/learning_rate_schedule_classifier_casia.txt similarity index 100% rename from cv/face/facenet/tensorflow/data/learning_rate_schedule_classifier_casia.txt rename to cv/face_recognition/facenet/tensorflow/data/learning_rate_schedule_classifier_casia.txt diff --git a/cv/face/facenet/tensorflow/data/learning_rate_schedule_classifier_casia_ddp.txt b/cv/face_recognition/facenet/tensorflow/data/learning_rate_schedule_classifier_casia_ddp.txt similarity index 100% rename from cv/face/facenet/tensorflow/data/learning_rate_schedule_classifier_casia_ddp.txt rename to cv/face_recognition/facenet/tensorflow/data/learning_rate_schedule_classifier_casia_ddp.txt diff --git a/cv/face/facenet/tensorflow/data/learning_rate_schedule_classifier_msceleb.txt b/cv/face_recognition/facenet/tensorflow/data/learning_rate_schedule_classifier_msceleb.txt similarity index 100% rename from cv/face/facenet/tensorflow/data/learning_rate_schedule_classifier_msceleb.txt rename to cv/face_recognition/facenet/tensorflow/data/learning_rate_schedule_classifier_msceleb.txt diff --git a/cv/face/facenet/tensorflow/data/learning_rate_schedule_classifier_vggface2.txt b/cv/face_recognition/facenet/tensorflow/data/learning_rate_schedule_classifier_vggface2.txt similarity index 100% rename from cv/face/facenet/tensorflow/data/learning_rate_schedule_classifier_vggface2.txt rename to cv/face_recognition/facenet/tensorflow/data/learning_rate_schedule_classifier_vggface2.txt diff --git a/cv/face/facenet/tensorflow/data/pairs.txt b/cv/face_recognition/facenet/tensorflow/data/pairs.txt similarity index 100% rename from cv/face/facenet/tensorflow/data/pairs.txt rename to cv/face_recognition/facenet/tensorflow/data/pairs.txt diff --git a/cv/face/facenet/tensorflow/facenet_report.sh b/cv/face_recognition/facenet/tensorflow/facenet_report.sh similarity index 100% rename from cv/face/facenet/tensorflow/facenet_report.sh rename to cv/face_recognition/facenet/tensorflow/facenet_report.sh diff --git a/cv/face/facenet/tensorflow/init.sh b/cv/face_recognition/facenet/tensorflow/init.sh similarity index 100% rename from cv/face/facenet/tensorflow/init.sh rename to cv/face_recognition/facenet/tensorflow/init.sh diff --git a/cv/face/facenet/tensorflow/requirements.txt b/cv/face_recognition/facenet/tensorflow/requirements.txt similarity index 100% rename from cv/face/facenet/tensorflow/requirements.txt rename to cv/face_recognition/facenet/tensorflow/requirements.txt diff --git a/cv/face/facenet/tensorflow/src/__init__.py b/cv/face_recognition/facenet/tensorflow/src/__init__.py similarity index 100% rename from cv/face/facenet/tensorflow/src/__init__.py rename to cv/face_recognition/facenet/tensorflow/src/__init__.py diff --git a/cv/face/facenet/tensorflow/src/align/__init__.py b/cv/face_recognition/facenet/tensorflow/src/align/__init__.py similarity index 100% rename from cv/face/facenet/tensorflow/src/align/__init__.py rename to cv/face_recognition/facenet/tensorflow/src/align/__init__.py diff --git a/cv/face/facenet/tensorflow/src/align/align_dataset_mtcnn.py b/cv/face_recognition/facenet/tensorflow/src/align/align_dataset_mtcnn.py similarity index 100% rename from cv/face/facenet/tensorflow/src/align/align_dataset_mtcnn.py rename to cv/face_recognition/facenet/tensorflow/src/align/align_dataset_mtcnn.py diff --git a/cv/face/facenet/tensorflow/src/align/det1.npy b/cv/face_recognition/facenet/tensorflow/src/align/det1.npy similarity index 100% rename from cv/face/facenet/tensorflow/src/align/det1.npy rename to cv/face_recognition/facenet/tensorflow/src/align/det1.npy diff --git a/cv/face/facenet/tensorflow/src/align/det2.npy b/cv/face_recognition/facenet/tensorflow/src/align/det2.npy similarity index 100% rename from cv/face/facenet/tensorflow/src/align/det2.npy rename to cv/face_recognition/facenet/tensorflow/src/align/det2.npy diff --git a/cv/face/facenet/tensorflow/src/align/det3.npy b/cv/face_recognition/facenet/tensorflow/src/align/det3.npy similarity index 100% rename from cv/face/facenet/tensorflow/src/align/det3.npy rename to cv/face_recognition/facenet/tensorflow/src/align/det3.npy diff --git a/cv/face/facenet/tensorflow/src/align/detect_face.py b/cv/face_recognition/facenet/tensorflow/src/align/detect_face.py similarity index 100% rename from cv/face/facenet/tensorflow/src/align/detect_face.py rename to cv/face_recognition/facenet/tensorflow/src/align/detect_face.py diff --git a/cv/face/facenet/tensorflow/src/align/run.sh b/cv/face_recognition/facenet/tensorflow/src/align/run.sh similarity index 100% rename from cv/face/facenet/tensorflow/src/align/run.sh rename to cv/face_recognition/facenet/tensorflow/src/align/run.sh diff --git a/cv/face/facenet/tensorflow/src/align/run_lfw.sh b/cv/face_recognition/facenet/tensorflow/src/align/run_lfw.sh similarity index 100% rename from cv/face/facenet/tensorflow/src/align/run_lfw.sh rename to cv/face_recognition/facenet/tensorflow/src/align/run_lfw.sh diff --git a/cv/face/facenet/tensorflow/src/calculate_filtering_metrics.py b/cv/face_recognition/facenet/tensorflow/src/calculate_filtering_metrics.py similarity index 100% rename from cv/face/facenet/tensorflow/src/calculate_filtering_metrics.py rename to cv/face_recognition/facenet/tensorflow/src/calculate_filtering_metrics.py diff --git a/cv/face/facenet/tensorflow/src/classifier.py b/cv/face_recognition/facenet/tensorflow/src/classifier.py similarity index 100% rename from cv/face/facenet/tensorflow/src/classifier.py rename to cv/face_recognition/facenet/tensorflow/src/classifier.py diff --git a/cv/face/facenet/tensorflow/src/compare.py b/cv/face_recognition/facenet/tensorflow/src/compare.py similarity index 100% rename from cv/face/facenet/tensorflow/src/compare.py rename to cv/face_recognition/facenet/tensorflow/src/compare.py diff --git a/cv/face/facenet/tensorflow/src/decode_msceleb_dataset.py b/cv/face_recognition/facenet/tensorflow/src/decode_msceleb_dataset.py similarity index 100% rename from cv/face/facenet/tensorflow/src/decode_msceleb_dataset.py rename to cv/face_recognition/facenet/tensorflow/src/decode_msceleb_dataset.py diff --git a/cv/face/facenet/tensorflow/src/download_and_extract.py b/cv/face_recognition/facenet/tensorflow/src/download_and_extract.py similarity index 100% rename from cv/face/facenet/tensorflow/src/download_and_extract.py rename to cv/face_recognition/facenet/tensorflow/src/download_and_extract.py diff --git a/cv/face/facenet/tensorflow/src/facenet.py b/cv/face_recognition/facenet/tensorflow/src/facenet.py similarity index 100% rename from cv/face/facenet/tensorflow/src/facenet.py rename to cv/face_recognition/facenet/tensorflow/src/facenet.py diff --git a/cv/face/facenet/tensorflow/src/freeze_graph.py b/cv/face_recognition/facenet/tensorflow/src/freeze_graph.py similarity index 100% rename from cv/face/facenet/tensorflow/src/freeze_graph.py rename to cv/face_recognition/facenet/tensorflow/src/freeze_graph.py diff --git a/cv/face/facenet/tensorflow/src/generative/__init__.py b/cv/face_recognition/facenet/tensorflow/src/generative/__init__.py similarity index 100% rename from cv/face/facenet/tensorflow/src/generative/__init__.py rename to cv/face_recognition/facenet/tensorflow/src/generative/__init__.py diff --git a/cv/face/facenet/tensorflow/src/generative/calculate_attribute_vectors.py b/cv/face_recognition/facenet/tensorflow/src/generative/calculate_attribute_vectors.py similarity index 100% rename from cv/face/facenet/tensorflow/src/generative/calculate_attribute_vectors.py rename to cv/face_recognition/facenet/tensorflow/src/generative/calculate_attribute_vectors.py diff --git a/cv/face/facenet/tensorflow/src/generative/models/__init__.py b/cv/face_recognition/facenet/tensorflow/src/generative/models/__init__.py similarity index 100% rename from cv/face/facenet/tensorflow/src/generative/models/__init__.py rename to cv/face_recognition/facenet/tensorflow/src/generative/models/__init__.py diff --git a/cv/face/facenet/tensorflow/src/generative/models/dfc_vae.py b/cv/face_recognition/facenet/tensorflow/src/generative/models/dfc_vae.py similarity index 100% rename from cv/face/facenet/tensorflow/src/generative/models/dfc_vae.py rename to cv/face_recognition/facenet/tensorflow/src/generative/models/dfc_vae.py diff --git a/cv/face/facenet/tensorflow/src/generative/models/dfc_vae_large.py b/cv/face_recognition/facenet/tensorflow/src/generative/models/dfc_vae_large.py similarity index 100% rename from cv/face/facenet/tensorflow/src/generative/models/dfc_vae_large.py rename to cv/face_recognition/facenet/tensorflow/src/generative/models/dfc_vae_large.py diff --git a/cv/face/facenet/tensorflow/src/generative/models/dfc_vae_resnet.py b/cv/face_recognition/facenet/tensorflow/src/generative/models/dfc_vae_resnet.py similarity index 100% rename from cv/face/facenet/tensorflow/src/generative/models/dfc_vae_resnet.py rename to cv/face_recognition/facenet/tensorflow/src/generative/models/dfc_vae_resnet.py diff --git a/cv/face/facenet/tensorflow/src/generative/models/vae_base.py b/cv/face_recognition/facenet/tensorflow/src/generative/models/vae_base.py similarity index 100% rename from cv/face/facenet/tensorflow/src/generative/models/vae_base.py rename to cv/face_recognition/facenet/tensorflow/src/generative/models/vae_base.py diff --git a/cv/face/facenet/tensorflow/src/generative/modify_attribute.py b/cv/face_recognition/facenet/tensorflow/src/generative/modify_attribute.py similarity index 100% rename from cv/face/facenet/tensorflow/src/generative/modify_attribute.py rename to cv/face_recognition/facenet/tensorflow/src/generative/modify_attribute.py diff --git a/cv/face/facenet/tensorflow/src/generative/train_vae.py b/cv/face_recognition/facenet/tensorflow/src/generative/train_vae.py similarity index 100% rename from cv/face/facenet/tensorflow/src/generative/train_vae.py rename to cv/face_recognition/facenet/tensorflow/src/generative/train_vae.py diff --git a/cv/face/facenet/tensorflow/src/lfw.py b/cv/face_recognition/facenet/tensorflow/src/lfw.py similarity index 100% rename from cv/face/facenet/tensorflow/src/lfw.py rename to cv/face_recognition/facenet/tensorflow/src/lfw.py diff --git a/cv/face/facenet/tensorflow/src/models/__init__.py b/cv/face_recognition/facenet/tensorflow/src/models/__init__.py similarity index 100% rename from cv/face/facenet/tensorflow/src/models/__init__.py rename to cv/face_recognition/facenet/tensorflow/src/models/__init__.py diff --git a/cv/face/facenet/tensorflow/src/models/dummy.py b/cv/face_recognition/facenet/tensorflow/src/models/dummy.py similarity index 100% rename from cv/face/facenet/tensorflow/src/models/dummy.py rename to cv/face_recognition/facenet/tensorflow/src/models/dummy.py diff --git a/cv/face/facenet/tensorflow/src/models/inception_resnet_v1.py b/cv/face_recognition/facenet/tensorflow/src/models/inception_resnet_v1.py similarity index 100% rename from cv/face/facenet/tensorflow/src/models/inception_resnet_v1.py rename to cv/face_recognition/facenet/tensorflow/src/models/inception_resnet_v1.py diff --git a/cv/face/facenet/tensorflow/src/models/inception_resnet_v2.py b/cv/face_recognition/facenet/tensorflow/src/models/inception_resnet_v2.py similarity index 100% rename from cv/face/facenet/tensorflow/src/models/inception_resnet_v2.py rename to cv/face_recognition/facenet/tensorflow/src/models/inception_resnet_v2.py diff --git a/cv/face/facenet/tensorflow/src/models/squeezenet.py b/cv/face_recognition/facenet/tensorflow/src/models/squeezenet.py similarity index 100% rename from cv/face/facenet/tensorflow/src/models/squeezenet.py rename to cv/face_recognition/facenet/tensorflow/src/models/squeezenet.py diff --git a/cv/face/facenet/tensorflow/src/models/wget-log b/cv/face_recognition/facenet/tensorflow/src/models/wget-log similarity index 100% rename from cv/face/facenet/tensorflow/src/models/wget-log rename to cv/face_recognition/facenet/tensorflow/src/models/wget-log diff --git a/cv/face/facenet/tensorflow/src/train_softmax.py b/cv/face_recognition/facenet/tensorflow/src/train_softmax.py similarity index 100% rename from cv/face/facenet/tensorflow/src/train_softmax.py rename to cv/face_recognition/facenet/tensorflow/src/train_softmax.py diff --git a/cv/face/facenet/tensorflow/src/train_softmax_ddp.py b/cv/face_recognition/facenet/tensorflow/src/train_softmax_ddp.py similarity index 100% rename from cv/face/facenet/tensorflow/src/train_softmax_ddp.py rename to cv/face_recognition/facenet/tensorflow/src/train_softmax_ddp.py diff --git a/cv/face/facenet/tensorflow/src/train_tripletloss.py b/cv/face_recognition/facenet/tensorflow/src/train_tripletloss.py similarity index 100% rename from cv/face/facenet/tensorflow/src/train_tripletloss.py rename to cv/face_recognition/facenet/tensorflow/src/train_tripletloss.py diff --git a/cv/face/facenet/tensorflow/src/validate_on_lfw.py b/cv/face_recognition/facenet/tensorflow/src/validate_on_lfw.py similarity index 100% rename from cv/face/facenet/tensorflow/src/validate_on_lfw.py rename to cv/face_recognition/facenet/tensorflow/src/validate_on_lfw.py diff --git a/cv/face/facenet/tensorflow/test/batch_norm_test.py b/cv/face_recognition/facenet/tensorflow/test/batch_norm_test.py similarity index 100% rename from cv/face/facenet/tensorflow/test/batch_norm_test.py rename to cv/face_recognition/facenet/tensorflow/test/batch_norm_test.py diff --git a/cv/face/facenet/tensorflow/test/center_loss_test.py b/cv/face_recognition/facenet/tensorflow/test/center_loss_test.py similarity index 100% rename from cv/face/facenet/tensorflow/test/center_loss_test.py rename to cv/face_recognition/facenet/tensorflow/test/center_loss_test.py diff --git a/cv/face/facenet/tensorflow/test/restore_test.py b/cv/face_recognition/facenet/tensorflow/test/restore_test.py similarity index 100% rename from cv/face/facenet/tensorflow/test/restore_test.py rename to cv/face_recognition/facenet/tensorflow/test/restore_test.py diff --git a/cv/face/facenet/tensorflow/test/train_test.py b/cv/face_recognition/facenet/tensorflow/test/train_test.py similarity index 100% rename from cv/face/facenet/tensorflow/test/train_test.py rename to cv/face_recognition/facenet/tensorflow/test/train_test.py diff --git a/cv/face/facenet/tensorflow/test/triplet_loss_test.py b/cv/face_recognition/facenet/tensorflow/test/triplet_loss_test.py similarity index 100% rename from cv/face/facenet/tensorflow/test/triplet_loss_test.py rename to cv/face_recognition/facenet/tensorflow/test/triplet_loss_test.py diff --git a/cv/face/facenet/tensorflow/tmp/__init__.py b/cv/face_recognition/facenet/tensorflow/tmp/__init__.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/__init__.py rename to cv/face_recognition/facenet/tensorflow/tmp/__init__.py diff --git a/cv/face/facenet/tensorflow/tmp/align_dataset.m b/cv/face_recognition/facenet/tensorflow/tmp/align_dataset.m similarity index 100% rename from cv/face/facenet/tensorflow/tmp/align_dataset.m rename to cv/face_recognition/facenet/tensorflow/tmp/align_dataset.m diff --git a/cv/face/facenet/tensorflow/tmp/align_dataset.py b/cv/face_recognition/facenet/tensorflow/tmp/align_dataset.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/align_dataset.py rename to cv/face_recognition/facenet/tensorflow/tmp/align_dataset.py diff --git a/cv/face/facenet/tensorflow/tmp/align_dlib.py b/cv/face_recognition/facenet/tensorflow/tmp/align_dlib.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/align_dlib.py rename to cv/face_recognition/facenet/tensorflow/tmp/align_dlib.py diff --git a/cv/face/facenet/tensorflow/tmp/cacd2000_split_identities.py b/cv/face_recognition/facenet/tensorflow/tmp/cacd2000_split_identities.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/cacd2000_split_identities.py rename to cv/face_recognition/facenet/tensorflow/tmp/cacd2000_split_identities.py diff --git a/cv/face/facenet/tensorflow/tmp/dataset_read_speed.py b/cv/face_recognition/facenet/tensorflow/tmp/dataset_read_speed.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/dataset_read_speed.py rename to cv/face_recognition/facenet/tensorflow/tmp/dataset_read_speed.py diff --git a/cv/face/facenet/tensorflow/tmp/deepdream.py b/cv/face_recognition/facenet/tensorflow/tmp/deepdream.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/deepdream.py rename to cv/face_recognition/facenet/tensorflow/tmp/deepdream.py diff --git a/cv/face/facenet/tensorflow/tmp/detect_face_v1.m b/cv/face_recognition/facenet/tensorflow/tmp/detect_face_v1.m similarity index 100% rename from cv/face/facenet/tensorflow/tmp/detect_face_v1.m rename to cv/face_recognition/facenet/tensorflow/tmp/detect_face_v1.m diff --git a/cv/face/facenet/tensorflow/tmp/detect_face_v2.m b/cv/face_recognition/facenet/tensorflow/tmp/detect_face_v2.m similarity index 100% rename from cv/face/facenet/tensorflow/tmp/detect_face_v2.m rename to cv/face_recognition/facenet/tensorflow/tmp/detect_face_v2.m diff --git a/cv/face/facenet/tensorflow/tmp/download_vgg_face_dataset.py b/cv/face_recognition/facenet/tensorflow/tmp/download_vgg_face_dataset.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/download_vgg_face_dataset.py rename to cv/face_recognition/facenet/tensorflow/tmp/download_vgg_face_dataset.py diff --git a/cv/face/facenet/tensorflow/tmp/funnel_dataset.py b/cv/face_recognition/facenet/tensorflow/tmp/funnel_dataset.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/funnel_dataset.py rename to cv/face_recognition/facenet/tensorflow/tmp/funnel_dataset.py diff --git a/cv/face/facenet/tensorflow/tmp/invariance_test.txt b/cv/face_recognition/facenet/tensorflow/tmp/invariance_test.txt similarity index 100% rename from cv/face/facenet/tensorflow/tmp/invariance_test.txt rename to cv/face_recognition/facenet/tensorflow/tmp/invariance_test.txt diff --git a/cv/face/facenet/tensorflow/tmp/mnist_center_loss.py b/cv/face_recognition/facenet/tensorflow/tmp/mnist_center_loss.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/mnist_center_loss.py rename to cv/face_recognition/facenet/tensorflow/tmp/mnist_center_loss.py diff --git a/cv/face/facenet/tensorflow/tmp/mnist_noise_labels.py b/cv/face_recognition/facenet/tensorflow/tmp/mnist_noise_labels.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/mnist_noise_labels.py rename to cv/face_recognition/facenet/tensorflow/tmp/mnist_noise_labels.py diff --git a/cv/face/facenet/tensorflow/tmp/mtcnn.py b/cv/face_recognition/facenet/tensorflow/tmp/mtcnn.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/mtcnn.py rename to cv/face_recognition/facenet/tensorflow/tmp/mtcnn.py diff --git a/cv/face/facenet/tensorflow/tmp/mtcnn_test.py b/cv/face_recognition/facenet/tensorflow/tmp/mtcnn_test.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/mtcnn_test.py rename to cv/face_recognition/facenet/tensorflow/tmp/mtcnn_test.py diff --git a/cv/face/facenet/tensorflow/tmp/mtcnn_test_pnet_dbg.py b/cv/face_recognition/facenet/tensorflow/tmp/mtcnn_test_pnet_dbg.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/mtcnn_test_pnet_dbg.py rename to cv/face_recognition/facenet/tensorflow/tmp/mtcnn_test_pnet_dbg.py diff --git a/cv/face/facenet/tensorflow/tmp/network.py b/cv/face_recognition/facenet/tensorflow/tmp/network.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/network.py rename to cv/face_recognition/facenet/tensorflow/tmp/network.py diff --git a/cv/face/facenet/tensorflow/tmp/nn2.py b/cv/face_recognition/facenet/tensorflow/tmp/nn2.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/nn2.py rename to cv/face_recognition/facenet/tensorflow/tmp/nn2.py diff --git a/cv/face/facenet/tensorflow/tmp/nn3.py b/cv/face_recognition/facenet/tensorflow/tmp/nn3.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/nn3.py rename to cv/face_recognition/facenet/tensorflow/tmp/nn3.py diff --git a/cv/face/facenet/tensorflow/tmp/nn4.py b/cv/face_recognition/facenet/tensorflow/tmp/nn4.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/nn4.py rename to cv/face_recognition/facenet/tensorflow/tmp/nn4.py diff --git a/cv/face/facenet/tensorflow/tmp/nn4_small2_v1.py b/cv/face_recognition/facenet/tensorflow/tmp/nn4_small2_v1.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/nn4_small2_v1.py rename to cv/face_recognition/facenet/tensorflow/tmp/nn4_small2_v1.py diff --git a/cv/face/facenet/tensorflow/tmp/pilatus800.jpg b/cv/face_recognition/facenet/tensorflow/tmp/pilatus800.jpg similarity index 100% rename from cv/face/facenet/tensorflow/tmp/pilatus800.jpg rename to cv/face_recognition/facenet/tensorflow/tmp/pilatus800.jpg diff --git a/cv/face/facenet/tensorflow/tmp/random_test.py b/cv/face_recognition/facenet/tensorflow/tmp/random_test.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/random_test.py rename to cv/face_recognition/facenet/tensorflow/tmp/random_test.py diff --git a/cv/face/facenet/tensorflow/tmp/rename_casia_directories.py b/cv/face_recognition/facenet/tensorflow/tmp/rename_casia_directories.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/rename_casia_directories.py rename to cv/face_recognition/facenet/tensorflow/tmp/rename_casia_directories.py diff --git a/cv/face/facenet/tensorflow/tmp/seed_test.py b/cv/face_recognition/facenet/tensorflow/tmp/seed_test.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/seed_test.py rename to cv/face_recognition/facenet/tensorflow/tmp/seed_test.py diff --git a/cv/face/facenet/tensorflow/tmp/select_triplets_test.py b/cv/face_recognition/facenet/tensorflow/tmp/select_triplets_test.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/select_triplets_test.py rename to cv/face_recognition/facenet/tensorflow/tmp/select_triplets_test.py diff --git a/cv/face/facenet/tensorflow/tmp/test1.py b/cv/face_recognition/facenet/tensorflow/tmp/test1.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/test1.py rename to cv/face_recognition/facenet/tensorflow/tmp/test1.py diff --git a/cv/face/facenet/tensorflow/tmp/test_align.py b/cv/face_recognition/facenet/tensorflow/tmp/test_align.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/test_align.py rename to cv/face_recognition/facenet/tensorflow/tmp/test_align.py diff --git a/cv/face/facenet/tensorflow/tmp/test_invariance_on_lfw.py b/cv/face_recognition/facenet/tensorflow/tmp/test_invariance_on_lfw.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/test_invariance_on_lfw.py rename to cv/face_recognition/facenet/tensorflow/tmp/test_invariance_on_lfw.py diff --git a/cv/face/facenet/tensorflow/tmp/vggface16.py b/cv/face_recognition/facenet/tensorflow/tmp/vggface16.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/vggface16.py rename to cv/face_recognition/facenet/tensorflow/tmp/vggface16.py diff --git a/cv/face/facenet/tensorflow/tmp/vggverydeep19.py b/cv/face_recognition/facenet/tensorflow/tmp/vggverydeep19.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/vggverydeep19.py rename to cv/face_recognition/facenet/tensorflow/tmp/vggverydeep19.py diff --git a/cv/face/facenet/tensorflow/tmp/visualize.py b/cv/face_recognition/facenet/tensorflow/tmp/visualize.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/visualize.py rename to cv/face_recognition/facenet/tensorflow/tmp/visualize.py diff --git a/cv/face/facenet/tensorflow/tmp/visualize_vgg_model.py b/cv/face_recognition/facenet/tensorflow/tmp/visualize_vgg_model.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/visualize_vgg_model.py rename to cv/face_recognition/facenet/tensorflow/tmp/visualize_vgg_model.py diff --git a/cv/face/facenet/tensorflow/tmp/visualize_vggface.py b/cv/face_recognition/facenet/tensorflow/tmp/visualize_vggface.py similarity index 100% rename from cv/face/facenet/tensorflow/tmp/visualize_vggface.py rename to cv/face_recognition/facenet/tensorflow/tmp/visualize_vggface.py diff --git a/cv/face/facenet/tensorflow/train8p.sh b/cv/face_recognition/facenet/tensorflow/train8p.sh similarity index 100% rename from cv/face/facenet/tensorflow/train8p.sh rename to cv/face_recognition/facenet/tensorflow/train8p.sh diff --git a/cv/face/facenet/tensorflow/train_facenet.sh b/cv/face_recognition/facenet/tensorflow/train_facenet.sh similarity index 100% rename from cv/face/facenet/tensorflow/train_facenet.sh rename to cv/face_recognition/facenet/tensorflow/train_facenet.sh diff --git a/cv/face/facenet/tensorflow/train_facenet_ddp.sh b/cv/face_recognition/facenet/tensorflow/train_facenet_ddp.sh similarity index 100% rename from cv/face/facenet/tensorflow/train_facenet_ddp.sh rename to cv/face_recognition/facenet/tensorflow/train_facenet_ddp.sh diff --git a/cv/face/facenet/tensorflow/util/plot_learning_curves.m b/cv/face_recognition/facenet/tensorflow/util/plot_learning_curves.m similarity index 100% rename from cv/face/facenet/tensorflow/util/plot_learning_curves.m rename to cv/face_recognition/facenet/tensorflow/util/plot_learning_curves.m