-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update SSD documentation. #968
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sefira Thanks very much!
fluid/object_detection/README.md
Outdated
<p align="center"> | ||
<img src="images/SSD_paper_figure.jpg" height=300 width=900 hspace='10'/> <br /> | ||
The Single Shot MultiBox Detector (SSD) | ||
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 需要简要的解释下图中的SSD结构。
- In this tutorial we used MobileNet. 这句话放在图的后面,引出下文。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revised
fluid/object_detection/README.md
Outdated
``` | ||
- Train on multi devices (/GPUs). | ||
|
||
train.py is the main caller of the training module. Examples of usage are shown below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
train.py -> `train.py`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revised
fluid/object_detection/README.md
Outdated
``` | ||
- Set ```env CUDA_VISIBLE_DEVICES=0,1``` to specifiy the number of GPU you want to use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env CUDA_VISIBLE_DEVICES=0,1
->
export CUDA_VISIBLE_DEVICES=0,1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revised
fluid/object_detection/README.md
Outdated
``` | ||
- Set ```env CUDA_VISIBLE_DEVICES=0,1``` to specifiy the number of GPU you want to use. | ||
- Set ```--dataset='coco2014'``` or ```--dataset='coco2017'``` to train model on MS COCO dataset. | ||
- For more configurations, see the arguments list in train.py. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For more configurations, see the arguments list in train.py.
改成下面吧:
- For more help on arguments:
```bash
python train.py --help
```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revised
fluid/object_detection/README.md
Outdated
```python | ||
env CUDA_VISIBLE_DEVICES=0,1 python -u train.py --batch_size=64 --dataset='pascalvoc' --pretrained_model='pretrained/ssd_mobilenet_v1_coco/' | ||
python -u train.py --batch_size=64 --dataset='pascalvoc' --pretrained_model='pretrained/ssd_mobilenet_v1_coco/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python ->
bash
文档中所有命令行运行的地方,都改下吧。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revised
fluid/object_detection/README.md
Outdated
|
||
### Infer and Visualize | ||
|
||
infer.py is the main caller of the infering module. Examples of usage are shown below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`infer.py` is the main ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revised
fluid/object_detection/README.md
Outdated
<img src="images/009943.jpg" height=300 width=400 hspace='10'/> | ||
<img src="images/009956.jpg" height=300 width=400 hspace='10'/> | ||
<img src="images/009960.jpg" height=300 width=400 hspace='10'/> | ||
<img src="images/009962.jpg" height=300 width=400 hspace='10'/> <br /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
图像的类别name可以再调大点。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revised
fluid/object_detection/README.md
Outdated
|
||
Declaration: the MobileNet-v1 SSD model is converted by [TensorFlow model](https://github.com/tensorflow/models/blob/f87a58cd96d45de73c9a8330a06b2ab56749a7fa/research/object_detection/g3doc/detection_model_zoo.md). The MobileNet v1 model is converted [Caffe](https://github.com/shicai/MobileNet-Caffe). | ||
Declaration: the MobileNet-v1 SSD model is converted by [TensorFlow model](https://github.com/tensorflow/models/blob/f87a58cd96d45de73c9a8330a06b2ab56749a7fa/research/object_detection/g3doc/detection_model_zoo.md). The MobileNet v1 model is converted from [Caffe](https://github.com/shicai/MobileNet-Caffe). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的声明要么加上:我们将来会换成自己训练的模型?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revised
fluid/object_detection/README.md
Outdated
```python | ||
env CUDA_VISIBLE_DEVICES=0 python infer.py --dataset='coco' --nms_threshold=0.5 --model_dir='train_coco_model/20' --image_path='./data/coco/val2014/COCO_val2014_000000000139.jpg' | ||
python infer.py --dataset='pascalvoc' --nms_threshold=0.45 --model_dir='train_pascal_model/best_model' --image_path='./data/pascalvoc/VOCdevkit/VOC2007/JPEGImages/009963.jpg' | ||
``` | ||
Below is the examples after running python infer.py to inference and visualize the model result. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Below is the examples after running python infer.py to inference and visualize the model result.
->
Below are the examples of running the inference and visualizing the model result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revised
fluid/object_detection/README.md
Outdated
@@ -125,5 +107,3 @@ TBD | |||
|MobileNet-v1-SSD 300x300 | COCO MobileNet SSD | VOC07+12 trainval| VOC07 test | xx% | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
去掉表格里的最后两行吧,填下第一行的mAP结果。
</p> | ||
|
||
SSD is readily pluggable into a wide variant standard convolutional network, such as VGG, ResNet, or MobileNet, which is also called base network or backbone. In this tutorial we used [MobileNet](https://arxiv.org/abs/1704.04861). | ||
|
||
|
||
### Data Preparation | ||
|
||
You can use [PASCAL VOC dataset](http://host.robots.ox.ac.uk/pascal/VOC/) or [MS-COCO dataset](http://cocodataset.org/#download). | ||
|
||
#### PASCAL VOC Dataset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove #### PASCAL VOC Dataset
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revised
@@ -25,7 +32,7 @@ The command `download.sh` also will create training and testing file lists. | |||
|
|||
#### MS-COCO Dataset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove #### MS-COCO Dataset
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revised
@@ -1,20 +1,27 @@ | |||
The minimum PaddlePaddle version needed for the code sample in this directory is the lastest develop branch. If you are on a version of PaddlePaddle earlier than this, [please update your installation](http://www.paddlepaddle.org/docs/develop/documentation/en/build_and_install/pip_install_en.html). | |||
The minimum PaddlePaddle version needed for the code sample in this directory is the latest develop branch. If you are on a version of PaddlePaddle earlier than this, [please update your installation](http://www.paddlepaddle.org/docs/develop/documentation/en/build_and_install/pip_install_en.html). | |||
|
|||
--- | |||
|
|||
## SSD Object Detection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Table of Contents
before line 5, refer https://github.com/PaddlePaddle/models/pull/979/files#diff-e74a88ec056840ea1a6d958b791284afR5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revised
``` | ||
|
||
TBD | ||
We used RMSProp optimizer with mini-batch size 64 to train the MobileNet-SSD. The initial learning rate is 0.001, and was decayed at 40, 60, 80, 100 epochs with multiplier 0.5, 0.25, 0.1, 0.01, respectively. Weight decay is 0.00005. After 120 epochs we achive XXX% mAP under 11point metric. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Introduction the data argumentation and data reader before line 74. refer https://github.com/PaddlePaddle/models/pull/979/files#diff-e74a88ec056840ea1a6d958b791284afR87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revised
See https://github.com/sefira/models/tree/ssd_wiki/fluid/object_detection