CoolFace
Modelpublic

shadow-cann/hispark-modelzoo-codeformer

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
model-card.json317 linesDownload Raw Back to root
1{2  "name": "CodeFormer",3  "id": "ib6scq68vs00",4  "description": "CodeFormer 是一种基于码本查找 Transformer 的鲁棒盲人脸修复模型。相比传统方法,它通过生成对抗网络与量化编码技术,能有效处理模糊、噪声等多种退化问题,兼顾人脸修复质量与身份保真度,适用于盲人脸恢复场景。",5  "category": "计算机视觉",6  "framework": [7    "PyTorch"8  ],9  "supportOs": [10    "OpenHarmony",11    "Linux"12  ],13  "computingPower": [14    "Hi3403V100 SVP_NNN",15    "Hi3403V100 NNN"16  ],17  "tags": [18    "图像增强"19  ],20  "repositoryUrl": "https://gitee.com/HiSpark/modelzoo/tree/master/samples/built-in/super_resolution/CodeFormer/",21  "licenseUrl": "https://github.com/sczhou/CodeFormer/blob/master/LICENSE",22  "downloads": [23    {24      "fileName": "空文件,因为该模型仅用于非商用.onnx",25      "variants": [26        "源模型 / 源模型下载",27        "源模型 / 源模型元数据",28        "编译模型 / OM 元数据 / a16w8"29      ]30    },31    {32      "fileName": "SVP_NNN_PC_V1.0.6.0.tgz",33      "variants": [34        "附加资源 / 附加资源"35      ]36    }37  ],38  "apiDetail": {39    "createdBy": 139318985286440,40    "creationDate": "2025-12-30 17:56:29",41    "creationUserCN": "sloanqin",42    "lastUpdatedBy": null,43    "lastUpdateDate": "2025-12-30 20:02:18",44    "lastUpdateUserCN": "sloanqin",45    "rowIdx": -1,46    "id": "ib6scq68vs00",47    "name": "CodeFormer",48    "isBeta": 0,49    "betaVersionDesc": "",50    "description": "CodeFormer 是一种基于码本查找 Transformer 的鲁棒盲人脸修复模型。相比传统方法,它通过生成对抗网络与量化编码技术,能有效处理模糊、噪声等多种退化问题,兼顾人脸修复质量与身份保真度,适用于盲人脸恢复场景。",51    "parentId": "ib6scq68vs00",52    "coverImageId": 1720510897520642,53    "coverImageUrl": "https://openxinhuo-board-image.obs.cn-east-3.myhuaweicloud.com/1720510897520642%2Fcodeformer.jpg",54    "modelEffectId": null,55    "modelEffectUrl": "",56    "computerVersion": [57      "图像增强"58    ],59    "naturalLanguageProcess": [],60    "multimodal": [],61    "video": [],62    "framework": [63      "PyTorch"64    ],65    "modelRepository": "https://gitee.com/HiSpark/modelzoo/tree/master/samples/built-in/super_resolution/CodeFormer/",66    "originModel": [67      {68        "id": "1720510975115266",69        "name": "空文件,因为该模型仅用于非商用.onnx",70        "url": null,71        "size": "3"72      }73    ],74    "originModelLink": null,75    "dataSet": "https://mmlab.ie.cuhk.edu.hk/projects/CelebA.html",76    "modelLicense": "https://github.com/sczhou/CodeFormer/blob/master/LICENSE",77    "detailParams": [78      {79        "name": "输入",80        "value": "512x512"81      },82      {83        "name": "参数量",84        "value": "94.375M"85      },86      {87        "name": "计算量",88        "value": "835.584GFLOPs"89      }90    ],91    "quickStart": {92      "url": "https://gitee.com/HiSpark/modelzoo/tree/master/samples/built-in/super_resolution/CodeFormer/",93      "markDownUrl": null,94      "developLanguage": [95        {96          "language": "C++",97          "context": "{\"ops\":[{\"attributes\":{\"line-height\":\"1.6\",\"color\":\"#40485b\",\"size\":\"16px\",\"background\":\"#ffffff\"},\"insert\":\"CodeFormer模型可以通过以下代码完成快速推理\"},{\"attributes\":{\"text-indent\":\"0px\"},\"insert\":\"\\n\"},{\"insert\":\"#include \\\"model.h\\\"\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"#include \\\"log.h\\\"\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\\n\"},{\"insert\":\"using namespace Infer;\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\\n\"},{\"insert\":\"int main()\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"{\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"    EnvInit();\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"    std::string omModelPath = \\\"/path/to/model.om\\\"; // CodeFormer模型文件路径 \"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"    std::string imagePath = \\\"/path/to/image.jpg\\\"; // 输入图片路径\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"    std::unique_ptr<Model> model = std::make_unique<Model>();\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"    if (model->Load(omModelPath, ModelType::CodeFormer) != 0) {\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"        LOG(ERROR) << \\\"fail to load model\\\";\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"        return -1;\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"    }\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"    auto ret = model->Infer(imagePath, FileType::SingelImageFile);\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"    if (ret.size() == 0) {\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"        LOG(ERROR) << \\\"fail to infer model\\\";\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"        model->Unload();\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"        return -1;\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"    }\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"    if (model->Unload() != 0) {\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"        LOG(ERROR) << \\\"fail to unload model\\\";\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"        return -1;\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"    }\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"    EnvDeinit();\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"    return 0;\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"insert\":\"}\"},{\"attributes\":{\"code-block\":\"plain\"},\"insert\":\"\\n\"},{\"attributes\":{\"line-height\":\"1.6\",\"color\":\"#40485b\",\"size\":\"16px\",\"background\":\"#ffffff\"},\"insert\":\"备注:头文件和动态库位于\"},{\"attributes\":{\"line-height\":\"1.6\",\"color\":\"#095eab\",\"size\":\"16px\",\"background\":\"transparent\",\"link\":\"https://gitee.com/HiSpark/modelzoo/tree/master/samples/common\"},\"insert\":\"/samples/common\"},{\"attributes\":{\"line-height\":\"1.6\",\"color\":\"#40485b\",\"size\":\"16px\",\"background\":\"#ffffff\"},\"insert\":\"目录下,编译配置参考\"},{\"attributes\":{\"line-height\":\"1.6\",\"color\":\"#095eab\",\"size\":\"16px\",\"background\":\"transparent\",\"link\":\"https://gitee.com/HiSpark/modelzoo/blob/master/samples/built-in/super_resolution/CodeFormer/src/CMakeLists.txt\"},\"insert\":\"文件\"},{\"attributes\":{\"text-indent\":\"0px\"},\"insert\":\"\\n\"}]}"98        }99      ]100    },101    "status": "released",102    "currentHandler": "",103    "currentHandlerName": "",104    "jsonPath": "https://gitee.com/HiSpark/modelzoo-dev/blob/master/samples/built-in/super_resolution/CodeFormer/codeformer.json",105    "modelAdaptor": [106      {107        "createdBy": null,108        "creationDate": null,109        "creationUserCN": null,110        "lastUpdatedBy": null,111        "lastUpdateDate": null,112        "lastUpdateUserCN": null,113        "rowIdx": -1,114        "id": "i8ttm5k1tc00",115        "name": "Hi3403V100 SVP_NNN",116        "modelId": "ib6scq68vs00",117        "modelName": "CodeFormer",118        "supportNames": [119          "a16w8"120        ],121        "toolkit": [122          {123            "name": "CANN配置",124            "url": "https://hispark-obs.obs.cn-east-3.myhuaweicloud.com/SVP_NNN_PC_V1.0.6.0.tgz",125            "desc": "Al异构计算架构;提升计算效率的关键平台",126            "imgId": "cann"127          },128          {129            "name": "编译工具库",130            "url": "https://gitee.com/HiSpark/pegasus/blob/Beta-v0.9.1/docs/Hi3403V100%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA%E6%8C%87%E5%8D%97/Hi3403V100%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA%E6%8C%87%E5%8D%97.md",131            "desc": "高效编译,精准适配;AI性能优化,应用流畅运行",132            "imgId": "tool"133          },134          {135            "name": "SDK",136            "url": "https://gitee.com/HiSpark/ss928v100_clang/tree/Beta-v0.9.1/",137            "desc": "稳定、易用的设计;支撑客户快速产品量产",138            "imgId": "sdk"139          }140        ],141        "supportOs": [142          "OpenHarmony",143          "Linux"144        ],145        "supportQuantify": [146          {147            "createdBy": 132241120926760,148            "creationDate": "2026-03-26 19:52:20",149            "creationUserCN": "liaoshibin",150            "lastUpdatedBy": 132241120926760,151            "lastUpdateDate": "2026-03-26 19:52:20",152            "lastUpdateUserCN": "liaoshibin",153            "rowIdx": -1,154            "id": "j6tfki80i000",155            "name": "a16w8",156            "computingId": "i8ttm5k1tc00",157            "computingName": "Hi3403V100 SVP_NNN",158            "omOfflineModelUrl": null,159            "omOfflineModelId": 1720511059001345,160            "omOfflineModelSize": "3",161            "omOfflineModelName": "空文件,因为该模型仅用于非商用.om",162            "omOfflineModel": [163              {164                "id": "1720511059001345",165                "name": "空文件,因为该模型仅用于非商用.om",166                "url": null,167                "size": "3"168              }169            ],170            "omOfflineModelLink": null,171            "releaseTime": "2025-12-30",172            "boardOs": null,173            "modelLicense": "https://gitee.com/HiSpark/modelzoo/tree/master/samples/built-in/super_resolution/CodeFormer/LICENSE",174            "modelPerformance": [175              {176                "performanceValue": "468.72",177                "unit": "耗时(ms)",178                "desc": ""179              },180              {181                "performanceValue": "2.13",182                "unit": "性能(fps)",183                "desc": ""184              },185              {186                "performanceValue": "2356.851",187                "unit": "单帧内存带宽(MB)",188                "desc": ""189              },190              {191                "performanceValue": "264.789",192                "unit": "内存(MB)",193                "desc": ""194              }195            ],196            "deleted": 0197          }198        ],199        "deleted": 0200      },201      {202        "createdBy": null,203        "creationDate": null,204        "creationUserCN": null,205        "lastUpdatedBy": null,206        "lastUpdateDate": null,207        "lastUpdateUserCN": null,208        "rowIdx": -1,209        "id": "i8ttm5k1tc01",210        "name": "Hi3403V100 NNN",211        "modelId": "ib6scq68vs00",212        "modelName": "CodeFormer",213        "supportNames": [214          "fp16"215        ],216        "toolkit": [217          {218            "name": "CANN工具包",219            "url": "",220            "desc": "5.30.t11.7.b110; (请联系FAE获取)",221            "imgId": "cann"222          },223          {224            "name": "编译工具链",225            "url": "",226            "desc": "aarch64-mix210-linux-gcc;(请联系FAE获取)",227            "imgId": "tool"228          },229          {230            "name": "SDK",231            "url": "",232            "desc": "SS928 V100R001C02SPC022; (请联系FAE获取)",233            "imgId": "sdk"234          }235        ],236        "supportOs": [237          "Linux"238        ],239        "supportQuantify": [240          {241            "createdBy": 132241120926760,242            "creationDate": "2026-03-26 19:52:20",243            "creationUserCN": "liaoshibin",244            "lastUpdatedBy": 132241120926760,245            "lastUpdateDate": "2026-03-26 19:52:20",246            "lastUpdateUserCN": "liaoshibin",247            "rowIdx": -1,248            "id": "j6tfki9ki000",249            "name": "fp16",250            "computingId": "i8ttm5k1tc01",251            "computingName": "Hi3403V100 NNN",252            "omOfflineModelUrl": null,253            "omOfflineModelId": 1720511038029825,254            "omOfflineModelSize": "3",255            "omOfflineModelName": "空文件,因为该模型仅用于非商用.om",256            "omOfflineModel": [257              {258                "id": "1720511038029825",259                "name": "空文件,因为该模型仅用于非商用.om",260                "url": null,261                "size": "3"262              }263            ],264            "omOfflineModelLink": null,265            "releaseTime": "2025-12-30",266            "boardOs": null,267            "modelLicense": "https://gitee.com/HiSpark/modelzoo/tree/master/samples/built-in/super_resolution/CodeFormer/LICENSE",268            "modelPerformance": [269              {270                "performanceValue": "1724.14",271                "unit": "耗时(ms)",272                "desc": ""273              },274              {275                "performanceValue": "0.58",276                "unit": "性能(fps)",277                "desc": ""278              },279              {280                "performanceValue": "19676.725",281                "unit": "单帧内存带宽(MB)",282                "desc": ""283              },284              {285                "performanceValue": "877.707",286                "unit": "内存(MB)",287                "desc": ""288              }289            ],290            "deleted": 0291          }292        ],293        "deleted": 0294      }295    ],296    "saveType": null,297    "deleteType": null,298    "latest": "Y",299    "deleted": 0,300    "modelPhase": "released",301    "remark": null,302    "fileInfo": null,303    "reviewType": null,304    "owner": "sloanqin",305    "ownerBy": 139318985286440,306    "optional": null,307    "optionalList": [308      "0e900d99dee8461b8",309      "whalenowings"310    ],311    "optionalBy": null,312    "downloadNum": 63,313    "collectNum": null,314    "isCollect": null315  }316}317