FaceDetection-DSFD
FaceDetection-DSFD copied to clipboard
Is it possible to use smaller GPU for inference?
I read about you training 8 images in a batch on P40. Is it possible to use the code with GTX 1080TI (12GB) with smaller batch size?
Hi @AmitRozner Of course. But Training with smaller batch size may reduce detection performance slightly.
My gpu is V100, 16G, when I run python demo.py --trained_model weights/WIDERFace_DSFD_RES152.pth --img_root data/worlds-largest-selfie.jpg It gets error: RuntimeError: CUDA out of memory Is it possible to use smaller GPU?
Hi @cqlyiyeshu I think that 16G is enough. you can try to use less scale in demo.py. especially for 2x.
@lijiannuist My gpu is 8G,how can i solve the error "RuntimeError: CUDA out of memory "?
error log is:
traceback (most recent call last):
File "demo.py", line 248, in
Hi @cqlyiyeshu I think that 16G is enough. you can try to use less scale in demo.py. especially for 2x.
@lijiannuist Do you mean resizing the input image to a smaller size?
Hi @cqlyiyeshu I think that 16G is enough. you can try to use less scale in demo.py. especially for 2x.
@lijiannuist Do you mean resizing the input image to a smaller size?
yes,i resize as 100x100
Hi, try to add torch.set_grad_enabled(False)
inside test_oneimage() function (at the beginning of the function) if your torch version is >= 0.4. It works for me.
You can use this https://github.com/vlad3996/FaceDetection-DSFD with original author's checkpoint
or try at least
with torch.no_grad():
to inference
My gpu is V100, 16G, when I run python demo.py --trained_model weights/WIDERFace_DSFD_RES152.pth --img_root data/worlds-largest-selfie.jpg It gets error: RuntimeError: CUDA out of memory Is it possible to use smaller GPU? 应该用的是0.4+的torch吧,内存没有释放,用0.3的torch就没问题了
My gpu is V100, 16G, when I run python demo.py --trained_model weights/WIDERFace_DSFD_RES152.pth --img_root data/worlds-largest-selfie.jpg It gets error: RuntimeError: CUDA out of memory Is it possible to use smaller GPU? 应该用的是0.4+的torch吧,内存没有释放,用0.3的torch就没问题了
用0.4+的torch确实会报内存不够,请问有什么方法可以释放内存嘛?我现在只能一张图片一张图片地测。