ATC转换模型插入AIPP算子报错,padding后的图像高度不能超过1080
收藏回复举报
ATC转换模型插入AIPP算子报错,padding后的图像高度不能超过1080
t('forum.solved') 已解决
发表于2023-11-17 09:30:08
0 查看

想要实现dvpp解码缩放+AIPP填充的流程,原始输入图像为1920*1080,模型需要的输入为1280*1280。目前思路是经过dvpp等比例缩放为1280*720,然后再用aipp填充高度,在atc转换模型时使用的AIPP配置文件如下:

aipp_op{ 

    aipp_mode:static 

    input_format : YUV420SP_U8 

    src_image_size_w : 1280 

    src_image_size_h : 720 

    csc_switch : true 

    rbuv_swap_switch : false 

    matrix_r0c0 : 256 

    matrix_r0c1 : 0 

    matrix_r0c2 : 359 

    matrix_r1c0 : 256 

    matrix_r1c1 : -88 

    matrix_r1c2 : -183 

    matrix_r2c0 : 256 

    matrix_r2c1 : 454 

    matrix_r2c2 : 0 

    input_bias_0 : 0 

    input_bias_1 : 128 

    input_bias_2 : 128 

 

    crop: true 

    load_start_pos_h : 0 

    load_start_pos_w : 0 

    crop_size_w : 1280 

    crop_size_h : 720 

     

    padding: true 

    left_padding_size: 0 

    right_padding_size: 0 

    top_padding_size: 280 

    bottom_padding_size: 280 

    padding_value: 0 

 

    min_chn_0 : 0 

    min_chn_1 : 0 

    min_chn_2 : 0 

    var_reci_chn_0: 0.0039215686274509803921568627451 

    var_reci_chn_1: 0.0039215686274509803921568627451 

    var_reci_chn_2: 0.0039215686274509803921568627451 

} 

模型转换失败,报错为:RuntimeError: ({'errCode': 'E81012', 'cause_desc': 'after padding, aipp output w[1280] should be less than or eaqual to 1080'}, 'Compile op[aipp] failed, cause: after padding, aipp output w[1280] should be less than or eaqual to 1080.') 

], optype: [Aipp]) 。

按说我并不需要对宽度做填充,只需要对高度填充,为什么规定不能超过1080?当我去掉padding直接设置输入为1280*1280是可以转换成功的啊

我要发帖子