VisualNN is an online collaborative platform to build, visualize and train deep learning models via a simple drag-and-drop interface. We build it based on Fabrik. It allows researchers to collectively develop and debug models using a web GUI that supports importing, editing and exporting networks to popular frameworks like Caffe, Keras, and TensorFlow.
Installation Instructions
Setting up VisualNN on your local machine is very easy.
-
First set up a virtualenv. Fabrik runs on Python2.7.
sudo apt-get install python-pip python-dev python-virtualenv virtualenv --system-site-packages ~/Fabrik --python=python2.7 source ~/Fabrik/bin/activate
-
Clone the repository via git
git clone --recursive https://github.com/Cloud-CV/Fabrik.git && cd Fabrik
-
Rename settings/dev.sample.py as settings/dev.py and change credentials in settings/dev.py
cp settings/dev.sample.py settings/dev.py
- Change the hostname to
localhost
in settings/dev.py line 15. It should now look like this:
'HOST': os.environ.get("POSTGRES_HOST", 'localhost'),
- Change the hostname to
-
Install redis server
sudo apt-get install redis-server
-
Change the hostname to
localhost
in settings/common.py line 115."CONFIG": { # replace redis hostname to localhost if running on local system "hosts": [("localhost", 6379)], "prefix": u'fabrik:', },
-
Replace celery result backend in settings/common.py line 122 with localhost.
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
-
Change celery broker URL and result backend hostname to
localhost
in ide/celery_app.py, line 8.app = Celery('app', broker='redis://localhost:6379/0', backend='redis://localhost:6379/0', include=['ide.tasks'])
-
-
If you already have Caffe, Keras and TensorFlow installed on your computer, skip this step.
- For Linux users
-
Install Caffe, Keras and Tensorflow
cd Fabrik/requirements yes Y | sh caffe_tensorflow_keras_install.sh
-
Open your ~/.bashrc file and append this line to the end
export PYTHONPATH=~/caffe/caffe/python:$PYTHONPATH
-
Save, exit and then run
source ~/.bash_profile cd ..
-
-
Install dependencies pip install -r requirements/dev.txt
-
Setup postgres database
-
Start postgresql by typing
sudo service postgresql start
-
Now login as user postgres by running
sudo -u postgres psql
and type the commands below:CREATE DATABASE fabrik; CREATE USER admin WITH PASSWORD 'fabrik'; ALTER ROLE admin SET client_encoding TO 'utf8'; ALTER ROLE admin SET default_transaction_isolation TO 'read committed'; ALTER ROLE admin SET timezone TO 'UTC'; ALTER USER admin CREATEDB;
-
Exit psql by typing in \q and hitting enter.
-
-
Migrate
python manage.py makemigrations caffe_app python manage.py migrate
-
Install node modules
npm install npm install --save-dev json-loader sudo npm install -g webpack@1.15.0
- Run the command below in a separate terminal for hot-reloading, i.e. see the changes made to the UI in real time.
webpack --progress --watch --colors
-
Start celery worker
celery -A ide worker --app=ide.celery_app --loglevel=info
The celery worker needs to be run in parallel to the django server in a separate terminal.
-
Start django application
python manage.py runserver
You should now be able to access Fabrik at http://localhost:8000.
Usage
python manage.py runserver
Example
- Use
example/tensorflow/GoogleNet.pbtxt
for TensorFlow import - Use
example/caffe/GoogleNet.prototxt
for Caffe import - Use
example/keras/vgg16.json
for Keras import