File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -120,15 +120,15 @@ def _export_openvino_ir(self) -> Path:
120
120
scale_values_str = ""
121
121
for name , inp in self .inputs .items ():
122
122
# Append mean values in a similar style
123
- if inp .mean_values is not None :
123
+ if inp .is_color_input and inp . mean_values is not None :
124
124
if mean_values_str :
125
125
mean_values_str += ","
126
126
mean_values_str += (
127
127
f"{ name } [{ ', ' .join (str (v ) for v in inp .mean_values )} ]"
128
128
)
129
129
130
130
# Append scale values in a similar style
131
- if inp .scale_values is not None :
131
+ if inp .is_color_input and inp . scale_values is not None :
132
132
if scale_values_str :
133
133
scale_values_str += ","
134
134
scale_values_str += (
Original file line number Diff line number Diff line change @@ -141,6 +141,10 @@ class InputConfig(OutputConfig):
141
141
def encoding_mismatch (self ) -> bool :
142
142
return self .encoding .from_ != self .encoding .to
143
143
144
+ @property
145
+ def is_color_input (self ) -> bool :
146
+ return self .encoding .from_ in {Encoding .RGB , Encoding .BGR }
147
+
144
148
@model_validator (mode = "after" )
145
149
def _validate_grayscale_inputs (self ) -> Self :
146
150
if self .layout is None :
You can’t perform that action at this time.
0 commit comments