Spaces:
Sleeping
Sleeping
felipekitamura
commited on
Commit
•
16c409e
1
Parent(s):
c61d876
Update face_deid_ct.py
Browse files- face_deid_ct.py +15 -1
face_deid_ct.py
CHANGED
@@ -4,9 +4,23 @@ import numpy as np
|
|
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
|
11 |
FACE_MIN_VALUE = -125
|
12 |
|
|
|
4 |
import cv2
|
5 |
from matplotlib import pyplot as plt
|
6 |
import random
|
|
|
7 |
import time
|
8 |
+
import tqdm
|
9 |
+
from IPython.core.display import display, HTML
|
10 |
+
|
11 |
+
# Determine if we are in a Jupyter notebook
|
12 |
+
try:
|
13 |
+
shell = get_ipython().__class__.__name__
|
14 |
+
if shell == 'ZMQInteractiveShell':
|
15 |
+
# We are in Jupyter, use tqdm.notebook
|
16 |
+
from tqdm.notebook import tqdm
|
17 |
+
else:
|
18 |
+
raise Exception()
|
19 |
+
except:
|
20 |
+
# We are in a terminal, use standard tqdm
|
21 |
+
from tqdm import tqdm
|
22 |
|
23 |
+
|
24 |
FACE_MAX_VALUE = 50
|
25 |
FACE_MIN_VALUE = -125
|
26 |
|