hispark-modelzoo-codeformer / model-card.json
shadow-cann's picture
Add files using upload-large-folder tool
12b1aeb verified
{
"name": "CodeFormer",
"id": "ib6scq68vs00",
"description": "CodeFormer 是一种基于码本查找 Transformer 的鲁棒盲人脸修复模型。相比传统方法,它通过生成对抗网络与量化编码技术,能有效处理模糊、噪声等多种退化问题,兼顾人脸修复质量与身份保真度,适用于盲人脸恢复场景。",
"category": "计算机视觉",
"framework": [
"PyTorch"
],
"supportOs": [
"OpenHarmony",
"Linux"
],
"computingPower": [
"Hi3403V100 SVP_NNN",
"Hi3403V100 NNN"
],
"tags": [
"图像增强"
],
"repositoryUrl": "https://gitee.com/HiSpark/modelzoo/tree/master/samples/built-in/super_resolution/CodeFormer/",
"licenseUrl": "https://github.com/sczhou/CodeFormer/blob/master/LICENSE",
"downloads": [
{
"fileName": "空文件,因为该模型仅用于非商用.onnx",
"variants": [
"源模型 / 源模型下载",
"源模型 / 源模型元数据",
"编译模型 / OM 元数据 / a16w8"
]
},
{
"fileName": "SVP_NNN_PC_V1.0.6.0.tgz",
"variants": [
"附加资源 / 附加资源"
]
}
],
"apiDetail": {
"createdBy": 139318985286440,
"creationDate": "2025-12-30 17:56:29",
"creationUserCN": "sloanqin",
"lastUpdatedBy": null,
"lastUpdateDate": "2025-12-30 20:02:18",
"lastUpdateUserCN": "sloanqin",
"rowIdx": -1,
"id": "ib6scq68vs00",
"name": "CodeFormer",
"isBeta": 0,
"betaVersionDesc": "",
"description": "CodeFormer 是一种基于码本查找 Transformer 的鲁棒盲人脸修复模型。相比传统方法,它通过生成对抗网络与量化编码技术,能有效处理模糊、噪声等多种退化问题,兼顾人脸修复质量与身份保真度,适用于盲人脸恢复场景。",
"parentId": "ib6scq68vs00",
"coverImageId": 1720510897520642,
"coverImageUrl": "https://openxinhuo-board-image.obs.cn-east-3.myhuaweicloud.com/1720510897520642%2Fcodeformer.jpg",
"modelEffectId": null,
"modelEffectUrl": "",
"computerVersion": [
"图像增强"
],
"naturalLanguageProcess": [],
"multimodal": [],
"video": [],
"framework": [
"PyTorch"
],
"modelRepository": "https://gitee.com/HiSpark/modelzoo/tree/master/samples/built-in/super_resolution/CodeFormer/",
"originModel": [
{
"id": "1720510975115266",
"name": "空文件,因为该模型仅用于非商用.onnx",
"url": null,
"size": "3"
}
],
"originModelLink": null,
"dataSet": "https://mmlab.ie.cuhk.edu.hk/projects/CelebA.html",
"modelLicense": "https://github.com/sczhou/CodeFormer/blob/master/LICENSE",
"detailParams": [
{
"name": "输入",
"value": "512x512"
},
{
"name": "参数量",
"value": "94.375M"
},
{
"name": "计算量",
"value": "835.584GFLOPs"
}
],
"quickStart": {
"url": "https://gitee.com/HiSpark/modelzoo/tree/master/samples/built-in/super_resolution/CodeFormer/",
"markDownUrl": null,
"developLanguage": [
{
"language": "C++",
"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\"}]}"
}
]
},
"status": "released",
"currentHandler": "",
"currentHandlerName": "",
"jsonPath": "https://gitee.com/HiSpark/modelzoo-dev/blob/master/samples/built-in/super_resolution/CodeFormer/codeformer.json",
"modelAdaptor": [
{
"createdBy": null,
"creationDate": null,
"creationUserCN": null,
"lastUpdatedBy": null,
"lastUpdateDate": null,
"lastUpdateUserCN": null,
"rowIdx": -1,
"id": "i8ttm5k1tc00",
"name": "Hi3403V100 SVP_NNN",
"modelId": "ib6scq68vs00",
"modelName": "CodeFormer",
"supportNames": [
"a16w8"
],
"toolkit": [
{
"name": "CANN配置",
"url": "https://hispark-obs.obs.cn-east-3.myhuaweicloud.com/SVP_NNN_PC_V1.0.6.0.tgz",
"desc": "Al异构计算架构;提升计算效率的关键平台",
"imgId": "cann"
},
{
"name": "编译工具库",
"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",
"desc": "高效编译,精准适配;AI性能优化,应用流畅运行",
"imgId": "tool"
},
{
"name": "SDK",
"url": "https://gitee.com/HiSpark/ss928v100_clang/tree/Beta-v0.9.1/",
"desc": "稳定、易用的设计;支撑客户快速产品量产",
"imgId": "sdk"
}
],
"supportOs": [
"OpenHarmony",
"Linux"
],
"supportQuantify": [
{
"createdBy": 132241120926760,
"creationDate": "2026-03-26 19:52:20",
"creationUserCN": "liaoshibin",
"lastUpdatedBy": 132241120926760,
"lastUpdateDate": "2026-03-26 19:52:20",
"lastUpdateUserCN": "liaoshibin",
"rowIdx": -1,
"id": "j6tfki80i000",
"name": "a16w8",
"computingId": "i8ttm5k1tc00",
"computingName": "Hi3403V100 SVP_NNN",
"omOfflineModelUrl": null,
"omOfflineModelId": 1720511059001345,
"omOfflineModelSize": "3",
"omOfflineModelName": "空文件,因为该模型仅用于非商用.om",
"omOfflineModel": [
{
"id": "1720511059001345",
"name": "空文件,因为该模型仅用于非商用.om",
"url": null,
"size": "3"
}
],
"omOfflineModelLink": null,
"releaseTime": "2025-12-30",
"boardOs": null,
"modelLicense": "https://gitee.com/HiSpark/modelzoo/tree/master/samples/built-in/super_resolution/CodeFormer/LICENSE",
"modelPerformance": [
{
"performanceValue": "468.72",
"unit": "耗时(ms)",
"desc": ""
},
{
"performanceValue": "2.13",
"unit": "性能(fps)",
"desc": ""
},
{
"performanceValue": "2356.851",
"unit": "单帧内存带宽(MB)",
"desc": ""
},
{
"performanceValue": "264.789",
"unit": "内存(MB)",
"desc": ""
}
],
"deleted": 0
}
],
"deleted": 0
},
{
"createdBy": null,
"creationDate": null,
"creationUserCN": null,
"lastUpdatedBy": null,
"lastUpdateDate": null,
"lastUpdateUserCN": null,
"rowIdx": -1,
"id": "i8ttm5k1tc01",
"name": "Hi3403V100 NNN",
"modelId": "ib6scq68vs00",
"modelName": "CodeFormer",
"supportNames": [
"fp16"
],
"toolkit": [
{
"name": "CANN工具包",
"url": "",
"desc": "5.30.t11.7.b110; (请联系FAE获取)",
"imgId": "cann"
},
{
"name": "编译工具链",
"url": "",
"desc": "aarch64-mix210-linux-gcc;(请联系FAE获取)",
"imgId": "tool"
},
{
"name": "SDK",
"url": "",
"desc": "SS928 V100R001C02SPC022; (请联系FAE获取)",
"imgId": "sdk"
}
],
"supportOs": [
"Linux"
],
"supportQuantify": [
{
"createdBy": 132241120926760,
"creationDate": "2026-03-26 19:52:20",
"creationUserCN": "liaoshibin",
"lastUpdatedBy": 132241120926760,
"lastUpdateDate": "2026-03-26 19:52:20",
"lastUpdateUserCN": "liaoshibin",
"rowIdx": -1,
"id": "j6tfki9ki000",
"name": "fp16",
"computingId": "i8ttm5k1tc01",
"computingName": "Hi3403V100 NNN",
"omOfflineModelUrl": null,
"omOfflineModelId": 1720511038029825,
"omOfflineModelSize": "3",
"omOfflineModelName": "空文件,因为该模型仅用于非商用.om",
"omOfflineModel": [
{
"id": "1720511038029825",
"name": "空文件,因为该模型仅用于非商用.om",
"url": null,
"size": "3"
}
],
"omOfflineModelLink": null,
"releaseTime": "2025-12-30",
"boardOs": null,
"modelLicense": "https://gitee.com/HiSpark/modelzoo/tree/master/samples/built-in/super_resolution/CodeFormer/LICENSE",
"modelPerformance": [
{
"performanceValue": "1724.14",
"unit": "耗时(ms)",
"desc": ""
},
{
"performanceValue": "0.58",
"unit": "性能(fps)",
"desc": ""
},
{
"performanceValue": "19676.725",
"unit": "单帧内存带宽(MB)",
"desc": ""
},
{
"performanceValue": "877.707",
"unit": "内存(MB)",
"desc": ""
}
],
"deleted": 0
}
],
"deleted": 0
}
],
"saveType": null,
"deleteType": null,
"latest": "Y",
"deleted": 0,
"modelPhase": "released",
"remark": null,
"fileInfo": null,
"reviewType": null,
"owner": "sloanqin",
"ownerBy": 139318985286440,
"optional": null,
"optionalList": [
"0e900d99dee8461b8",
"whalenowings"
],
"optionalBy": null,
"downloadNum": 63,
"collectNum": null,
"isCollect": null
}
}