Skip to content

Commit

Permalink
[Lite] Support PaddleYOLOv8 with Lite Backend (PaddlePaddle#1145)
Browse files Browse the repository at this point in the history
* [Model] Support PaddleYOLOv8 model

* [YOLOv8] Add PaddleYOLOv8 pybind

* [Other] update from latest develop (#30)

* [Backend] Remove all lite options in RuntimeOption (PaddlePaddle#1109)

* Remove all lite options in RuntimeOption

* Fix code error

* move pybind

* Fix build error

* [Backend] Add TensorRT  FP16 support for AdaptivePool2d (PaddlePaddle#1116)

* add fp16 cuda kernel

* fix code bug

* update code

* [Doc] Fix KunlunXin doc (PaddlePaddle#1139)

fix kunlunxin doc

* [Model] Support PaddleYOLOv8 model (PaddlePaddle#1136)

Co-authored-by: Jason <[email protected]>
Co-authored-by: yeliang2258 <[email protected]>

* [YOLOv8] add PaddleYOLOv8 pybind11 (PaddlePaddle#1144) (#31)

* [Model] Support PaddleYOLOv8 model

* [YOLOv8] Add PaddleYOLOv8 pybind

* [Other] update from latest develop (#30)

* [Backend] Remove all lite options in RuntimeOption (PaddlePaddle#1109)

* Remove all lite options in RuntimeOption

* Fix code error

* move pybind

* Fix build error

* [Backend] Add TensorRT  FP16 support for AdaptivePool2d (PaddlePaddle#1116)

* add fp16 cuda kernel

* fix code bug

* update code

* [Doc] Fix KunlunXin doc (PaddlePaddle#1139)

fix kunlunxin doc

* [Model] Support PaddleYOLOv8 model (PaddlePaddle#1136)

Co-authored-by: Jason <[email protected]>
Co-authored-by: yeliang2258 <[email protected]>

Co-authored-by: Jason <[email protected]>
Co-authored-by: yeliang2258 <[email protected]>

Co-authored-by: Jason <[email protected]>
Co-authored-by: yeliang2258 <[email protected]>

* [benchmark] add PaddleYOLOv8 -> benchmark

* [benchmark] add PaddleYOLOv8 -> benchmark

* [Lite] Support PaddleYOLOv8 with Lite Backend

Co-authored-by: Jason <[email protected]>
Co-authored-by: yeliang2258 <[email protected]>
  • Loading branch information
3 people authored Jan 14, 2023
1 parent c797d31 commit f969967
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions benchmark/benchmark_ppdet.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import os
import numpy as np
import time

from tqdm import tqdm

def parse_arguments():
import argparse
Expand Down Expand Up @@ -263,6 +263,9 @@ def cpu_stat_func(self, q, pid, interval=0.0):
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)
Expand All @@ -284,7 +287,7 @@ def cpu_stat_func(self, q, pid, interval=0.0):

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)
Expand Down
2 changes: 1 addition & 1 deletion fastdeploy/vision/detection/ppdet/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f969967

Please sign in to comment.