From 992cf8e866c7f9d4a0357e22c5b14bb8216d1482 Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Fri, 11 Oct 2019 09:59:15 +0800 Subject: [PATCH] fix command in quick start (#3500) --- docs/QUICK_STARTED.md | 17 ++++++++++------- docs/QUICK_STARTED_cn.md | 16 +++++++++------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/docs/QUICK_STARTED.md b/docs/QUICK_STARTED.md index dbc5fccd1..06b5f15dd 100644 --- a/docs/QUICK_STARTED.md +++ b/docs/QUICK_STARTED.md @@ -2,7 +2,7 @@ English | [简体中文](QUICK_STARTED_cn.md) # 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 @@ -13,11 +13,16 @@ cd dataset/fruit sh download.sh ``` -Training command is as follows: +- **Note: before started, run the following command and specifiy the GPU** ```bash export PYTHONPATH=$PYTHONPATH:. export CUDA_VISIBLE_DEVICES=0 +``` + +Training: + +```bash python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \ --use_tb=True \ --tb_log_dir=tb_fruit_dir/scalar \ @@ -41,17 +46,15 @@ Model can be downloaded [here](https://paddlemodels.bj.bcebos.com/object_detecti Evaluation: ```bash -export PYTHONPATH=$PYTHONPATH:. -export CUDA_VISIBLE_DEVICES=0 python -u tools/eval.py -c configs/yolov3_mobilenet_v1_fruit.yml ``` Inference: ```bash -export PYTHONPATH=$PYTHONPATH:. -export CUDA_VISIBLE_DEVICES=0 -python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml +python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml \ + -o weights=https://paddlemodels.bj.bcebos.com/object_detection/yolov3_mobilenet_v1_fruit.tar \ + --infer_img=demo/000000570688.jpg ``` Inference images are shown below: diff --git a/docs/QUICK_STARTED_cn.md b/docs/QUICK_STARTED_cn.md index bc1814e02..33c4f63d6 100644 --- a/docs/QUICK_STARTED_cn.md +++ b/docs/QUICK_STARTED_cn.md @@ -13,12 +13,16 @@ cd dataset/fruit sh download.sh ``` - -训练命令如下: +- **注:在开始前,运行如下命令并指定GPU** ```bash export PYTHONPATH=$PYTHONPATH:. export CUDA_VISIBLE_DEVICES=0 +``` + +训练命令如下: + +```bash python -u tools/train.py -c configs/yolov3_mobilenet_v1_fruit.yml \ --use_tb=True \ --tb_log_dir=tb_fruit_dir/scalar \ @@ -42,17 +46,15 @@ tensorboard结果显示如下: 评估命令如下: ```bash -export PYTHONPATH=$PYTHONPATH:. -export CUDA_VISIBLE_DEVICES=0 python -u tools/eval.py -c configs/yolov3_mobilenet_v1_fruit.yml ``` 预测命令如下 ```bash -export PYTHONPATH=$PYTHONPATH:. -export CUDA_VISIBLE_DEVICES=0 -python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml +python -u tools/infer.py -c configs/yolov3_mobilenet_v1_fruit.yml \ + -o weights=https://paddlemodels.bj.bcebos.com/object_detection/yolov3_mobilenet_v1_fruit.tar \ + --infer_img=demo/000000570688.jpg ``` 预测图片如下: -- GitLab