felipekitamura commited on
Commit
c61d876
1 Parent(s): 2167878

Update face_deid_ct.py

Browse files
Files changed (1) hide show
  1. face_deid_ct.py +4 -4
face_deid_ct.py CHANGED
@@ -4,7 +4,7 @@ import numpy as np
4
  import cv2
5
  from matplotlib import pyplot as plt
6
  import random
7
- from tqdm import tqdm
8
  import time
9
 
10
  FACE_MAX_VALUE = 50
@@ -216,9 +216,9 @@ def drown_volume(in_path, out_path='deid_ct', replacer='face'):
216
 
217
  dirs = list_dicom_directories(in_path)
218
 
219
- for _d in tqdm(dirs):
220
 
221
- with tqdm(total=8, desc="Processing DICOM Files", ncols=80) as pbar:
222
  # Load the DICOM files
223
  slices = load_scan(_d)
224
  pbar.update()
@@ -264,4 +264,4 @@ def drown_volume(in_path, out_path='deid_ct', replacer='face'):
264
  pbar.update()
265
 
266
  elapsed_time = time.time() - start_time
267
- print(f"Total elapsed time for 1 study: {elapsed_time} seconds")
 
4
  import cv2
5
  from matplotlib import pyplot as plt
6
  import random
7
+ from tqdm.notebook import tqdm
8
  import time
9
 
10
  FACE_MAX_VALUE = 50
 
216
 
217
  dirs = list_dicom_directories(in_path)
218
 
219
+ for _d in tqdm(dirs, desc="List of studies"):
220
 
221
+ with tqdm(total=8, desc="Processing DICOM Files", leave=False) as pbar:
222
  # Load the DICOM files
223
  slices = load_scan(_d)
224
  pbar.update()
 
264
  pbar.update()
265
 
266
  elapsed_time = time.time() - start_time
267
+ print(f"Total elapsed time: {elapsed_time} seconds")