I finally got somewhere. It's a bit like sappho in that images are part of collections which are part of categories.
It uses web.py and SQLite.
At the moment you have to get images including thumbnails into a directory and add database entries yourself. I might make forms and/or command line tools for this though.
There's a tarball with example database and images here:
http://omploader.org/vMXZvNg
All you need is Python and web.py.
Or, if you don't want to run it yourself, you can check out
http://tinyurl.com/lcopb9