torch/image — pull request #30 by jonathantompson (2014-10-11 18:51:32+00:00)
Title: Added a method to decompress a JPEG from a ByteTensor.  

This allows one to store JPEG images in memory and then decompress them when needed.

This function is very nice for people doing imagenet. If you downscale the imagenet detection 2014 images to 256x256 you can actually store the entire training set in memory as JPEGs (it's roughly 8GB depending on the compression quality) and then just decompress on the fly during training. This means you don't have to take the hit of reading images to and from disk (which is especially egregious if you're storing the data on a NFS like I am).

Clearly the changes here are in a VERY, VERY important region of code. Can one of the torch guys please do a thorough code review? Let me know if you have any suggestions for changes OR if you want more tests added to the (admittedly simple) test script. Luckily the changes to jpeg.c is pretty minor so I have high hopes that you guys will accept it as is.