[Lite] Support PaddleYOLOv8 with Lite Backend (#1145)

* [Model] Support PaddleYOLOv8 model

* [YOLOv8] Add PaddleYOLOv8 pybind

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

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

* Remove all lite options in RuntimeOption

* Fix code error

* move pybind

* Fix build error

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

* add fp16 cuda kernel

* fix code bug

* update code

* [Doc] Fix KunlunXin doc (#1139)

fix kunlunxin doc

* [Model] Support PaddleYOLOv8 model (#1136)

Co-authored-by: Jason <jiangjiajun@baidu.com>
Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com>

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

* [Model] Support PaddleYOLOv8 model

* [YOLOv8] Add PaddleYOLOv8 pybind

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

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

* Remove all lite options in RuntimeOption

* Fix code error

* move pybind

* Fix build error

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

* add fp16 cuda kernel

* fix code bug

* update code

* [Doc] Fix KunlunXin doc (#1139)

fix kunlunxin doc

* [Model] Support PaddleYOLOv8 model (#1136)

Co-authored-by: Jason <jiangjiajun@baidu.com>
Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com>

Co-authored-by: Jason <jiangjiajun@baidu.com>
Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com>

Co-authored-by: Jason <jiangjiajun@baidu.com>
Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com>

* [benchmark] add PaddleYOLOv8 -> benchmark

* [benchmark] add PaddleYOLOv8 -> benchmark

* [Lite] Support PaddleYOLOv8 with Lite Backend

Co-authored-by: Jason <jiangjiajun@baidu.com>
Co-authored-by: yeliang2258 <30516196+yeliang2258@users.noreply.github.com>
This commit is contained in:
DefTruth
2023-01-14 20:44:10 +08:00
committed by GitHub
parent c797d3114e
commit f969967179
2 changed files with 6 additions and 3 deletions

View File

@@ -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)

View File

@@ -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();