未验证 提交 ce624b3a 编写于 作者: W wangguanzhong 提交者: GitHub

Fix master fruit (#238)

* fix fruit config on master branch

* refine doc
上级 c59bdcd6
......@@ -128,5 +128,6 @@ TestReader:
batch_size: 1
dataset:
!ImageFolder
anno_path: dataset/fruit/label_list.txt
use_default_label: false
with_background: false
......@@ -4,20 +4,19 @@ English | [简体中文](QUICK_STARTED_cn.md)
This tutorial fine-tunes a tiny dataset by pretrained detection model for users to get a model and learn PaddleDetection quickly. The model can be trained in around 20min with good performance.
## Data Preparation
Dataset refers to [Kaggle](https://www.kaggle.com/mbkinaci/fruit-images-for-object-detection), which contains 240 images in train dataset and 60 images in test dataset. Data categories are apple, orange and banana. Download [here](https://dataset.bj.bcebos.com/PaddleDetection_demo/fruit-detection.tar) and uncompress the dataset after download, script for data preparation is located at [download_fruit.py](https://github.com/PaddlePaddle/PaddleDetection/blob/master/dataset/fruit/download_fruit.py). Command is as follows:
- **Note: before started, need to set PYTHONPATH and specifiy the GPU device as follows in Linux platform. For Windows users, also need to set PYTHONPATH correctly.**
```bash
export PYTHONPATH=$PYTHONPATH:.
python dataset/fruit/download_fruit.py
export CUDA_VISIBLE_DEVICES=0
```
- **Note: before started, run the following command and specifiy the GPU**
## Data Preparation
Dataset refers to [Kaggle](https://www.kaggle.com/mbkinaci/fruit-images-for-object-detection), which contains 240 images in train dataset and 60 images in test dataset. Data categories are apple, orange and banana. Download [here](https://dataset.bj.bcebos.com/PaddleDetection_demo/fruit-detection.tar) and uncompress the dataset after download, script for data preparation is located at [download_fruit.py](https://github.com/PaddlePaddle/PaddleDetection/blob/master/dataset/fruit/download_fruit.py). Command is as follows:
```bash
export PYTHONPATH=$PYTHONPATH:.
export CUDA_VISIBLE_DEVICES=0
python dataset/fruit/download_fruit.py
```
Training:
......
......@@ -4,24 +4,23 @@
为了使得用户能够在很短的时间内快速产出模型,掌握PaddleDetection的使用方式,这篇教程通过一个预训练检测模型对小数据集进行finetune。在P40上单卡大约20min即可产出一个效果不错的模型。
## 数据准备
数据集参考[Kaggle数据集](https://www.kaggle.com/mbkinaci/fruit-images-for-object-detection),其中训练数据集240张图片,测试数据集60张图片,数据类别为3类:苹果,橘子,香蕉。[下载链接](https://dataset.bj.bcebos.com/PaddleDetection_demo/fruit-detection.tar)。数据下载后分别解压即可, 数据准备脚本位于[download_fruit.py](https://github.com/PaddlePaddle/PaddleDetection/blob/master/dataset/fruit/download_fruit.py)。下载数据方式如下:
- **注:在开始前,对于Linux用户, 运行如下命令设置PYTHONPATH,如果有GPU设备,指定GPU设备号。对于Windows用户,同样需要将PaddleDetection的根目录设置到PYTHONPATH中。**
```bash
export PYTHONPATH=$PYTHONPATH:.
python dataset/fruit/download_fruit.py
export CUDA_VISIBLE_DEVICES=0
```
## 开始训练
## 数据准备
- **注:在开始前,运行如下命令并指定GPU**
数据集参考[Kaggle数据集](https://www.kaggle.com/mbkinaci/fruit-images-for-object-detection),其中训练数据集240张图片,测试数据集60张图片,数据类别为3类:苹果,橘子,香蕉。[下载链接](https://dataset.bj.bcebos.com/PaddleDetection_demo/fruit-detection.tar)。数据下载后分别解压即可, 数据准备脚本位于[download_fruit.py](../dataset/fruit/download_fruit.py)。下载数据方式如下:
```bash
export PYTHONPATH=$PYTHONPATH:.
export CUDA_VISIBLE_DEVICES=0
python dataset/fruit/download_fruit.py
```
## 开始训练
训练命令如下:
```bash
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册