目的:caffe模型转成paddle模型,再导出模型供其他sdk调用。
Created by: MichaelZhero
模型链接:https://github.com/lsy17096535/face-landmark/tree/master/model
!x2paddle --framework=caffe --prototxt=work/landmark_deploy.prototxt --weight=work/VanFace.caffemodel --save_dir=work/pd_model 可以生成两个文件:inference_model和model_with_code
#命令行# !paddlex --export_inference --model_dir=work/pd_model/inference_model --save_dir=inference_model
报错 /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp Traceback (most recent call last): File "/opt/conda/envs/python35-paddle120-env/bin/paddlex", line 10, in sys.exit(main()) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/command.py", line 122, in main model = pdx.load_model(args.model_dir, fixed_input_shape) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/models/load_model.py", line 32, in load_model raise Exception("There's not model.yml in {}".format(model_dir)) Exception: There's not model.yml in work/pd_model/inference_model