# Load onnx model
print('--> Loading model')
ret = rknn.load_onnx(model='./ssd.onnx')
if ret != 0:
print('Load mobilenet_v2 failed! Ret = {}'.format(ret))
exit(ret)
print('done')
# Build model
print('--> Building model')
ret = rknn.build(do_quantization=True, dataset='./dataset.txt')
if ret != 0:
print('Build ssd failed!')
exit(ret)
print('done')
# Export rknn model
print('--> Export RKNN model')
ret = rknn.export_rknn('./ssd.rknn')
if ret != 0:
print('Export ssd.rknn failed!')
exit(ret)
print('done')