{"Code":200,"Data":{"AigcAttributes":"{}","AigcIsTop":0,"AigcType":"","AlreadyStar":false,"ApplyMeta":"{}","ApprovalMode":1,"ApprovalNotifyEmail":"","Architectures":null,"Avatar":"https://img.alicdn.com/imgextra/i1/O1CN01yhHrHg1Pdl3UKPhGc_!!6000000001864-2-tps-88-88.png","Backbone":["Resnet"],"BackendSupport":{"architectures":null,"backend_info":{"deploy_task":null,"lmdeploy":null,"lmdeploy_turbomind":null,"ollama":null,"sglang":null,"vllm":null},"model_id":""},"BaseModel":[],"BaseModelRelation":"","CardReady":1,"CardUnreadyReason":"","CertificationCreateBy":"","CertificationCreatedTime":-62135596800,"ChineseName":"RetinaFace人脸检测关键点模型","CoverImages":[],"CreatedBy":"ly261666","CreatedTime":1661773133,"DashSdkParameter":"","Datasets":{"evaluation":["shaoxuan/WIDER_FACE"],"train":["shaoxuan/WIDER_FACE"]},"DemoAvailable":1,"DemoUnavailableReason":"","Description":"给定一张图片，返回图片中人脸区域的位置和五点关键点。RetinaFace为当前学术界和工业界精度较高的人脸检测和人脸关键点定位二合一的方法，被CVPR 2020 录取。该方法的主要贡献是: 引入关键点分支，可以在训练阶段引入关键点预测分支进行多任务学习，提供额外的互补特征，inference去掉关键点分支即可，并不会引入额外的计算量。","Domain":["cv"],"Downloads":19757695,"ExampleCodeAvailable":1,"ExampleCodeUnavailableReason":"","ForbiddenVisibilityUpdate":false,"Frameworks":["pytorch"],"FromSite":"maas","Id":11766,"Integrating":2,"IntegrationFailureLog":"","IntegrationFailureReason":"","IsAccessible":1,"IsCertification":1,"IsHot":0,"IsNewModel":false,"IsOnline":1,"IsPreTrain":0,"IsPublished":1,"IsTop":0,"Language":[],"LastUpdatedTime":1676428135,"Libraries":["pytorch"],"License":"MIT License","Meta":"","Metrics":["AP"],"ModelDetail":{},"ModelInfos":{},"ModelRevisions":null,"ModelSource":"USER_UPLOAD","ModelTools":"https://modelscope.cn/toolBox/damo/16/summary","ModelType":[],"MuseInfo":null,"NEXA":{"Catalogues":null,"ModelCover":"","ScientificField":"","Source":"","SubScientificField":null},"Name":"cv_resnet50_face-detection_retinaface","NewVersion":"","NickName":"","OfficialTags":null,"OpenAiSwingDeployInfo":{"Order":0,"Recommend":null,"lmdeploy":{"eas":{"Script":"","requirements":""},"ens":{"Script":"","requirements":""},"fc":{"Script":"","requirements":""},"image_tag":""},"ollama":{"eas":{"Script":"","requirements":""},"ens":{"Script":"","requirements":""},"fc":{"Script":"","requirements":""},"image_tag":""},"pipeline":{"eas":{"Script":"","requirements":""},"ens":{"Script":"","requirements":""},"fc":{"Script":"","requirements":""},"image_tag":""},"vllm":{"eas":{"Script":"","requirements":""},"ens":{"Script":"","requirements":""},"fc":{"Script":"","requirements":""},"image_tag":""}},"Organization":{"ApplyFailureReason":"","ApplyReason":"","Avatar":"https://resouces.modelscope.cn/avatar/86fc4b9c-4548-463c-8cbb-f37f68b87141.png","CreateCompetition":false,"CreatedBy":"damoadmin","Description":"[\"root\",{},[\"p\",{},[\"span\",{\"data-type\":\"text\"},[\"span\",{\"data-type\":\"leaf\"},\"通义实验室(Institute for Intelligent Computing, aka Tongyi Lab) 专注于各领域大模型技术研发与创新应用。实验室研究方向涵盖LLM、多模态理解与生成、视觉AIGC、语音等多个领域。我们并积极推进研究成果的产业化落地。实验室同时积极参与开源社区建设，全方位拥抱开源社区，共同探索AI模型的开源开放。\"]]]]","DisplayUrl":"","Email":"","FromSite":"","FullName":"通义实验室","GithubAddress":"","GmtCreated":"2022-08-03T17:01:55Z","GmtModified":"2025-11-21T08:30:42Z","Id":1,"InitAdminMembers":"","IsApply":false,"IsCertification":"","Mobile":"","Name":"iic","Path":"","Roles":null,"StarCnt":0,"Status":0,"SubscribeVo":null,"Type":2},"PaiModelGalleryUrl":null,"PaiSdkParameter":null,"Path":"iic","ProtectedMode":2,"ReadMeContent":"\n# RetinaFace 模型介绍\n稳定调用及效果更好的API，详见视觉开放智能平台：[人脸检测与五官定位](https://vision.aliyun.com/experience/detail?tagName=facebody\u0026children=DetectFace\u0026spm=a2cio.27993362)。\n\n人脸检测关键点模型RetinaFace\n\n\n## 模型描述\n\nRetinaFace为当前学术界和工业界精度较高的人脸检测和人脸关键点定位二合一的方法，被CVPR 2020 录取([论文地址](https://arxiv.org/abs/1905.00641), [代码地址](https://github.com/biubug6/Pytorch_Retinaface)))，该方法的主要贡献是:\n- 引入关键点分支，可以在训练阶段引入关键点预测分支进行多任务学习，提供额外的互补特征，inference去掉关键点分支即可，并不会引入额外的计算量。\n\n\nRetinaFace 的结构如下：\n\n![模型结构](RetinaFace.jpg)\n\n\n## 模型效果\n![RetinaFace模型效果](result.png)\n\n## 模型使用方式和使用范围\n本模型可以检测输入图片中人脸以及对应关键点的位置。\n\n### 使用方式\n- 推理：输入图片，如存在人脸则返回人脸和人脸五点关键点位置，可检测多张人脸\n\n### 目标场景\n- 人脸相关的基础能力，可应用于人像美颜/互动娱乐/人脸比对等场景\n\n### 模型局限性及可能偏差\n- 小脸的检测效果一般\n- 当前版本在python 3.7环境测试通过，其他环境下可用性待测试\n\n### 预处理\n测试时主要的预处理如下：\n- Normalize：图像归一化，减均值除以标准差\n- Pad：图像高宽补零至32的倍数\n\n### 代码范例\n```python\nfrom modelscope.pipelines import pipeline\nfrom modelscope.utils.constant import Tasks\n\nretina_face_detection = pipeline(Tasks.face_detection, 'damo/cv_resnet50_face-detection_retinaface')\nimg_path = 'https://modelscope.oss-cn-beijing.aliyuncs.com/test/images/retina_face_detection.jpg'\nresult = retina_face_detection(img_path)\nprint(f'face detection output: {result}.')\n```\n\n### 模型训练流程\n- 在Wider Face数据集上使用SGD优化器，Warmup 5个epoch, 初始学习率为1e-2，batch size 为32，训练了80个epoch。\n\n### 测试集\n- WIDERFACE: 测试集已上传至ModelScope的DatasetHub, 详情请见[WIDER_FACE](https://modelscope.cn/datasets/shaoxuan/WIDER_FACE)。\n\n## 数据评估及结果\n模型在WiderFace的验证集上客观指标如下：\n| Method | Easy | Medium | Hard |\n| ------------ | ------------ | ------------ | ------------ |\n| RetinaFace | 94.8 | 93.8 | 89.6 |\n\n\n## 人脸相关模型\n\n以下是ModelScope上人脸相关模型:\n\n- 人脸检测\n\n| 序号 | 模型名称 |\n| ------------ | ------------ |\n| 1 | [RetinaFace人脸检测模型](https://modelscope.cn/models/damo/cv_resnet50_face-detection_retinaface/summary) |\n| 2 | [MogFace人脸检测模型-large](https://modelscope.cn/models/damo/cv_resnet101_face-detection_cvpr22papermogface/summary) |\n| 3 | [TinyMog人脸检测器-tiny](https://modelscope.cn/models/damo/cv_manual_face-detection_tinymog/summary) |\n| 4 | [ULFD人脸检测模型-tiny](https://modelscope.cn/models/damo/cv_manual_face-detection_ulfd/summary) |\n| 5 | [Mtcnn人脸检测关键点模型](https://modelscope.cn/models/damo/cv_manual_face-detection_mtcnn/summary) |\n| 6 | [ULFD人脸检测模型-tiny](https://modelscope.cn/models/damo/cv_manual_face-detection_ulfd/summary) |\n\n\n- 人脸识别\n\n| 序号 | 模型名称 |\n| ------------ | ------------ |\n| 1 | [口罩人脸识别模型FaceMask](https://modelscope.cn/models/damo/cv_resnet_face-recognition_facemask/summary) |\n| 2 | [口罩人脸识别模型FRFM-large](https://modelscope.cn/models/damo/cv_manual_face-recognition_frfm/summary) |\n| 3 | [IR人脸识别模型FRIR](https://modelscope.cn/models/damo/cv_manual_face-recognition_frir/summary) |\n| 4 | [ArcFace人脸识别模型](https://modelscope.cn/models/damo/cv_ir50_face-recognition_arcface/summary) |\n| 5 | [IR人脸识别模型FRIR](https://modelscope.cn/models/damo/cv_manual_face-recognition_frir/summary) |\n\n- 人脸活体识别\n\n| 序号 | 模型名称 |\n| ------------ | ------------ |\n| 1 | [人脸活体检测模型-IR](https://modelscope.cn/models/damo/cv_manual_face-liveness_flir/summary) |\n| 2 | [人脸活体检测模型-RGB](https://modelscope.cn/models/damo/cv_manual_face-liveness_flrgb/summary) |\n| 3 | [静默人脸活体检测模型-炫彩](https://modelscope.cn/models/damo/cv_manual_face-liveness_flxc/summary) |\n\n- 人脸关键点\n\n| 序号 | 模型名称 |\n| ------------ | ------------ |\n| 1 | [FLCM人脸关键点置信度模型](https://modelscope.cn/models/damo/cv_manual_facial-landmark-confidence_flcm/summary) |\n\n- 人脸属性 \u0026 表情\n\n\n| 序号 | 模型名称 |\n| ------------ | ------------ |\n| 1 | [人脸表情识别模型FER](https://modelscope.cn/models/damo/cv_vgg19_facial-expression-recognition_fer/summary) |\n| 2 | [人脸属性识别模型FairFace](https://modelscope.cn/models/damo/cv_resnet34_face-attribute-recognition_fairface/summary) |\n\n## 来源说明\n本模型及代码来自开源社区([地址](https://github.com/biubug6/Pytorch_Retinaface))，请遵守相关许可。\n\n## 引用\n如果你觉得这个该模型对有所帮助，请考虑引用下面的相关的论文：\n\n```BibTeX\n@inproceedings{deng2020retinaface,\n      title={Retinaface: Single-shot multi-level face localisation in the wild},\n        author={Deng, Jiankang and Guo, Jia and Ververas, Evangelos and Kotsia, Irene and Zafeiriou, Stefanos},\n          booktitle={Proceedings of the IEEE/CVF conference on computer vision and pattern recognition},\n            pages={5203--5212},\n              year={2020}\n}\n```\n\n\n","ReadMeTips":null,"RelatedArxivId":["1905.00641"],"RelatedPaper":[],"Revision":"master","Stars":148,"StorageSize":110649902,"Studios":[],"SubVisionFoundation":"","SupportApiInference":false,"SupportDashDeployment":0,"SupportDashInference":0,"SupportDashTraining":0,"SupportDeployment":1,"SupportExperience":1,"SupportFinetuning":0,"SupportFlexTrain":0,"SupportInference":"","SupportPaiModelGallery":null,"SupportPaiSdk":0,"SwingDeployInfo":null,"Tags":["InsightFace","CVPR2020"],"Tasks":[{"ChineseName":"人脸检测","Description":"","DomainName":"cv","Id":80,"IsExhibition":true,"IsHot":0,"IsLeaf":true,"IsLoginRequired":true,"IsRetrieval":true,"Level":2,"Name":"face-detection","ParentId":177,"ParentTask":{"ChineseName":"人脸人体","Description":"","DomainName":"cv","Id":177,"IsExhibition":true,"IsHot":0,"IsLeaf":false,"IsLoginRequired":true,"IsRetrieval":true,"Level":1,"Name":"human-face-body","ParentId":-1,"ParentTask":null,"Sorting":0,"SupportWidgets":false,"TypicalModel":"","WidgetConfig":"{}","WidgetValidator":""},"Sorting":0,"SupportWidgets":false,"TypicalModel":"","WidgetConfig":"","WidgetValidator":""}],"Tools":[],"TriggerWords":null,"Visibility":5,"VisionFoundation":"","_":null,"widgets":[{"enabled":true,"examples":[{"inputs":[{"data":"https://modelscope.oss-cn-beijing.aliyuncs.com/test/images/retina_face_detection.jpg","name":""}],"name":"1","parameters":null,"title":""}],"inferencespec":{"cpu":4,"gpu":1,"gpu_memory":16000,"memory":43000},"inputs":[{"name":"","title":"","type":"image","validator":null}],"parameters":null,"task":"face-detection"}]},"Message":"success","RequestId":"37193871-d82f-4767-b029-84cd64900364","Success":true}