tqdm.auto to support notebook

This commit is contained in:
Ruben van de Ven 2023-04-13 13:11:58 +02:00
parent 5deac894a5
commit ecbe041041

View file

@ -5,7 +5,7 @@ import cv2
import logging import logging
import argparse import argparse
import tqdm from tqdm.auto import tqdm
import motmetrics as mm import motmetrics as mm
import torch import torch
@ -85,7 +85,7 @@ def eval_seq(opt, dataloader, data_type, result_filename, save_dir=None, save_im
timer = Timer() timer = Timer()
results = [] results = []
frame_id = -1 frame_id = -1
for path, img, img0 in tqdm.tqdm(dataloader): for path, img, img0 in tqdm(dataloader):
frame_id += 1 frame_id += 1
# if frame_id % 20 == 0: # if frame_id % 20 == 0:
# logger.info('Processing frame {} ({:.2f} fps)'.format(frame_id, 1./max(1e-5, timer.average_time))) # logger.info('Processing frame {} ({:.2f} fps)'.format(frame_id, 1./max(1e-5, timer.average_time)))