Track mode: more sensitive face detection + longer smoothing window
This commit is contained in:
parent
400f6dbb6d
commit
64e8854cea
@ -72,7 +72,7 @@ def detect_face_centers(video_path, sample_fps=5):
|
||||
ts = frame_idx / src_fps
|
||||
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
|
||||
faces = face_cascade.detectMultiScale(
|
||||
gray, scaleFactor=1.2, minNeighbors=5, minSize=(60, 60)
|
||||
gray, scaleFactor=1.1, minNeighbors=3, minSize=(40, 40)
|
||||
)
|
||||
if len(faces) > 0:
|
||||
# Vzemi največji obraz
|
||||
@ -247,7 +247,7 @@ def main():
|
||||
samples, _, _, _, _ = detect_face_centers(work_input, sample_fps=5)
|
||||
n_with_face = sum(1 for _, x in samples if x is not None)
|
||||
print(f" {n_with_face}/{len(samples)} vzorcev z obrazom")
|
||||
x_at = smooth_track(samples, info["duration"], smoothing_window=2.0)
|
||||
x_at = smooth_track(samples, info["duration"], smoothing_window=4.0)
|
||||
vfilter = build_track_filter(info, x_at, args.target_width, args.target_height, info["fps"])
|
||||
elif args.mode == "center":
|
||||
vfilter = build_center_filter(info, args.target_width, args.target_height)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user