Skip to content

Commit

Permalink
Added environment.yml file for sharing conda environment
Browse files Browse the repository at this point in the history
  • Loading branch information
samimideksa committed Jul 31, 2018
1 parent e135544 commit 9bf6e65
Show file tree
Hide file tree
Showing 5 changed files with 292 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ log.txt
logs.txt
epoch_number.json
temp-models/*
*.xml
*.iml
.idea/
7 changes: 5 additions & 2 deletions dataset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def has_met_convention(self):
print "Failed to meet convention","test dataset does not contain file_location column"
return False
return True

""" Loads dataset inside given pickle file.
Parameters
----------
Expand All @@ -98,13 +99,13 @@ def get_meta(self,ds_path):
dataframe = pd.read_pickle(ds_path)
dataframe = dataframe.reset_index(drop=True)
return dataframe

"""Checks if all.pkl, train.pkl and test.pkl files exists.
Returns
-------
bool
True if all the files exist. False if at least one of the files missing
"""

def contain_dataset_files(self):
if not os.path.exists(os.path.join(self.config.dataset_dir,"all.pkl")):
print "Failed to meet convention","all.pkl is not inside:"+self.config.dataset_dir
Expand All @@ -116,15 +117,17 @@ def contain_dataset_files(self):
print "Failed to meet convention","test.pkl is not inside:"+self.config.dataset_dir
return False
return True;

@abstractmethod
def meet_convention(self):
raise NotImplementedError("Not implmented")

"""Split the dataset into train and test sets"""
def split_train_test(self,dataset,train_size=0.8):
mask = np.random.rand(len(dataset)) < train_size
train = dataset[mask]
test = dataset[~mask]
return train,test
"""Split the dataset into train, test and validation sets"""
def split_train_test_validation(self,dataframe,train_size=0.8):
train,test_val = self.split_train_test(dataframe,train_size)
test_mask = np.random.rand(len(test_val))< 0.5
Expand Down
6 changes: 3 additions & 3 deletions dataset/aflw.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class AflwDataset(Dataset):
"""

def __init__(self,config):
# self.conn = sqlite3.connect("/home/mtk/dataset/aflw-files/aflw/data/aflw.sqlite")
super(AflwDataset,self).__init__(config)

""" method that resizes image to the same resolution
Expand All @@ -40,9 +39,8 @@ def resize_down_image(self,img,max_img_shape):
else:
scale = img_h/h
img = cv2.resize(img,(int(w),int(h)))
# img = scipy.misc.imresize(img, (int(w),int(h))).astype(np.float32)/255
return img,scale

"""What is this method doing?"""
def selective_search(self,img,min_size=(2200),max_img_size=(24,24),debug=False):
cand_rects = []
img,scale = self.resize_down_image(img,max_img_size)
Expand Down Expand Up @@ -211,11 +209,13 @@ def __init__(self,x,y,w,h):
self.h = h
def area(self):
return self.w * self.h
"""intersection of Ground truth bouinding boxes of images"""
def intersection(self,rect):
x_overlap = max(0, min(rect1[2], rect2[2]) - max(self.x, rect.x));
y_overlap = max(0, min(rect1[3], rect2[3]) - max(rect1[1], rect2[1]));
overlapArea = x_overlap * y_overlap;
return overlapArea
"""Union of predicted bouding boxes of faces"""
def union(self,rect):
assert rect1.shape == (4,) , "rect1 shape should be (4,) and it is "+str(rect1.shape)
assert rect2.shape == (4,) , "rect2 shape should be (4,) and it is "+str(rect2.shape)
Expand Down
2 changes: 1 addition & 1 deletion dataset/celeba.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import print_function
from __future__ import print_function
from dataset import Dataset
import os
from inspect import currentframe, getframeinfo
Expand Down
282 changes: 282 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
name: newenv
channels:
- defaults
dependencies:
- alabaster=0.7.10=py27he5a193a_0
- anaconda=5.2.0=py27_3
- anaconda-client=1.6.14=py27_0
- anaconda-project=0.8.2=py27h236b58a_0
- asn1crypto=0.24.0=py27_0
- astroid=1.6.3=py27_0
- astropy=2.0.6=py27h3010b51_1
- attrs=18.1.0=py27_0
- babel=2.5.3=py27_0
- backports=1.0=py27h63c9359_1
- backports.functools_lru_cache=1.5=py27_1
- backports.shutil_get_terminal_size=1.0.0=py27h5bc021e_2
- backports_abc=0.5=py27h7b3c97b_0
- beautifulsoup4=4.6.0=py27h3f86ba9_1
- bitarray=0.8.1=py27h14c3975_1
- bkcharts=0.2=py27h241ae91_0
- blas=1.0=mkl
- blaze=0.11.3=py27h5f341da_0
- bleach=2.1.3=py27_0
- blosc=1.14.3=hdbcaa40_0
- bokeh=0.12.16=py27_0
- boto=2.48.0=py27h9556ac2_1
- bottleneck=1.2.1=py27h21b16a3_0
- bzip2=1.0.6=h14c3975_5
- ca-certificates=2018.03.07=0
- cairo=1.14.12=h7636065_2
- cdecimal=2.3=py27h14c3975_3
- certifi=2018.4.16=py27_0
- cffi=1.11.5=py27h9745a5d_0
- chardet=3.0.4=py27hfa10054_1
- click=6.7=py27h4225b90_0
- cloudpickle=0.5.3=py27_0
- clyent=1.2.2=py27h7276e6c_1
- colorama=0.3.9=py27h5cde069_0
- configparser=3.5.0=py27h5117587_0
- contextlib2=0.5.5=py27hbf4c468_0
- cryptography=2.2.2=py27h14c3975_0
- curl=7.60.0=h84994c4_0
- cycler=0.10.0=py27hc7354d3_0
- cython=0.28.2=py27h14c3975_0
- cytoolz=0.9.0.1=py27h14c3975_0
- dask=0.17.5=py27_0
- dask-core=0.17.5=py27_0
- datashape=0.5.4=py27hf507385_0
- dbus=1.13.2=h714fa37_1
- decorator=4.3.0=py27_0
- distributed=1.21.8=py27_0
- docutils=0.14=py27hae222c1_0
- entrypoints=0.2.3=py27h502b47d_2
- enum34=1.1.6=py27h99a27e9_1
- et_xmlfile=1.0.1=py27h75840f5_0
- expat=2.2.5=he0dffb1_0
- fastcache=1.0.2=py27h14c3975_2
- filelock=3.0.4=py27_0
- flask=1.0.2=py27_1
- flask-cors=3.0.4=py27_0
- fontconfig=2.12.6=h49f89f6_0
- freetype=2.8=hab7d2ae_1
- funcsigs=1.0.2=py27h83f16ab_0
- functools32=3.2.3.2=py27h4ead58f_1
- futures=3.2.0=py27h7b459c0_0
- get_terminal_size=1.0.0=haa9412d_0
- gevent=1.3.0=py27h14c3975_0
- glib=2.56.1=h000015b_0
- glob2=0.6=py27hcea9cbd_0
- gmp=6.1.2=h6c8ec71_1
- gmpy2=2.0.8=py27h4cf3fa8_2
- graphite2=1.3.11=h16798f4_2
- greenlet=0.4.13=py27h14c3975_0
- grin=1.2.1=py27_4
- gst-plugins-base=1.14.0=hbbd80ab_1
- gstreamer=1.14.0=hb453b48_1
- h5py=2.7.1=py27ha1f6525_2
- harfbuzz=1.7.6=h5f0a787_1
- hdf5=1.10.2=hba1933b_1
- heapdict=1.0.0=py27_2
- html5lib=1.0.1=py27h5233db4_0
- icu=58.2=h9c2bf20_1
- idna=2.6=py27h5722d68_1
- imageio=2.3.0=py27_0
- imagesize=1.0.0=py27_0
- intel-openmp=2018.0.0=8
- ipaddress=1.0.22=py27_0
- ipykernel=4.8.2=py27_0
- ipython=5.7.0=py27_0
- ipython_genutils=0.2.0=py27h89fb69b_0
- ipywidgets=7.2.1=py27_0
- isort=4.3.4=py27_0
- itsdangerous=0.24=py27hb8295c1_1
- jbig=2.1=hdba287a_0
- jdcal=1.4=py27_0
- jedi=0.12.0=py27_1
- jinja2=2.10=py27h4114e70_0
- jpeg=9b=h024ee3a_2
- jsonschema=2.6.0=py27h7ed5aa4_0
- jupyter=1.0.0=py27_4
- jupyter_client=5.2.3=py27_0
- jupyter_console=5.2.0=py27hc6bee7e_1
- jupyter_core=4.4.0=py27h345911c_0
- jupyterlab=0.32.1=py27_0
- jupyterlab_launcher=0.10.5=py27_0
- kiwisolver=1.0.1=py27hc15e7b5_0
- lazy-object-proxy=1.3.1=py27h682c727_0
- libcurl=7.60.0=h1ad7b7a_0
- libedit=3.1.20170329=h6b74fdf_2
- libffi=3.2.1=hd88cf55_4
- libgcc-ng=7.2.0=hdf63c60_3
- libgfortran-ng=7.2.0=hdf63c60_3
- libpng=1.6.34=hb9fc6fc_0
- libsodium=1.0.16=h1bed415_0
- libssh2=1.8.0=h9cfc8f7_4
- libstdcxx-ng=7.2.0=hdf63c60_3
- libtiff=4.0.9=he85c1e1_1
- libtool=2.4.6=h544aabb_3
- libxcb=1.13=h1bed415_1
- libxml2=2.9.8=h26e45fe_1
- libxslt=1.1.32=h1312cb7_0
- llvmlite=0.23.1=py27hdbcaa40_0
- locket=0.2.0=py27h73929a2_1
- lxml=4.2.1=py27h23eabaa_0
- lzo=2.10=h49e0be7_2
- markupsafe=1.0=py27h97b2822_1
- matplotlib=2.2.2=py27h0e671d2_1
- mccabe=0.6.1=py27h0e7c7be_1
- mistune=0.8.3=py27h14c3975_1
- mkl=2018.0.2=1
- mkl-service=1.1.2=py27hb2d42c5_4
- mkl_fft=1.0.1=py27h3010b51_0
- mkl_random=1.0.1=py27h629b387_0
- more-itertools=4.1.0=py27_0
- mpc=1.0.3=hec55b23_5
- mpfr=3.1.5=h11a74b3_2
- mpmath=1.0.0=py27h9669132_2
- msgpack-python=0.5.6=py27h6bb024c_0
- multipledispatch=0.5.0=py27_0
- nbconvert=5.3.1=py27he041f76_0
- nbformat=4.4.0=py27hed7f2b2_0
- ncurses=6.1=hf484d3e_0
- networkx=2.1=py27_0
- nltk=3.3.0=py27_0
- nose=1.3.7=py27heec2199_2
- notebook=5.5.0=py27_0
- numba=0.38.0=py27h637b7d7_0
- numexpr=2.6.5=py27h7bf3b9c_0
- numpy=1.14.3=py27hcd700cb_1
- numpy-base=1.14.3=py27h9be14a7_1
- numpydoc=0.8.0=py27_0
- odo=0.5.1=py27h9170de3_0
- olefile=0.45.1=py27_0
- openpyxl=2.5.3=py27_0
- openssl=1.0.2o=h20670df_0
- packaging=17.1=py27_0
- pandas=0.23.0=py27h637b7d7_0
- pandoc=1.19.2.1=hea2e7c5_1
- pandocfilters=1.4.2=py27h428e1e5_1
- pango=1.41.0=hd475d92_0
- parso=0.2.0=py27_0
- partd=0.3.8=py27h4e55004_0
- patchelf=0.9=hf79760b_2
- path.py=11.0.1=py27_0
- pathlib2=2.3.2=py27_0
- patsy=0.5.0=py27_0
- pcre=8.42=h439df22_0
- pep8=1.7.1=py27_0
- pexpect=4.5.0=py27_0
- pickleshare=0.7.4=py27h09770e1_0
- pillow=5.1.0=py27h3deb7b8_0
- pip=10.0.1=py27_0
- pixman=0.34.0=hceecf20_3
- pkginfo=1.4.2=py27_1
- pluggy=0.6.0=py27h1f4f128_0
- ply=3.11=py27_0
- prompt_toolkit=1.0.15=py27h1b593e1_0
- psutil=5.4.5=py27h14c3975_0
- ptyprocess=0.5.2=py27h4ccb14c_0
- py=1.5.3=py27_0
- pycairo=1.15.4=py27h1b9232e_1
- pycodestyle=2.4.0=py27_0
- pycosat=0.6.3=py27ha4109ae_0
- pycparser=2.18=py27hefa08c5_1
- pycrypto=2.6.1=py27h14c3975_8
- pycurl=7.43.0.1=py27hb7f436b_0
- pyflakes=1.6.0=py27h904a57d_0
- pygments=2.2.0=py27h4a8b6f5_0
- pylint=1.8.4=py27_0
- pyodbc=4.0.23=py27hf484d3e_0
- pyopenssl=18.0.0=py27_0
- pyparsing=2.2.0=py27hf1513f8_1
- pyqt=5.9.2=py27h751905a_0
- pysocks=1.6.8=py27_0
- pytables=3.4.3=py27h02b9ad4_2
- pytest=3.5.1=py27_0
- python=2.7.15=h1571d57_0
- python-dateutil=2.7.3=py27_0
- pytz=2018.4=py27_0
- pywavelets=0.5.2=py27hecda097_0
- pyyaml=3.12=py27h2d70dd7_1
- pyzmq=17.0.0=py27h14c3975_1
- qt=5.9.5=h7e424d6_0
- qtawesome=0.4.4=py27hd7914c3_0
- qtconsole=4.3.1=py27hc444b0d_0
- qtpy=1.4.1=py27_0
- readline=7.0=ha6073c6_4
- requests=2.18.4=py27hc5b0589_1
- rope=0.10.7=py27hfe459b0_0
- ruamel_yaml=0.15.35=py27h14c3975_1
- scandir=1.7=py27h14c3975_0
- scikit-image=0.13.1=py27h14c3975_1
- scikit-learn=0.19.1=py27h445a80a_0
- scipy=1.1.0=py27hfc37229_0
- seaborn=0.8.1=py27h633ea1e_0
- send2trash=1.5.0=py27_0
- setuptools=39.1.0=py27_0
- simplegeneric=0.8.1=py27_2
- singledispatch=3.4.0.3=py27h9bcb476_0
- sip=4.19.8=py27hf484d3e_0
- six=1.11.0=py27h5f960f1_1
- snappy=1.1.7=hbae5bb6_3
- snowballstemmer=1.2.1=py27h44e2768_0
- sortedcollections=0.6.1=py27_0
- sortedcontainers=1.5.10=py27_0
- sphinx=1.7.4=py27_0
- sphinxcontrib=1.0=py27h1512b58_1
- sphinxcontrib-websupport=1.0.1=py27hf906f22_1
- spyder=3.2.8=py27_0
- sqlalchemy=1.2.7=py27h6b74fdf_0
- sqlite=3.23.1=he433501_0
- ssl_match_hostname=3.5.0.1=py27h4ec10b9_2
- statsmodels=0.9.0=py27h3010b51_0
- subprocess32=3.5.0=py27h14c3975_0
- sympy=1.1.1=py27hc28188a_0
- tblib=1.3.2=py27h51fe5ba_0
- terminado=0.8.1=py27_1
- testpath=0.3.1=py27hc38d2c4_0
- tk=8.6.7=hc745277_3
- toolz=0.9.0=py27_0
- tornado=5.0.2=py27_0
- traitlets=4.3.2=py27hd6ce930_0
- typing=3.6.4=py27_0
- unicodecsv=0.14.1=py27h5062da9_0
- unixodbc=2.3.6=h1bed415_0
- urllib3=1.22=py27ha55213b_0
- wcwidth=0.1.7=py27h9e3e1ab_0
- webencodings=0.5.1=py27hff10b21_1
- werkzeug=0.14.1=py27_0
- wheel=0.31.1=py27_0
- widgetsnbextension=3.2.1=py27_0
- wrapt=1.10.11=py27h04f6869_0
- xlrd=1.1.0=py27ha77178f_1
- xlsxwriter=1.0.4=py27_0
- xlwt=1.3.0=py27h3d85d97_0
- xz=5.2.4=h14c3975_4
- yaml=0.1.7=had09818_2
- zeromq=4.2.5=h439df22_0
- zict=0.1.3=py27h12c336c_0
- zlib=1.2.11=ha838bed_2
- pip:
- absl-py==0.2.2
- astor==0.6.2
- backports.ssl-match-hostname==3.5.0.1
- backports.weakref==1.0.post1
- dlib==19.13.1
- gast==0.2.0
- grpcio==1.12.0
- imutils==0.4.6
- keras==2.1.6
- markdown==2.6.11
- mock==2.0.0
- msgpack==0.5.6
- opencv-python==3.4.1.15
- pbr==4.0.3
- protobuf==3.5.2.post1
- tables==3.4.3
- tensorboard==1.8.0
- tensorflow==1.8.0
- termcolor==1.1.0
prefix: /home/samuel/anaconda2/envs/newenv

0 comments on commit 9bf6e65

Please sign in to comment.