New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Malloc - Runs Out Of Memory #257
Comments
How big is your image and how much memory does your GPU have onboard? It sounds like the GPU itself doesn't have enough memory. You can check with the nvidia-smi command line tool. |
Images are approximately 800K Is my GPU not good enough? |
Updating to the latest DLIB now gives the error -
|
What is the size of the image in pixels? Does it work if you scale the image way down in size? Two gigs isn't very much for a GPU. |
Scaling the images down to 800x600 makes the application function. It would appear that my hardware is unable to handle images that are much larger than that. Thank you for your assistance in this matter. |
Hi, Have u settled it? I'm now having the same question. how to do it?? |
it is about the batch(128), i changed it to 32. and it is well done |
Hi All, So what was the actual solution? How to fix the error without scaling the image down? Thanks |
@Mekhak Your only solution is to get more ram and a better video card or to scale your images to a lower resolution. |
Hi All, @IWriteThings Down-scaling image solves the problem but it decreases the detection accuracy. I am using 8GB Geforce 1070 TI. But I am wondering how much GPU memory requires DLib's face_detection model at python face_locations(img, number_of_times_to_upsample) function call point? I have debugged the DLib's face detection part: the cudaMalloc out of memory crash happens here: file: "dlib/tools/python/src/cnn_face_detector.cpp" An high resolution image (say 1200:1340) with number_of_times_to_upsample = 2 is "eating" the whole 8 GB GPU memory and the cudaMalloc out of memory crash happens. Can please anyone point whether the specified resolution, upsample number and memory usage are normal for face_detector model? Thanks and Regards, |
@moguzozcan There is not a solution which can make face_locations() function not to use such a huge memory. The only things you can so are to use more powerful GPU and scale the input images down. |
My experience is 4GB-memory GTX 1050 Ti can handle 30002000 image, but failed with 32502170 one. |
I have GPU GeForce GTX 1080 Ti with 11177MiB.
How much further should I resize the image and how, to run it on a greater number of upsamples? |
If you use number_of_times_to_upsample=3, you are asking it to double the image, double it again, and double it again. With a 1920x1080 image, that's a huge amount of pixel data, so it makes sense it won't fit into GPU memory. On the other hand, there's no reason to shrink the image more (losing quality) only to turn around and upsample it more. That's not accomplishing anything except shrinking and un-shrinking the size of the image. It would be better to keep the image the original size and upsample less. |
I'm running into the same issue.
All my other cuda accelerated DL models are not throwing the same error. |
I have memory problems too
|
Description
When attempting to identify faces, I use face_location with model="cnn". It should work but it instead fails.
What I Did
The text was updated successfully, but these errors were encountered: