This repo is organized as follows:
sense_classification/
|->examples
|->models
|->prepare_data
|->data
| |->rssrai_sense_cls
| | |->train
| | |->val
| | |->test
| |->tf_records
| |->train_list
|->ckpt
|->tools
- tensorflow-gpu==1.12.0 (I only test on tensorflow 1.12.0)
- python==3.4.3
- numpy
- easydict
- opencv==3.4.1
- Python packages might missing. pls fix it according to the error message.
- Clone the sense_classification repository, and we'll call the directory that you cloned sense_classification as
${sense_classification_ROOT}
.
git clone https://github.com/vicwer/sense_classification.git
data should be organized as follows:
data/
|->rssrai_sense_cls
| |->train
| |->val
| |->test
| |->ClsName2id.txt
|->train_list/train.txt
|->tf_records
-
Download dataset and unzip: train.zip, val.zip, test.zip, ClsName2id.txt
-
Generate tf_records:
cd tools
python3 img_encode.py
I provide common used config.py in ${sense_classification_ROOT}, which can set hyperparameters.
e.g.
cd ${sense_classification_ROOT}
vim config.py
cfg.train.num_gpus = {your gpu nums}
etc.
cd ${sense_classification_ROOT}/examples/
python3 multi_gpus_train.py
cd ${sense_classification_ROOT}/examples/
python3 accuracy.py
cd ${sense_classification_ROOT}/examples/
python3 submit.py
Val: 0.908+ Test: 0.90509