Toybrick

Could you let us know how to convert from YUV422 to YUV420 or RGB using NPU ?

jefferyzhang

版主

积分
13005
楼主
发表于 2020-3-30 20:50:10 | 显示全部楼层
本帖最后由 jefferyzhang 于 2020-3-30 20:51 编辑

Unsupported yet.
But you could reshape input from 4-channels to 3-channels or 1-channel and reshape to 4-channel in your model first layer.
And rknn config mean and std with '0 0 0 1'
回复

使用道具 举报

jefferyzhang

版主

积分
13005
沙发
发表于 2020-3-30 21:33:45 | 显示全部楼层
nvnn 发表于 2020-3-30 21:27
Could you please elaborate more about this? what do you mean by reshape input from 4-channels to 3 ...

More or less. For example, if you use tf.keras, input is yuyv422  100*100*2, you can design your net like:

model = keras.Sequential([
    keras.layers.Input(100*100*2),
    keras.layers.Reshape((100, 100, 2))
    ...
])

and feed model with flattened input.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表