Skip to content

MATF-RS19/RS020-proj3ctf1lter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RS020-proj3ctf1lter

Convolutional neural network that compresses images.

Getting Started

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.

Prerequisites

What things you need to install the software

cmake (version >= 3.10)
caffe (located at ~)

Installing

Clone

  • Clone this repo to your local machine using git clone https://github.com/MATF-RS19/RS020-proj3ctf1lter

Setup

  • 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

Training

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

Built With

  • caffe - Fast open framework for deep learning
  • Cmake - Build tool

Team

Nikola Mandic Lazar Jovanovic Strahinja Mitric
Nikola Lazar Strahinja
v1rTu0Zz laleee stral0

See also the list of contributors who participated in this project.