lufficc / SSD

High quality, fast, modular reference implementation of SSD in PyTorch
MIT License
1.51k stars 385 forks source link

Why does the speed become slow after replacing backbone with MobileNet? #183

Open WesterL opened 3 years ago

WesterL commented 3 years ago

The speed of VGG backbone is 45FPS. When I replaced VGG with MobileNetV2, although the memory becomes small, the speed becomes half slower than that of VGG, only 26fps. Is this normal?

lufficc commented 3 years ago

What's your env? It costs 17s for MobileNetV2 and 25s for VGG to eval 4952 images on my machine (2 GPUs).

WesterL commented 3 years ago

What's your env? It costs 17s for MobileNetV2 and 25s for VGG to eval 4952 images on my machine (2 GPUs). 我的gpu是1070,SSD-VGG的检测速度基本上和您在readme展示的一样,但是SSD-MobileNet速度慢了一些,

Damon2019 commented 3 years ago

May I ask how to use GPU to calculate the time of pictures

SamSamhuns commented 3 years ago

@Damon2019 , the code uses GPU by default, but you obviously need a Cuda-enabled system. The configurations are at ssd/configs/defaults.py where _C.MODEL.DEVICE = "cuda"