mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 00:33:03 +08:00
[Model] Refactoring code of YOLOv5Cls with new model type (#1237)
* Refactoring code of YOLOv5Cls with new model type * fix reviewed problem * Normalize&HWC2CHW -> NormalizeAndPermute * remove cast()
This commit is contained in:
@@ -44,8 +44,9 @@ args = parse_arguments()
|
||||
runtime_option = build_option(args)
|
||||
model = fd.vision.classification.YOLOv5Cls(
|
||||
args.model, runtime_option=runtime_option)
|
||||
model.postprocessor.topk = args.topk
|
||||
|
||||
# 预测图片分类结果
|
||||
im = cv2.imread(args.image)
|
||||
result = model.predict(im, args.topk)
|
||||
result = model.predict(im)
|
||||
print(result)
|
||||
|
Reference in New Issue
Block a user