[~] Refactor

This commit is contained in:
Siarhei Siniak 2021-08-02 15:48:06 +03:00
parent ea94aa1a86
commit b26cfc17dc

@ -1839,7 +1839,11 @@ def kernel_30(
video_path=None, video_path=None,
low_portion=None, low_portion=None,
low_mean_conf=None, low_mean_conf=None,
no_dots=None,
): ):
if no_dits is None:
no_dots = False
if low_portion is None: if low_portion is None:
low_portion = 0.1 low_portion = 0.1
if low_mean_conf is None: if low_mean_conf is None:
@ -2017,7 +2021,10 @@ def kernel_30(
cap.set(cv2.CAP_PROP_POS_FRAMES, t3) cap.set(cv2.CAP_PROP_POS_FRAMES, t3)
ret, frame = cap.read() ret, frame = cap.read()
t4 = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) t4 = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
if not no_dots:
t6 = kernel_24(t4, t2)['t3'] t6 = kernel_24(t4, t2)['t3']
else:
t6 = t4
t7.append(t6) t7.append(t6)
finally: finally:
if not cap is None: if not cap is None:
@ -2370,6 +2377,7 @@ def kernel_38(
delay=None, delay=None,
low_mean_conf=None, low_mean_conf=None,
low_portion=None, low_portion=None,
no_dots=None,
): ):
if ids is None: if ids is None:
ids = 'v7' ids = 'v7'
@ -2420,6 +2428,7 @@ def kernel_38(
video_path=t1, video_path=t1,
low_mean_conf=low_mean_conf, low_mean_conf=low_mean_conf,
low_portion=low_portion, low_portion=low_portion,
no_dots=no_dots,
) )
return dict( return dict(