Skip to content

Commit 47600ec

Browse files
Feri73maimonlab default
andauthored
Solves the bug of processing the initial frame twice (#42)
* solves the bug of processing the initial frame twice * solves a bug Co-authored-by: maimonlab default <[email protected]>
1 parent d8acac6 commit 47600ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dlclive/dlclive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def init_inference(self, frame=None, **kwargs):
265265
if frame is not None:
266266
if frame.ndim == 2:
267267
self.convert2rgb = True
268-
frame = self.process_frame(frame)
268+
processed_frame = self.process_frame(frame)
269269

270270
# load model
271271

@@ -293,7 +293,7 @@ def init_inference(self, frame=None, **kwargs):
293293
model_file,
294294
["Placeholder"],
295295
output_nodes,
296-
input_shapes={"Placeholder": [1, frame.shape[0], frame.shape[1], 3]},
296+
input_shapes={"Placeholder": [1, processed_frame.shape[0], processed_frame.shape[1], 3]},
297297
)
298298
try:
299299
tflite_model = converter.convert()

0 commit comments

Comments
 (0)