加密模型包到文件 - YoloEncryptModel
函数简介
将明文模型与可选类别名表打成欧拉加密包并写入磁盘;包头写入 modelType、inferenceType。
接口名称
YoloEncryptModel
DLL 调用
int YoloEncryptModel(long ola, string modelPath, string ncnnParamPath, string namesLabel, string password, int modelType, int inferenceType, string savePath);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug 对象指针,由 CreateCOLAPlugInterFace 生成。 |
| modelPath | 字符串 | 主模型路径 |
| ncnnParamPath | 字符串 | NCNN .param,可空 |
| namesLabel | 字符串 | 类别名文件,可空 |
| password | 字符串 | 加密密码 |
| modelType | 整数型 | 模型类型 |
| inferenceType | 整数型 | 推理类型 |
| savePath | 字符串 | 输出加密包路径 |
返回值
整数型:1 成功,0 失败。
注意事项
- 需要插件已开通 Yolos 模块权限。
| 值 | 含义 |
|---|---|
| 0 | TensorRT Engine(.engine) |
| 1 | ONNX(.onnx) |
| 2 | NCNN(.bin + .param 双文件) |
| 值 | 含义 |
|---|---|
| 0 | Detect 目标检测 |
| 1 | Classify 图像分类 |
| 2 | Segment 实例分割 |
| 3 | Pose 姿态估计 |
| 4 | Obb 旋转框检测 |
