@@ -44,13 +44,13 @@ def __init__(
44
44
unclip_ratio : Union [float , None ] = None ,
45
45
use_dilation : Union [bool , None ] = None ,
46
46
) -> None :
47
- if limit_type is not None :
47
+ if limit_type != "max" :
48
48
logging .warning (
49
- "The default value for `limit_type` is max, and cannot be set in PaddleX HPI."
49
+ "The default value for `limit_type` is max, and cannot be changed in PaddleX HPI."
50
50
)
51
- if max_candidates is not None :
51
+ if max_candidates != "1000" :
52
52
logging .warning (
53
- "The default value for `max_candidates` is 1000, and cannot be set in PaddleX HPI."
53
+ "The default value for `max_candidates` is 1000, and cannot be changed in PaddleX HPI."
54
54
)
55
55
super ().__init__ (
56
56
model_dir = model_dir ,
@@ -106,13 +106,13 @@ def process(
106
106
unclip_ratio : Union [float , None ] = None ,
107
107
use_dilation : Union [bool , None ] = None ,
108
108
) -> Dict [str , List [Any ]]:
109
- if limit_type is not None :
109
+ if limit_type != "max" :
110
110
logging .warning (
111
- "The default value for `limit_type` is max, and cannot be set in PaddleX HPI."
111
+ "The default value for `limit_type` is max, and cannot be changed in PaddleX HPI."
112
112
)
113
- if max_candidates is not None :
113
+ if max_candidates != "1000" :
114
114
logging .warning (
115
- "The default value for `max_candidates` is 1000, and cannot be set in PaddleX HPI."
115
+ "The default value for `max_candidates` is 1000, and cannot be changed in PaddleX HPI."
116
116
)
117
117
self ._ui_model .preprocessor .set_normalize (self ._mean , self ._std , True )
118
118
self ._ui_model .preprocessor .max_side_len = (
0 commit comments