dsod.pytorch icon indicating copy to clipboard operation
dsod.pytorch copied to clipboard

About nms

Open zeroMrCc opened this issue 6 years ago • 2 comments
trafficstars

I have met the problem: ImportError: No module named 'torchcv.models.ssd.nms._ext' how to implement the nms module?

zeroMrCc avatar Dec 27 '18 14:12 zeroMrCc

got the same error, anybody have a solution?

ShangyinGao avatar Apr 15 '19 12:04 ShangyinGao

just figured out the reason. ._ext includes a gpu version of box_nms, to use this method, you should first compile the source code in torchcv/models/ssd/nms/ by using make.sh

another solution is just comment line 9 in box_coder.py and change line 122 in same file to keep = box_gpu(torch.cat([box,score[:,None]],1).cuda(),nms_thresh).cpu() as here

ShangyinGao avatar Apr 15 '19 12:04 ShangyinGao