⚡️An Easy-to-use and Fast Deep Learning Model Deployment Toolkit for ☁️Cloud 📱Mobile and 📹Edge. Including Image, Video, Text and Audio 20+ main stream scenarios and 150+ SOTA models with end-to-end optimization, multi-platform and multi-framework support.
import cv2
import fastdeploy.vision as vision
model = vision.detection.MaskRCNN("E:/PaddlePaddle/PaddleDetection/output_dir_inference_model/mask_rcnn_r50_vd_fpn_ssld_1x_coco/model.pdmodel",
"E:/PaddlePaddle/PaddleDetection/output_dir_inference_model/mask_rcnn_r50_vd_fpn_ssld_1x_coco/model.pdiparams",
"E:/PaddlePaddle/PaddleDetection/output_dir_inference_model/mask_rcnn_r50_vd_fpn_ssld_1x_coco/infer_cfg.yml")
im = cv2.imread(r"E:/20231214_10010118.jpg")
result = model.predict(im)
print(result)
vis_im = vision.vis_detection(im, result, score_threshold=0.5)
cv2.imwrite("vis_image.jpg", vis_im)
[INFO] fastdeploy/vision/common/processors/transform.cc(159)::fastdeploy::vision::FuseNormalizeColorConvert BGR2RGB and Normalize are fused to Normalize with swap_rb=1
WARNING: Logging before InitGoogleLogging() is written to STDERR
W1219 12:03:14.043656 17448 analysis_config.cc:971] It is detected that mkldnn and memory_optimize_pass are enabled at the same time, but they are not supported yet. Currently, memory_optimize_pass is explicitly disabled
[INFO] fastdeploy/runtime/runtime.cc(273)::fastdeploy::Runtime::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::CPU.
Traceback (most recent call last):
File "e:/2023_Code/py_2023/FD/cs.py", line 12, in <module>
result = model.predict(im)
File "E:\anaconda3\envs\paddlepaddle\lib\site-packages\fastdeploy\vision\detection\ppdet\__init__.py", line 126, in predict
return self._model.predict(im)
RuntimeError: could not create a primitive descriptor for a reorder primitive
温馨提示:根据社区不完全统计,按照模板提问,可以加快回复和解决问题的速度
环境
问题日志及出现问题的操作流程