diff --git a/benchmark/benchmark_ppdet.py b/benchmark/benchmark_ppdet.py index 8f7033db4..6544c7e60 100755 --- a/benchmark/benchmark_ppdet.py +++ b/benchmark/benchmark_ppdet.py @@ -17,7 +17,7 @@ import cv2 import os import numpy as np import time - +from tqdm import tqdm def parse_arguments(): import argparse @@ -263,6 +263,9 @@ if __name__ == '__main__': elif "yolov3" in args.model: model = fd.vision.detection.YOLOv3( model_file, params_file, config_file, runtime_option=option) + elif "yolov8" in args.model: + model = fd.vision.detection.PaddleYOLOv8( + model_file, params_file, config_file, runtime_option=option) elif "ppyolo_r50vd_dcn_1x_coco" in args.model or "ppyolov2_r101vd_dcn_365e_coco" in args.model: model = fd.vision.detection.PPYOLO( model_file, params_file, config_file, runtime_option=option) @@ -284,7 +287,7 @@ if __name__ == '__main__': model.enable_record_time_of_runtime() im_ori = cv2.imread(args.image) - for i in range(args.iter_num): + for i in tqdm(range(args.iter_num)): im = im_ori start = time.time() result = model.predict(im) diff --git a/fastdeploy/vision/detection/ppdet/model.h b/fastdeploy/vision/detection/ppdet/model.h index a3797bdb8..1a33c4771 100755 --- a/fastdeploy/vision/detection/ppdet/model.h +++ b/fastdeploy/vision/detection/ppdet/model.h @@ -253,7 +253,7 @@ class FASTDEPLOY_DECL PaddleYOLOv8 : public PPDetBase { const ModelFormat& model_format = ModelFormat::PADDLE) : PPDetBase(model_file, params_file, config_file, custom_option, model_format) { - valid_cpu_backends = {Backend::OPENVINO, Backend::ORT, Backend::PDINFER}; + valid_cpu_backends = {Backend::OPENVINO, Backend::ORT, Backend::PDINFER, Backend::LITE}; valid_gpu_backends = {Backend::ORT, Backend::PDINFER, Backend::TRT}; valid_kunlunxin_backends = {Backend::LITE}; initialized = Initialize();