提交 992cf8e8 编写于 作者: W wangguanzhong 提交者: GitHub

fix command in quick start (#3500)

上级 7e4da858
...@@ -2,7 +2,7 @@ English | [简体中文](QUICK_STARTED_cn.md) ...@@ -2,7 +2,7 @@ English | [简体中文](QUICK_STARTED_cn.md)
# Quick Start # Quick Start
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 15min with good performance. 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 15min with good performance.
## Data Preparation ## Data Preparation
...@@ -13,11 +13,16 @@ cd dataset/fruit ...@@ -13,11 +13,16 @@ cd dataset/fruit
sh download.sh sh download.sh
``` ```
Training command is as follows: - **Note: before started, run the following command and specifiy the GPU**
```bash ```bash
export PYTHONPATH=$PYTHONPATH:. export PYTHONPATH=$PYTHONPATH:.
export CUDA_VISIBLE_DEVICES=0 export CUDA_VISIBLE_DEVICES=0
```
Training:
```bash
python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \ python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \
--use_tb=True \ --use_tb=True \
--tb_log_dir=tb_fruit_dir/scalar \ --tb_log_dir=tb_fruit_dir/scalar \
...@@ -41,17 +46,15 @@ Model can be downloaded [here](https://paddlemodels.bj.bcebos.com/object_detecti ...@@ -41,17 +46,15 @@ Model can be downloaded [here](https://paddlemodels.bj.bcebos.com/object_detecti
Evaluation: Evaluation:
```bash ```bash
export PYTHONPATH=$PYTHONPATH:.
export CUDA_VISIBLE_DEVICES=0
python -u tools/eval.py -c configs/yolov3_mobilenet_v1_fruit.yml python -u tools/eval.py -c configs/yolov3_mobilenet_v1_fruit.yml
``` ```
Inference: Inference:
```bash ```bash
export PYTHONPATH=$PYTHONPATH:. python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml \
export CUDA_VISIBLE_DEVICES=0 -o weights=https://paddlemodels.bj.bcebos.com/object_detection/yolov3_mobilenet_v1_fruit.tar \
python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml --infer_img=demo/000000570688.jpg
``` ```
Inference images are shown below: Inference images are shown below:
......
...@@ -13,12 +13,16 @@ cd dataset/fruit ...@@ -13,12 +13,16 @@ cd dataset/fruit
sh download.sh sh download.sh
``` ```
- **注:在开始前,运行如下命令并指定GPU**
训练命令如下:
```bash ```bash
export PYTHONPATH=$PYTHONPATH:. export PYTHONPATH=$PYTHONPATH:.
export CUDA_VISIBLE_DEVICES=0 export CUDA_VISIBLE_DEVICES=0
```
训练命令如下:
```bash
python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \ python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \
--use_tb=True \ --use_tb=True \
--tb_log_dir=tb_fruit_dir/scalar \ --tb_log_dir=tb_fruit_dir/scalar \
...@@ -42,17 +46,15 @@ tensorboard结果显示如下: ...@@ -42,17 +46,15 @@ tensorboard结果显示如下:
评估命令如下: 评估命令如下:
```bash ```bash
export PYTHONPATH=$PYTHONPATH:.
export CUDA_VISIBLE_DEVICES=0
python -u tools/eval.py -c configs/yolov3_mobilenet_v1_fruit.yml python -u tools/eval.py -c configs/yolov3_mobilenet_v1_fruit.yml
``` ```
预测命令如下 预测命令如下
```bash ```bash
export PYTHONPATH=$PYTHONPATH:. python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml \
export CUDA_VISIBLE_DEVICES=0 -o weights=https://paddlemodels.bj.bcebos.com/object_detection/yolov3_mobilenet_v1_fruit.tar \
python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml --infer_img=demo/000000570688.jpg
``` ```
预测图片如下: 预测图片如下:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册