Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10192162 * license supplement for face_detection andd face_recognitionmaster
| @@ -1,5 +1,4 @@ | |||||
| """ | """ | ||||
| mmdet_patch is based on | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet, | |||||
| all duplicate functions from official mmdetection are removed. | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet | |||||
| """ | """ | ||||
| @@ -1,3 +1,7 @@ | |||||
| """ | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/core/bbox | |||||
| """ | |||||
| from .transforms import bbox2result, distance2kps, kps2distance | from .transforms import bbox2result, distance2kps, kps2distance | ||||
| __all__ = ['bbox2result', 'distance2kps', 'kps2distance'] | __all__ = ['bbox2result', 'distance2kps', 'kps2distance'] | ||||
| @@ -1,5 +1,6 @@ | |||||
| """ | """ | ||||
| based on https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/core/bbox/transforms.py | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/core/bbox/transforms.py | |||||
| """ | """ | ||||
| import numpy as np | import numpy as np | ||||
| import torch | import torch | ||||
| @@ -1,3 +1,7 @@ | |||||
| """ | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/core/post_processing/bbox_nms.py | |||||
| """ | |||||
| from .bbox_nms import multiclass_nms | from .bbox_nms import multiclass_nms | ||||
| __all__ = ['multiclass_nms'] | __all__ = ['multiclass_nms'] | ||||
| @@ -1,5 +1,6 @@ | |||||
| """ | """ | ||||
| based on https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/core/post_processing/bbox_nms.py | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/core/post_processing/bbox_nms.py | |||||
| """ | """ | ||||
| import torch | import torch | ||||
| @@ -1,3 +1,7 @@ | |||||
| """ | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/datasets | |||||
| """ | |||||
| from .retinaface import RetinaFaceDataset | from .retinaface import RetinaFaceDataset | ||||
| __all__ = ['RetinaFaceDataset'] | __all__ = ['RetinaFaceDataset'] | ||||
| @@ -1,3 +1,7 @@ | |||||
| """ | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/datasets/pipelines | |||||
| """ | |||||
| from .transforms import RandomSquareCrop | from .transforms import RandomSquareCrop | ||||
| __all__ = ['RandomSquareCrop'] | __all__ = ['RandomSquareCrop'] | ||||
| @@ -1,5 +1,6 @@ | |||||
| """ | """ | ||||
| based on https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/datasets/pipelines/transforms.py | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/datasets/pipelines/transforms.py | |||||
| """ | """ | ||||
| import numpy as np | import numpy as np | ||||
| from mmdet.datasets.builder import PIPELINES | from mmdet.datasets.builder import PIPELINES | ||||
| @@ -1,5 +1,6 @@ | |||||
| """ | """ | ||||
| based on https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/datasets/retinaface.py | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/datasets/retinaface.py | |||||
| """ | """ | ||||
| import numpy as np | import numpy as np | ||||
| from mmdet.datasets.builder import DATASETS | from mmdet.datasets.builder import DATASETS | ||||
| @@ -1,2 +1,6 @@ | |||||
| """ | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/models | |||||
| """ | |||||
| from .dense_heads import * # noqa: F401,F403 | from .dense_heads import * # noqa: F401,F403 | ||||
| from .detectors import * # noqa: F401,F403 | from .detectors import * # noqa: F401,F403 | ||||
| @@ -1,3 +1,7 @@ | |||||
| """ | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/models/backbones | |||||
| """ | |||||
| from .resnet import ResNetV1e | from .resnet import ResNetV1e | ||||
| __all__ = ['ResNetV1e'] | __all__ = ['ResNetV1e'] | ||||
| @@ -1,5 +1,6 @@ | |||||
| """ | """ | ||||
| based on https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/models/backbones/resnet.py | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/models/backbones/resnet.py | |||||
| """ | """ | ||||
| import torch.nn as nn | import torch.nn as nn | ||||
| import torch.utils.checkpoint as cp | import torch.utils.checkpoint as cp | ||||
| @@ -1,3 +1,7 @@ | |||||
| """ | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/models/dense_heads | |||||
| """ | |||||
| from .scrfd_head import SCRFDHead | from .scrfd_head import SCRFDHead | ||||
| __all__ = ['SCRFDHead'] | __all__ = ['SCRFDHead'] | ||||
| @@ -1,5 +1,6 @@ | |||||
| """ | """ | ||||
| based on https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/models/dense_heads/scrfd_head.py | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/models/dense_heads/scrfd_head.py | |||||
| """ | """ | ||||
| import numpy as np | import numpy as np | ||||
| import torch | import torch | ||||
| @@ -1,3 +1,7 @@ | |||||
| """ | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/models/detectors | |||||
| """ | |||||
| from .scrfd import SCRFD | from .scrfd import SCRFD | ||||
| __all__ = ['SCRFD'] | __all__ = ['SCRFD'] | ||||
| @@ -1,5 +1,6 @@ | |||||
| """ | """ | ||||
| based on https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/models/detectors/scrfd.py | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/tree/master/detection/scrfd/mmdet/models/detectors/scrfd.py | |||||
| """ | """ | ||||
| import torch | import torch | ||||
| from mmdet.models.builder import DETECTORS | from mmdet.models.builder import DETECTORS | ||||
| @@ -1,3 +1,7 @@ | |||||
| """ | |||||
| The implementation here is modified based on insightface, originally MIT license and publicly avaialbe at | |||||
| https://github.com/deepinsight/insightface/blob/master/python-package/insightface/utils/face_align.py | |||||
| """ | |||||
| import cv2 | import cv2 | ||||
| import numpy as np | import numpy as np | ||||
| from skimage import transform as trans | from skimage import transform as trans | ||||
| @@ -1,3 +1,5 @@ | |||||
| # The implementation is adopted from TFace,made pubicly available under the Apache-2.0 license at | |||||
| # https://github.com/Tencent/TFace/blob/master/recognition/torchkit/backbone | |||||
| from .model_irse import (IR_18, IR_34, IR_50, IR_101, IR_152, IR_200, IR_SE_50, | from .model_irse import (IR_18, IR_34, IR_50, IR_101, IR_152, IR_200, IR_SE_50, | ||||
| IR_SE_101, IR_SE_152, IR_SE_200) | IR_SE_101, IR_SE_152, IR_SE_200) | ||||
| from .model_resnet import ResNet_50, ResNet_101, ResNet_152 | from .model_resnet import ResNet_50, ResNet_101, ResNet_152 | ||||
| @@ -1,3 +1,5 @@ | |||||
| # The implementation is adopted from TFace,made pubicly available under the Apache-2.0 license at | |||||
| # https://github.com/Tencent/TFace/blob/master/recognition/torchkit/backbone/common.py | |||||
| import torch | import torch | ||||
| import torch.nn as nn | import torch.nn as nn | ||||
| from torch.nn import (BatchNorm1d, BatchNorm2d, Conv2d, Linear, Module, ReLU, | from torch.nn import (BatchNorm1d, BatchNorm2d, Conv2d, Linear, Module, ReLU, | ||||
| @@ -1,5 +1,5 @@ | |||||
| # based on: | |||||
| # https://github.com/ZhaoJ9014/face.evoLVe.PyTorch/blob/master/backbone/model_irse.py | |||||
| # The implementation is adopted from TFace,made pubicly available under the Apache-2.0 license at | |||||
| # https://github.com/Tencent/TFace/blob/master/recognition/torchkit/backbone/model_irse.py | |||||
| from collections import namedtuple | from collections import namedtuple | ||||
| from torch.nn import (BatchNorm1d, BatchNorm2d, Conv2d, Dropout, Linear, | from torch.nn import (BatchNorm1d, BatchNorm2d, Conv2d, Dropout, Linear, | ||||
| @@ -1,5 +1,5 @@ | |||||
| # based on: | |||||
| # https://github.com/ZhaoJ9014/face.evoLVe.PyTorch/blob/master/backbone/model_resnet.py | |||||
| # The implementation is adopted from TFace,made pubicly available under the Apache-2.0 license at | |||||
| # https://github.com/Tencent/TFace/blob/master/recognition/torchkit/backbone/model_resnet.py | |||||
| import torch.nn as nn | import torch.nn as nn | ||||
| from torch.nn import (BatchNorm1d, BatchNorm2d, Conv2d, Dropout, Linear, | from torch.nn import (BatchNorm1d, BatchNorm2d, Conv2d, Dropout, Linear, | ||||
| MaxPool2d, Module, ReLU, Sequential) | MaxPool2d, Module, ReLU, Sequential) | ||||
| @@ -1,3 +1,4 @@ | |||||
| # Copyright (c) Alibaba, Inc. and its affiliates. | |||||
| import os.path as osp | import os.path as osp | ||||
| from typing import Any, Dict | from typing import Any, Dict | ||||
| @@ -1,3 +1,4 @@ | |||||
| # Copyright (c) Alibaba, Inc. and its affiliates. | |||||
| import os.path as osp | import os.path as osp | ||||
| from typing import Any, Dict | from typing import Any, Dict | ||||