Skip to content

Commit 27ee6c3

Browse files
committed
added requirements file
1 parent 93c52cb commit 27ee6c3

File tree

3 files changed

+123
-2
lines changed

3 files changed

+123
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Note the other flags and their (default values)
4444
* `--save_overlay` (True) - Save out segmentation output map on eye video
4545
* `--eval_on_cpu` (False) - If no GPU available or found, EllSeg can also be evaluated using CPU
4646
* `--load_file` (./weights/all.git_ok) - Choose a weight configuration. Default is *all* which was trained on a combination of all available datasets
47-
* `--check_for_string_in_fname` ('') - Only evaluate on videos with a user defined string. Example `--check_for_string_in_fname=eye` will evaluate on eye videos only
47+
* `--check_for_string_in_fname` ('') - Only evaluate on videos with a user defined string. Example `--check_for_string_in_fname=eye` will evaluate on videos with <eye> within it
4848

4949
# Try it out on your eye images!
5050
Coming soon!

evaluate_ellseg.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ def evaluate_ellseg_per_video(path_vid, args, model):
209209
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
210210
vid_out = cv2.VideoWriter(path_vid_out, fourcc, int(FR), (int(W), int(H)))
211211

212+
# Dictionary to save output ellipses
213+
ellipse_out_dict = {}
214+
212215
ret = True
213216
pbar = tqdm(total=FR_COUNT)
214217

@@ -226,19 +229,29 @@ def evaluate_ellseg_per_video(path_vid, args, model):
226229
seg_map, latent, pupil_ellipse, iris_ellipse = evaluate_ellseg_on_image(input_tensor, model)
227230

228231
# Return ellipse predictions back to original dimensions
229-
seg_map, pupil_ellipse, iris_ellipse = rescale_to_original(seg_map, pupil_ellipse, iris_ellipse, scale_shift, frame.shape)
232+
seg_map, pupil_ellipse, iris_ellipse = rescale_to_original(seg_map,
233+
pupil_ellipse,
234+
iris_ellipse,
235+
scale_shift,
236+
frame.shape)
230237

231238
# Generate visuals
232239
frame_overlayed_with_op = plot_segmap_ellpreds(frame, seg_map, pupil_ellipse, iris_ellipse)
233240
vid_out.write(frame_overlayed_with_op[..., ::-1])
234241

242+
# Append to dictionary
243+
ellipse_out_dict[counter] = {'pupil': pupil_ellipse, 'iris': iris_ellipse}
244+
235245
pbar.update(1)
236246
counter+=1
237247

238248
vid_out.close()
239249
vid_obj.close()
240250
pbar.close()
241251

252+
# Save out ellipse dictionary
253+
np.save(os.path.join(path_dir, file_name+'_pred.npy'), ellipse_out_dict)
254+
242255
return True
243256

244257

