提交 ae4ab0f9 编写于 作者: J jingqinghe

add document for detection demo

上级 b85f7364
# Example of a detection model training with FedAvg
This document introduce how to start a detection model training in PaddleFL with our pre-defined program. Now we only provide faster_rcnn, more models will be updated.
### Dependencies
- paddlepaddle>=1.8
- paddle_fl>=1.0
Please use pip which has paddlepaddle installed
```sh
pip install paddle_fl
```
### How to Run
#### Download the dataset
```sh
# download and unzip the dataset
sh download.sh
```
#### Start training
Before training, please modify the following paths according to your environment.
```python
# In run.sh, change the path to you PaddleDetection
export PYTHONPATH=/path/to/PaddleDetection
# In fl_train.py, change the path to your fl_fruit dataset that is downloaded in download.sh.
# Note, the path should be absolute path rather than relatice path. Otherwise, error will be raised.
#line 41
self.root_path = '/path/to/your/fl_fruit'
#line 42
self.anno_path = '/path/to/your/fl_fruit/train' + str(trainer_id) + '.txt'
# line 44
self.image_dir = '/path/to/your/fl_fruit/JPEGImages'
# line 57
label_list='/path/to/your/fl_fruit/label_list.txt'
```
After modifying the path, you can run the following shell directly.
```sh
sh run.sh
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册