a.k.a. Vilson Vieira

Coder and artist. I create algorithms that create at The Grid. My current focus is on artificial intelligence, alternative interfaces to computer programming, hackable & sustainable structures and creativity exploration. This is a wiki-blog-portfolio hybrid where I collect thoughts, feel free to explore. I love to collaborate, please follow me and keep in touch by Twitter ,Github ,Flickr, SoundCloud or the old-fashion Email. Thank you for your visit.

We apply algorithms and techniques from the Computer Vision field. Combined with hand picked datasets we can create extractors for features we are interested in. With that our AI can answer questions like "what is a good color palette from this image?", "where is the best place to crop that picture?" or "can we place text on top of this image? and where?".


sudo dpkg -i cuda-repo-ubuntu1604_8.0.44-1_amd64.deb

sudo apt-get update sudo apt-get install cuda

Restart the computer. Screen should has the right resolution now, Nvidia drivers should be installed in /usr/local/cuda.

Edit your ~/.bashrc and source it:

export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

First signup or login into Nvidia developer program and download it:

You should download the following package:

Download cuDNN v5.1 (August 10, 2016), for CUDA 8.0 cuDNN v5.1 Library for Linux

Uncompress and copy cuDNN to CUDA directory:

tar xvzf cudnn-8.0-linux-x64-v5.1.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*

Now you can already check if CUDA/cuDNN are properly installed:


    Sat Oct 15 22:46:05 2016 
    | NVIDIA-SMI 367.48 Driver Version: 367.48                                    | 
    | GPU Name Persistence-M        | Bus-Id Disp.A        | Volatile Uncorr. ECC | 
    | Fan Temp Perf Pwr:Usage/Cap   | Memory-Usage         | GPU-Util Compute M.  | 
    | 0 GeForce GTX 106... Off      | 0000:01:00.0 On      | N/A                  |
    | 0% 35C P8 9W / 120W           | 324MiB / 6071MiB     | 1% Default           | 
    | Processes: GPU Memory              | | GPU PID Type Process name Usage      | 
    | 0 2802 G /usr/lib/xorg/Xorg 167MiB | | 0 3497 G compiz 155MiB               | 

Check if building CUDA samples works:

cd /usr/local/cuda/samples/5_Simulations/oceanFFT/

TensorFlow binaries do not support CUDA 8.0 neither cuDNN 5.1 so we have to build it from source. We're going to build TF as a PIP wheel, so we need PIP installed:

sudo apt-get install python-pip python-dev

Then setup the builder, Bazel, this guy will build the PIP wheel:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
echo "deb [arch=amd64] stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl | sudo apt-key add -
sudo apt-get update
sudo apt-get install bazel
sudo apt-get upgrade bazel

Install other dependencies:

sudo apt-get install python-numpy swig python-dev python-wheel

Clone TF and configure it:

git clone
cd tensorflow
./configure # Defaults generally work

Use Bazel to create the PIP package and install it (with GPU support):

bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
sudo pip install /tmp/tensorflow_pkg/tensorflow-0.11.0rc0-py2-none-any.whl

And that's it! Check if your build is working:

cd tensorflow/models/image/mnist

Using the extracted PBF from Brazil region made available by Gisgraphy project and following the steps from Dan Burzo - where he draws every street in Romania - I was able to generate the following visualizations of every street in Brazil.

We were working on a genetic programming algorithm to generate contours based on a given example.

Each line is a population ordered from best to poor fitness. Each individual have a genotype (draw instructions) and a phenotype (the drawing itself).