Image classification, which is an important field of computer vision, is to classify an image into pre-defined labels. Recently, many researchers developed different kinds of neural networks and highly improve the classification performance. This page introduces how to do image classification with PaddlePaddle Fluid, including [data preparation](#data-preparation), [training](#training-a-model), [finetuning](#finetuning), [evaluation](#evaluation) and [inference](#inference).
Image classification, which is an important field of computer vision, is to classify an image into pre-defined labels. Recently, many researchers developed different kinds of neural networks and highly improve the classification performance. This page introduces how to do image classification with PaddlePaddle Fluid.
---
## Table of Contents
-[Installation](#installation)
-[Data preparation](#data-preparation)
-[Training a model with flexible parameters](#training-a-model)
-[Training a model with flexible parameters](#training-a-model-with-flexible-parameters)
-[Supported models and performances](#supported-models)
-[Supported models and performances](#supported-models-and-performances)
## Installation
Running sample code in this directory requires PaddelPaddle Fluid v0.13.0 and later. If the PaddlePaddle on your device is lower than this version, please follow the instructions in [installation document](http://www.paddlepaddle.org/docs/develop/documentation/zh/build_and_install/pip_install_cn.html) and make an update.
Running sample code in this directory requires PaddelPaddle Fluid v0.13.0 and later, the latest release version is recommended, If the PaddlePaddle on your device is lower than v0.13.0, please follow the instructions in [installation document](http://paddlepaddle.org/documentation/docs/zh/1.3/beginners_guide/install/index_cn.html) and make an update.
***pretrained_model**: model path for pretraining. Default: None.
***checkpoint**: the checkpoint path to resume. Default: None.
***data_dir**: the data path. Default: "./data/ILSVRC2012".
***model_category**: the category of models, ("models"|"models_name"). Default: "models_name".
***fp16**: whether to enable half precisioin training with fp16. Default: False.
***scale_loss**: scale loss for fp16. Default: 1.0.
***l2_decay**: L2_decay parameter. Default: 1e-4.
***momentum_rate**: momentum_rate. Default: 0.9.
Or can start the training step by running the ```run.sh```.
...
...
@@ -138,7 +145,7 @@ python train.py
```
## Evaluation
Evaluation is to evaluate the performance of a trained model. One can download [pretrained models](#supported-models) and set its path to ```path_to_pretrain_model```. Then top1/top5 accuracy can be obtained by running the following command:
Evaluation is to evaluate the performance of a trained model. One can download [pretrained models](#supported-models-and-performances) and set its path to ```path_to_pretrain_model```. Then top1/top5 accuracy can be obtained by running the following command: