forked from infocusp/tf_cnnvis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
57 lines (51 loc) · 2.11 KB
/
Copy pathsetup.py
File metadata and controls
57 lines (51 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Setup script for tf_cnnvis
import os
import sys
import pkgutil
# required pkgs
dependencies = ['numpy', 'scipy', 'h5py', 'wget', 'Pillow', 'six','scikit-image']
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
print("Please install if not installed:", dependencies)
from distutils.command.clean import clean
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
class CleanCommand(clean):
"""Custom clean command to tidy up the project root."""
def run(self):
os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info')
setup(
name = "tf_cnnvis",
version = "1.0.0",
author = "Bhagyesh Vikani & Falak Shah",
author_email = "bhagyesh@infocusp.in & falak@infocusp.in",
description = ("tf_cnnvis is a CNN visualization library based on the paper 'Visualizing and Understanding Convolutional Networks' by Matthew D. Zeiler and Rob Fergus. We use the 'TensorFlow' library to reconstruct the input images from different layers of the convolutional neural network. The generated images are displayed in [TensorBoard](https://www.tensorflow.org/get_started/summaries_and_tensorboard)."),
license = "MIT",
keywords = "tensorflow tensorboard convolutional-neural-networks cnn visualization",
url = "https://github.com/InFoCusp/tf_cnnvis",
packages=['tf_cnnvis'],
long_description=read('ReadMe.md'),
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Utilities",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: Unix",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Visualization",
],
install_requires=dependencies,
cmdclass={
'clean': CleanCommand,
}
)
# Check TF version as it requires > 1.0
try:
import tensorflow
if int(tensorflow.__version__.split(".")[0]) < 1:
print("Please upgrade to TensorFlow >= 1.0.0")
except:
print("Please install TenSorflow with 'pip install tensorflow'")