This is a very old project done at the uni available here for archive.
A simple neural network in OCaml, with an image encoder and decoder.
OCaml of course!
For byte code (slow):
$ make bcFor native code (much faster):
$ make ncClean up:
$ make clean2 binaries are created: an encoder in encoder/ and a decoder in decoder/
The encoder takes a neural network configuration file, here located in encoder/mlp.conf and an image in pgm format located in encoder/images. Learning stops at 1000 iterations in the default mlp.conf or if the error is small enough. Check encoder/mlp.conf for more options.
$ ./encoder -f mlp.conf -d encoder.nn -o compressed_image.img images/lena.pgmDecodes a compressed image with a neural network definition previousl saved by encoder.
$ ./decoder -d encoder.nn -i compressed_image.img -o output.pgm