- from rknn.api import RKNN
- INPUT_SIZE = 160
- if __name__ == '__main__':
- # Create RKNN object
- rknn = RKNN()
- # Config for Model Input PreProcess
- rknn.config(channel_mean_value='0 0 0 1', reorder_channel='0 1 2')
- print('config done')
- #load tensorflow model
- print('--> Loading model')
- rknn.load_tensorflow(tf_pb='./20180402-114759.pb',
- inputs=['input'],
- outputs=['InceptionResnetV1/Bottleneck/BatchNorm/Reshape_1'],
- input_size_list=[[INPUT_SIZE, INPUT_SIZE, 3]])
- print('done')
- # Build Model
- print('--> Building model')
- rknn.build(do_quantization=False)
- print('done')
- # Export RKNN Model
- rknn.export_rknn('./facenet2.rknn')
- rknn.release()
复制代码
sunkai 发表于 2021-4-2 14:08
论坛上关于facenet转换的帖子太少,只好发帖求助了
ccgunner 发表于 2021-4-9 11:39
from rknn.api import RKNN
INPUT_SIZE = 160
欢迎光临 Toybrick (https://t.rock-chips.com/) | Powered by Discuz! X3.3 |