Fabrik is an online collaborative platform to build, visualize and train deep learning models via a simple drag-and-drop interface. It allows researchers to collaboratively develop and debug models using a web GUI that supports importing, editing and exporting networks written in widely popular frameworks like Caffe, Keras, and TensorFlow.
This app is presently under active development and we welcome contributions. Please check out our issues thread to find things to work on, or ping us on Gitter.
Installation Instructions
Setting up Fabrik on your local machine is really easy. You can setup Fabrik using two methods:
Using Docker
-
Get the source code on to your machine via git.
git clone https://github.com/Cloud-CV/Fabrik.git && cd Fabrik
-
Rename
settings/dev.sample.py
asdev.py
.cp settings/dev.sample.py settings/dev.py
-
Build and run the Docker containers. This might take a while. You should be able to access Fabrik at
0.0.0.0:8000
.docker-compose up --build
Using Virtual Environment
-
First set up a virtualenv
sudo apt-get install python-pip python-dev python-virtualenv virtualenv --system-site-packages ~/Fabrik source ~/Fabrik/bin/activate
-
Clone the repository
git clone --recursive https://github.com/Cloud-CV/Fabrik.git
-
Rename settings/dev.sample.py as settings/dev.py and change credential in settings/dev.py
cp settings/dev.sample.py settings/dev.py
-
Install redis server and replace the hostname to 'localhost' in settings/common.py line 99.
sudo apt-get install redis-server
-
If you have Caffe, Keras and Tensorflow already installed on your computer, skip this step
- For Linux users
Open your ~/.bashrc file and append this line at the end
cd Fabrik/requirements yes Y | sh caffe_tensorflow_keras_install.sh
Save, exit and then runexport PYTHONPATH=~/caffe/caffe/python:$PYTHONPATH
source ~/.bash_profile cd ..
- For Mac users
- For Linux users
-
Install dependencies
- For developers:
pip install -r requirements/dev.txt
- Others:
pip install -r requirements/common.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.
- Start postgresql by typing
-
Migrate
python manage.py makemigrations caffe_app python manage.py migrate
- Install node modules
npm install
sudo npm install -g webpack
webpack --progress --watch --colors
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
Tested models
The model conversion between currently supported frameworks is tested on some models.
Models | Caffe | Keras | Tensorflow |
---|---|---|---|
Inception V3 | √ | √ | √ |
Inception V4 | √ | √ | √ |
ResNet 101 | √ | √ | √ |
VGG 16 | √ | √ | √ |
GoogLeNet | √ | × | × |
SqueezeNet | √ | × | × |
DenseNet | √ | × | × |
AllCNN | √ | × | × |
AlexNet | √ | × | × |
FCN32 Pascal | √ | × | × |
YoloNet | √ | √ | √ |
Pix2Pix | √ | × | × |
VQA | √ | √ | √ |
Documentation
- Using a Keras model exported from Fabrik
- Loading a Keras model exported from Fabrik and printing its summary
- Using an Exported Caffe Model
- Loading a caffe model in python and printing its parameters and output size
- List of models tested with Fabrik
- Adding model to the Fabrik model zoo
- Adding new layers
- Linux installation walk-through
License
This software is licensed under GNU GPLv3. Please see the included License file. All external libraries, if modified, will be mentioned below explicitly.