Showing posts from October, 2010

Neural Network in Python with CUDA

My colleague Hannes uploaded a simple Multi Layer Perceptron as a demo for our CUV library. It is written entirely in Python and classifies the MNIST dataset of handwritten digits. He also wrote a blog post explaining the design and use in detail. The code is very easy to understand and to expand. But it is very fast - of course, using CUDA - and can serve as the basis for many experiments. There are also convolution routines in the library and its even possible to extend the network to a convolutional neural network entirely in Python and on the GPU.

CUV CUDA Library updated

The CUDA library from my working group was updated again today. Features of the library include matrix and vector operations on CPU and GPU using NVidia Cuda. Much work went into a clean design and ease of use. Beside the C++ interface there are also Python wrappers for very easy coding using the GPU. We mainly use this library for neural networks and restricted Boltzmann machines but it is quite generic and everybody who uses dense or diagonal matrix operations can benefit from it. New features include convenience functions in Python and Image Pyramids on the GPU. There are also some minor fixes. If everything goes as planned there will be another mayor update quite soon.

Python things you never need: Empty lambda functions

Ever wanted to create an empty Python function in-line? No? Me neither. But my coworker does... We found the answer: <pre> x = lambda : None </pre> If you ever needed this, please tell me ;) [Edit] Apparently some people do need it :) Btw, most people seem to try Most people try lambda: pass first. But you have to remember, the thing at the right side of the colon is the return value of the function, not the body! So an expression is needed, not a statement. [\Edit]

Python wrappers for vlfeat quickshift

Finally I got around to wrap vlfeats quickshift features to python. These can be used to easily build (hierarchical) segmentations or superpixels in images. They can also be used for other clustering tasks but this was the main goal. You can find my wrappers on github . If you want, you can flattr me. I build upon mmmikaels python wrappers and upgraded to vlfeat 0.9.9. I didn't see if the compiling problems I addressed earlier are still present in this version but I'll check it and try to fix it in my branch. I am planing to use this together with the sift features for some superpixel and bow based image segmentation. Before that I used Turbo Pixels by Alex Levinshtein. Maybe I will write some python wrappers for his Matlab code, too. Also I just found a brand new paper on TurboPixels, called TurboPixel Segmentation Using Eigen-Images . Sounds interesting. I'll dig into it right now :)