加密模型包到内存 - YoloEncryptModelEx
函数简介
加密并输出整包到内存。
接口名称
YoloEncryptModelEx
DLL 调用
int YoloEncryptModelEx(long ola, long modelData, int modelSize, long ncnnParamData, int ncnnParamSize, long labelData, int labelSize, string password, int modelType, int inferenceType, long* outPackageData, long* outPackageSize);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug 对象指针,由 CreateCOLAPlugInterFace 生成。 |
| modelData | 长整数型 | 主模型地址 |
| modelSize | 整数型 | 主模型长度 |
| ncnnParamData | 长整数型 | NCNN param 地址 |
| ncnnParamSize | 整数型 | param 长度 |
| labelData | 长整数型 | 标签地址 |
| labelSize | 整数型 | 标签长度 |
| password | 字符串 | 密码 |
| modelType | 整数型 | 模型类型 |
| inferenceType | 整数型 | 推理类型 |
| outPackageData | 长整数型* | 输出:整包地址 |
| outPackageSize | 长整数型* | 输出:包总长度 |
返回值
整数型:1 成功,0 失败。
注意事项
- 需要插件已开通 Yolos 模块权限。
- 插件分配的内存须调用 FreeMemoryPtr 释放。
