mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 17:17:14 +08:00
Rename fastdeploy_runtime.h to runtime.h and Frontend to ModelFormat (#263)
rename frontend to model_format
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
import logging
|
||||
from .... import FastDeployModel, Frontend
|
||||
from .... import FastDeployModel, ModelFormat
|
||||
from .... import c_lib_wrap as C
|
||||
|
||||
|
||||
@@ -23,13 +23,13 @@ class SCRFD(FastDeployModel):
|
||||
model_file,
|
||||
params_file="",
|
||||
runtime_option=None,
|
||||
model_format=Frontend.ONNX):
|
||||
model_format=ModelFormat.ONNX):
|
||||
# 调用基函数进行backend_option的初始化
|
||||
# 初始化后的option保存在self._runtime_option
|
||||
super(SCRFD, self).__init__(runtime_option)
|
||||
|
||||
self._model = C.vision.facedet.SCRFD(
|
||||
model_file, params_file, self._runtime_option, model_format)
|
||||
self._model = C.vision.facedet.SCRFD(model_file, params_file,
|
||||
self._runtime_option, model_format)
|
||||
# 通过self.initialized判断整个模型的初始化是否成功
|
||||
assert self.initialized, "SCRFD initialize failed."
|
||||
|
||||
@@ -108,21 +108,19 @@ class SCRFD(FastDeployModel):
|
||||
@is_mini_pad.setter
|
||||
def is_mini_pad(self, value):
|
||||
assert isinstance(
|
||||
value,
|
||||
bool), "The value to set `is_mini_pad` must be type of bool."
|
||||
value, bool), "The value to set `is_mini_pad` must be type of bool."
|
||||
self._model.is_mini_pad = value
|
||||
|
||||
@is_scale_up.setter
|
||||
def is_scale_up(self, value):
|
||||
assert isinstance(
|
||||
value,
|
||||
bool), "The value to set `is_scale_up` must be type of bool."
|
||||
value, bool), "The value to set `is_scale_up` must be type of bool."
|
||||
self._model.is_scale_up = value
|
||||
|
||||
@stride.setter
|
||||
def stride(self, value):
|
||||
assert isinstance(
|
||||
value, int), "The value to set `stride` must be type of int."
|
||||
assert isinstance(value,
|
||||
int), "The value to set `stride` must be type of int."
|
||||
self._model.stride = value
|
||||
|
||||
@downsample_strides.setter
|
||||
|
Reference in New Issue
Block a user