Skip to content

Commit

Permalink
Merge pull request #59 from gshubham533/master
Browse files Browse the repository at this point in the history
tqdm progress bar bug
Thanks a lot!
  • Loading branch information
JustinShenk authored Jul 26, 2023
2 parents 8dc4584 + 25e06ae commit eea2c8e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/fer/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,12 @@ def analyze(
if save_video:
self.videowriter = self._save_video(outfile, fps, width, height)

total_frames = length
if frequency > 1:
total_frames = length/frequency

with logging_redirect_tqdm():
pbar = tqdm(total=length, unit="frames")
pbar = tqdm(total=total_frames, unit="frames")

while self.cap.isOpened():
ret, frame = self.cap.read()
Expand Down

0 comments on commit eea2c8e

Please sign in to comment.