Skip to content

Commit 364c3e3

Browse files
committed
docs(ssd): 添加使用命令和测试日志
1 parent b58295b commit 364c3e3

File tree

5 files changed

+123
-4
lines changed

5 files changed

+123
-4
lines changed

docs/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@
2424
* `Hard Negative Mining`
2525
* `variance`变量
2626
* 训练
27-
* 训练日志
27+
* 执行命令
28+
* 训练日志
29+
* 测试日志

docs/ssd/test_res.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
2+
# 测试日志
3+
4+
测试检测结果,计算`FPS`
5+
6+
```
7+
$ python demo.py --config-file configs/vgg_ssd300_voc0712.yaml --images_dir demo --ckpt outputs/vgg_ssd300_voc0712/model_final.pth
8+
Namespace(ckpt='outputs/vgg_ssd300_voc0712/model_final.pth', config_file='configs/vgg_ssd300_voc0712.yaml', dataset_type='voc', images_dir='demo', opts=[], output_dir='demo/result', score_threshold=0.7)
9+
Loaded configuration file configs/vgg_ssd300_voc0712.yaml
10+
11+
MODEL:
12+
NUM_CLASSES: 21
13+
INPUT:
14+
IMAGE_SIZE: 300
15+
DATASETS:
16+
TRAIN: ("voc_2007_trainval", "voc_2012_trainval")
17+
TEST: ("voc_2007_test", )
18+
SOLVER:
19+
MAX_ITER: 120000
20+
LR_STEPS: [80000, 100000]
21+
GAMMA: 0.1
22+
BATCH_SIZE: 32
23+
LR: 1e-3
24+
25+
OUTPUT_DIR: 'outputs/vgg_ssd300_voc0712'
26+
Running with config:
27+
DATASETS:
28+
TEST: ('voc_2007_test',)
29+
TRAIN: ('voc_2007_trainval', 'voc_2012_trainval')
30+
DATA_LOADER:
31+
NUM_WORKERS: 8
32+
PIN_MEMORY: True
33+
INPUT:
34+
IMAGE_SIZE: 300
35+
PIXEL_MEAN: [123, 117, 104]
36+
MODEL:
37+
BACKBONE:
38+
NAME: vgg
39+
OUT_CHANNELS: (512, 1024, 512, 256, 256, 256)
40+
PRETRAINED: True
41+
BOX_HEAD:
42+
NAME: SSDBoxHead
43+
PREDICTOR: SSDBoxPredictor
44+
CENTER_VARIANCE: 0.1
45+
DEVICE: cuda
46+
META_ARCHITECTURE: SSDDetector
47+
NEG_POS_RATIO: 3
48+
NUM_CLASSES: 21
49+
PRIORS:
50+
ASPECT_RATIOS: [[2], [2, 3], [2, 3], [2, 3], [2], [2]]
51+
BOXES_PER_LOCATION: [4, 6, 6, 6, 4, 4]
52+
CLIP: True
53+
FEATURE_MAPS: [38, 19, 10, 5, 3, 1]
54+
MAX_SIZES: [60, 111, 162, 213, 264, 315]
55+
MIN_SIZES: [30, 60, 111, 162, 213, 264]
56+
STRIDES: [8, 16, 32, 64, 100, 300]
57+
SIZE_VARIANCE: 0.2
58+
THRESHOLD: 0.5
59+
OUTPUT_DIR: outputs/vgg_ssd300_voc0712
60+
SOLVER:
61+
BATCH_SIZE: 32
62+
GAMMA: 0.1
63+
LR: 0.001
64+
LR_STEPS: [80000, 100000]
65+
MAX_ITER: 120000
66+
MOMENTUM: 0.9
67+
WARMUP_FACTOR: 0.3333333333333333
68+
WARMUP_ITERS: 500
69+
WEIGHT_DECAY: 0.0005
70+
TEST:
71+
BATCH_SIZE: 10
72+
CONFIDENCE_THRESHOLD: 0.01
73+
MAX_PER_CLASS: -1
74+
MAX_PER_IMAGE: 100
75+
NMS_THRESHOLD: 0.45
76+
Loaded weights from outputs/vgg_ssd300_voc0712/model_final.pth
77+
/opt/conda/conda-bld/pytorch_1587428266983/work/torch/csrc/utils/python_arg_parser.cpp:756: UserWarning: This overload of nonzero is deprecated:
78+
nonzero(Tensor input, *, Tensor out)
79+
Consider using one of the following signatures instead:
80+
nonzero(Tensor input, *, bool as_tuple)
81+
(0001/0005) 004101.jpg: objects 01 | load 004ms | inference 170ms | FPS 6
82+
(0002/0005) 000542.jpg: objects 01 | load 006ms | inference 014ms | FPS 73
83+
(0003/0005) 003123.jpg: objects 08 | load 004ms | inference 012ms | FPS 81
84+
(0004/0005) 000342.jpg: objects 02 | load 003ms | inference 013ms | FPS 79
85+
(0005/0005) 008591.jpg: objects 02 | load 004ms | inference 013ms | FPS 77
86+
```

docs/ssd/train_params.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/ssd/using_command.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
# 执行命令
3+
4+
执行训练、测试、检测命令如下
5+
6+
## 相关参数
7+
8+
* 数据集:`PASCAL VOC 07+12`
9+
* 基础网络:`VGG16`
10+
* 输入大小:$300\times 300$
11+
* `GPU: Nvidia GTX 1080Ti`
12+
13+
## 训练
14+
15+
```
16+
# 单GPU训练
17+
$ python test.py --config-file configs/vgg_ssd300_voc0712.yaml
18+
```
19+
20+
## 测试
21+
22+
```
23+
# 单GPU测试
24+
python test.py --config-file configs/vgg_ssd300_voc0712.yaml
25+
```
26+
27+
## 检测
28+
29+
```
30+
$ python demo.py --config-file configs/vgg_ssd300_voc0712.yaml --images_dir demo --ckpt outputs/vgg_ssd300_voc0712/model_final.pth
31+
```

mkdocs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,6 @@ nav:
7474
- 'Hard Negative Mining': ssd/hard_negative_mining.md
7575
- variance变量: ssd/variance.md
7676
- 训练:
77-
- 训练日志: ssd/train_res.md
77+
- 使用命令: ssd/using_command.md
78+
- 训练日志: ssd/train_res.md
79+
- 测试日志: ssd/test_res.md

0 commit comments

Comments
 (0)