requirements.txt

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# This file may be used to create an environment using:
2+
# $ conda create --name <env> --file <this file>
3+
# platform: linux-64
4+
_libgcc_mutex=0.1=main
5+
blas=1.0=mkl
6+
blosc=1.20.1=he1b5a44_0
7+
bzip2=1.0.8=h7b6447c_0
8+
ca-certificates=2021.1.19=h06a4308_0
9+
cairo=1.14.12=h8948797_3
10+
certifi=2020.12.5=py36h5fab9bb_1
11+
cffi=1.14.4=py36h261ae71_0
12+
cloudpickle=1.6.0=py_0
13+
cudatoolkit=9.2=0
14+
cycler=0.10.0=py36_0
15+
cytoolz=0.11.0=py36h7b6447c_0
16+
dask-core=2021.1.1=pyhd3eb1b0_0
17+
dbus=1.13.18=hb2f20db_0
18+
decorator=4.4.2=py_0
19+
deepdish=0.3.6=pyh9f0ad1d_0
20+
expat=2.2.10=he6710b0_2
21+
ffmpeg=4.0=hcdf2ecd_0
22+
fontconfig=2.13.0=h9420a91_0
23+
freeglut=3.0.0=hf484d3e_5
24+
freetype=2.10.4=h5ab3b9f_0
25+
glib=2.66.1=h92f7085_0
26+
graphite2=1.3.14=h23475e2_0
27+
gst-plugins-base=1.14.0=h8213a91_2
28+
gstreamer=1.14.0=h28cd5cc_2
29+
h5py=2.8.0=py36h989c5e5_3
30+
harfbuzz=1.8.8=hffaf4a1_0
31+
hdf5=1.10.2=hba1933b_1
32+
icu=58.2=he6710b0_3
33+
imageio=2.9.0=py_0
34+
intel-openmp=2020.2=254
35+
jasper=2.0.14=h07fcdf6_1
36+
joblib=1.0.0=pyhd3eb1b0_0
37+
jpeg=9b=h024ee3a_2
38+
kiwisolver=1.3.0=py36h2531618_0
39+
lcms2=2.11=h396b838_0
40+
ld_impl_linux-64=2.33.1=h53a641e_7
41+
libedit=3.1.20191231=h14c3975_1
42+
libffi=3.3=he6710b0_2
43+
libgcc-ng=9.1.0=hdf63c60_0
44+
libgfortran-ng=7.3.0=hdf63c60_0
45+
libglu=9.0.0=hf484d3e_1
46+
libopencv=3.4.2=hb342d67_1
47+
libopus=1.3.1=h7b6447c_0
48+
libpng=1.6.37=hbc83047_0
49+
libstdcxx-ng=9.1.0=hdf63c60_0
50+
libtiff=4.1.0=h2733197_1
51+
libuuid=1.0.3=h1bed415_2
52+
libvpx=1.7.0=h439df22_0
53+
libxcb=1.14=h7b6447c_0
54+
libxml2=2.9.10=hb55368b_3
55+
lz4-c=1.9.3=h2531618_0
56+
lzo=2.10=h516909a_1000
57+
matplotlib=3.1.0=py36h5429711_0
58+
matplotlib-base=3.3.2=py36h817c723_0
59+
mkl=2020.2=256
60+
mkl-service=2.3.0=py36he8ac12f_0
61+
mkl_fft=1.2.0=py36h23d657b_0
62+
mkl_random=1.1.1=py36h0573a6f_0
63+
ncurses=6.2=he6710b0_1
64+
networkx=2.5=py_0
65+
ninja=1.10.2=py36hff7bd54_0
66+
numexpr=2.7.1=py36h7c3b610_3
67+
numpy=1.19.2=py36h54aff64_0
68+
numpy-base=1.19.2=py36hfa32c7d_0
69+
olefile=0.46=py36_0
70+
opencv=3.4.2=py36h6fd60c2_1
71+
openssl=1.1.1i=h27cfd23_0
72+
pcre=8.44=he6710b0_0
73+
pillow=8.1.0=py36he98fc37_0
74+
pip=20.3.3=py36h06a4308_0
75+
pixman=0.40.0=h7b6447c_0
76+
py-opencv=3.4.2=py36hb342d67_1
77+
pycparser=2.20=py_2
78+
pyparsing=2.4.7=pyhd3eb1b0_0
79+
pyqt=5.9.2=py36h05f1152_2
80+
pytables=3.4.4=py36h4f72b40_1
81+
python=3.6.12=hcff3b4d_2
82+
python-dateutil=2.8.1=py_0
83+
python_abi=3.6=1_cp36m
84+
pytorch=1.2.0=py3.6_cuda9.2.148_cudnn7.6.2_0
85+
pytz=2020.5=pyhd3eb1b0_0
86+
pywavelets=1.1.1=py36h7b6447c_2
87+
pyyaml=5.4.1=py36h27cfd23_1
88+
qt=5.9.7=h5867ecd_1
89+
readline=8.0=h7b6447c_0
90+
scikit-image=0.17.2=py36hdf5156a_0
91+
scikit-learn=0.23.2=py36h0573a6f_0
92+
scipy=1.5.2=py36h0b6359f_0
93+
setuptools=52.0.0=py36h06a4308_0
94+
sip=4.19.8=py36hf484d3e_0
95+
six=1.15.0=py36h06a4308_0
96+
sqlite=3.33.0=h62c20be_0
97+
threadpoolctl=2.1.0=pyh5ca1d4c_0
98+
tifffile=2020.10.1=py36hdd07704_2
99+
tk=8.6.10=hbc83047_0
100+
toolz=0.11.1=pyhd3eb1b0_0
101+
torchvision=0.4.0=py36_cu92
102+
tornado=6.1=py36h27cfd23_0
103+
tqdm=4.56.0=pyhd3eb1b0_0
104+
wheel=0.36.2=pyhd3eb1b0_0
105+
xz=5.2.5=h7b6447c_0
106+
yaml=0.2.5=h7b6447c_0
107+
zlib=1.2.11=h7b6447c_3
108+
zstd=1.4.5=h9ceee32_0

0 commit comments

Comments
 (0)