Add detection and segmentation examples for Ascend deployment

This commit is contained in:
yunyaoXYY
2022-12-27 07:40:46 +00:00
parent 76a876406e
commit 090c3a68b4
27 changed files with 280 additions and 26 deletions

View File

@@ -25,6 +25,8 @@ python infer.py --model yolov5s_infer --image 000000014439.jpg --device gpu
python infer.py --model yolov5s_infer --image 000000014439.jpg --device gpu --use_trt True
# 昆仑芯XPU推理
python infer.py --model yolov5s_infer --image 000000014439.jpg --device kunlunxin
# 华为昇腾推理
python infer.py --model yolov5s_infer --image 000000014439.jpg --device ascend
```
运行完成可视化结果如下图所示

View File

@@ -31,6 +31,9 @@ def build_option(args):
if args.device.lower() == "gpu":
option.use_gpu()
if args.device.lower() == "ascend":
option.use_ascend()
if args.use_trt:
option.use_trt_backend()
option.set_trt_input_shape("images", [1, 3, 640, 640])