Minimalist Keras implementation for deep learning object recognition.
(optional) Create a new anaconda environment:
conda create --name keras-object-recognition python=3
source activate keras-object-recognitionInstall the requirements:
pip install -r requirements.txtMake sure keras uses tensorflow backend. Edit ~/.keras/keras.json like this:
{
"floatx": "float32",
"epsilon": 1e-07,
"backend": "tensorflow",
"image_dim_ordering": "tf"
}Train a model with:
python train.pyDefault options (see train.py for the available options):
--savepath results--dataset cifar10--net_type resnet--depth 16--widen 1--weight_decay 5e-4--randomcrop 4--randomcrop_type reflect--hflip(pass to remove hflip)--epoch_max 200--epoch_init 0--bs 128--nthreads 2--lr 0.1--lr_decay 0.2--lr_schedule 60 120 160--momentum 0.9--nesterov(pass to remove nesterov)
In a new terminal, call tensorboard and use the value of --savepath as logdir:
tensorboard --logdir=resultsOpen your internet browser at localhost with the provided port number (like 6006), as follows: http://localhost:6006/.