This is an MXNet example for Kaggle Nation Data Science Bowl 1. Test/train image data and sample submission have to be downloaded from https://www.kaggle.com/c/datasciencebowl/data. into a “data” folder. Uncompress train.zip and test.zip folders.
--gen_img_list.py
--data/
|
|--train/
| |
| |--acantharia_protist/...
| |--.../
|--test/...
python gen_img_list.py --train to generate a the train image list python gen_img_list.py --image-folder=data/test/ --out-file=test.lst to generate a test image listmkdir data48../../bin/im2rec data/tr.lst ./ data48/tr.rec resize=48 to generate training data record file../../bin/im2rec data/va.lst ./ data48/va.rec resize=48 to generate validation data record file../../bin/im2rec data/test.lst ./ data48/test.rec resize=48 to generate validation data record fileln -s ../image-classification/find_mxnet.py . and ln -s ../image-classification/train_model.py .mkdir models , if you want to save the models in that folder.python train_dsb.py to train the model, look to the help of that file to change the parameters. (See Step 4 if you want to make training curve plot)2016-01-16 22:03:48,269 Node[0] Epoch[49] Train-accuracy=0.664038 2016-01-16 22:03:48,269 Node[0] Epoch[49] Time cost=25.107 2016-01-16 22:03:51,977 Node[0] Epoch[49] Validation-accuracy=0.647807 2016-01-16 22:03:51,999 Node[0] Saved checkpoint to “./models/sample_net-0-0050.params”
python train_dsb.py --log-file "log_tr_va" --log-dir "." python test_dsb.py to make predictions on the test.rec, look to the help of that file to change the parameters