Convolutional neural network that compresses images.
These instructions will get you a copy of the project up and running on your local machine running Ubuntu 18.04 for development and testing purposes.
What things you need to install the software
cmake (version >= 3.10)
caffe (located at ~)
- Clone this repo to your local machine using
git clone https://github.com/MATF-RS19/RS020-proj3ctf1lter
- Build project using Cmake:
$ cd RS020-proj3ctf1lter
$ mkdir build && cd build
$ cmake ..
$ make
Note: If you want to train CNN on CPU you have to add flag -DCPU_ONLY in CMakeLists.txt
Image used to train CNN needs to be in train folder and train.txt must contain list of all training data (same thing for val).
- First create lmdb from training data:
$ cd src
$ ./images_to_lmdb.sh
- Create image mean for training and val:
$ cd prototxt_files
$ ~/caffe/build/tools/compute_image_mean ../../build/train_lmdb/ train_mean.binaryproto
$ mv train_mean.binaryproto ../../build/train_mean.binaryproto
$ ~/caffe/build/tools/compute_image_mean ../../build/val_lmdb/ val_mean.binaryproto
$ mv val_mean.binaryproto ../../build/val_mean.binaryproto
- Then train neural network:
$ ~/caffe/build/tools/caffe train -solver compress_solver.prototxt -gpu all
Note: Remove -gpu all flag to train on CPU
Nikola Mandic | Lazar Jovanovic | Strahinja Mitric |
---|---|---|
v1rTu0Zz |
laleee |
stral0 |
See also the list of contributors who participated in this project.