Skip to content

Commit 38b6373

Browse files
committed
docs(ssd): 测试结果分析
1 parent a72bce8 commit 38b6373

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/ssd/test_res.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
测试检测结果,计算`FPS`
55

6+
## 测试日志
7+
68
```
79
$ python demo.py --config-file configs/vgg_ssd300_voc0712.yaml --images_dir demo --ckpt outputs/vgg_ssd300_voc0712/model_final.pth
810
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)
@@ -83,4 +85,29 @@ Consider using one of the following signatures instead:
8385
(0003/0005) 003123.jpg: objects 08 | load 004ms | inference 012ms | FPS 81
8486
(0004/0005) 000342.jpg: objects 02 | load 003ms | inference 013ms | FPS 79
8587
(0005/0005) 008591.jpg: objects 02 | load 004ms | inference 013ms | FPS 77
88+
```
89+
90+
## 分析
91+
92+
第一次推导时间(`inference 170ms`)大大超过后续的推导时间(`inference 014ms`
93+
94+
相关文件
95+
96+
* `py/ssd/models/box_head/box_head.py`
97+
98+
第一次推导需要额外计算先验框,所以需要更多的推导时间
99+
100+
```
101+
@registry.BOX_HEADS.register('SSDBoxHead')
102+
class SSDBoxHead(nn.Module):
103+
def __init__(self, cfg):
104+
。。。
105+
。。。
106+
self.priors = None
107+
108+
def _forward_test(self, cls_logits, bbox_pred):
109+
if self.priors is None:
110+
self.priors = PriorBox(self.cfg)().to(bbox_pred.device)
111+
。。。
112+
。。。
86113
```

0 commit comments

Comments
 (0)