Closed Uklosk closed 6 years ago
What are the width and height and the filesize of 32341.jpg ?
1080x1262
I have tried to remove it and the same happens with other images of similar size.
Dammit, I suppose it is a problem of face_recognition, but 4GB should be enough for those images.
The problem does not come from face_recognition
, which uses dlib methods. The dlib's author also has no other advice than reducing image size
just crop the face and resize to 512-ish. The final face gets scaled to 256x256 anyway.
I'm trying to find the max size I can safely use and resize all images bigger than that automatically.
Use ImageResizer. Select all images, right click -> Resize pictures. Then select Custom : Scale to 900x900 pixels.
It'll make sure the max(width, height) is 900 pixels (keeping the aspect ratio)
You can do this but keep in mind you will have the same problem on the convert command (unless we do save alignments, see #135 )
Thanks.
For those interested, in Linux install ImageMagick and then:
for file in *.png *.jpg *.jpeg; do convert $file -resize 1000\>x1000\> $file; done
That will downscale all images if either their height or width is bigger than 1000 while keeping their aspect ratio.
Expected behavior
Same behaviour as using the CPU.
Actual behavior
After a few images:
Failed to extract from image: images-dir/32341.jpg. Reason: Error while calling cudaMalloc(&data, n) in file dlib-dir/dnn/cuda_data_ptr.cpp:28. code: 2, reason: out of memory
Steps to reproduce
Using dlib with CUDA support: Extract a folder with a few hundred images using CNN detector.
Other relevant information