MemoryError: std::bad_alloc
See original GitHub issue- face_recognition version: last
- Python version: 3
- Operating System: Ubuntu
- CPU: Intel i3-6100
- RAM: 8GB
Hello! I use script encode_faces.py from https://www.pyimagesearch.com/2018/06/18/face-recognition-with-opencv-python-and-deep-learning/ for encoding my dataset in pickle. But I get error “MemoryError: std::bad_alloc” when [INFO] processing image 12/69.
[INFO] processing image 11/69
[INFO] processing image 12/69
Traceback (most recent call last):
File "encode_faces.py", line 45, in <module>
model=args["detection_method"])
File "/usr/local/lib/python2.7/dist-packages/face_recognition/api.py", line 116, in face_locations
return [_trim_css_to_bounds(_rect_to_css(face.rect), img.shape) for face in _raw_face_locations(img, number_of_times_to_upsample, "cnn")]
File "/usr/local/lib/python2.7/dist-packages/face_recognition/api.py", line 100, in _raw_face_locations
return cnn_face_detector(img, number_of_times_to_upsample)
MemoryError: std::bad_alloc
Help please. Thank you advance
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10 (1 by maintainers)
Top Results From Across the Web
std::bad_alloc - am I out of memory? - Stack Overflow
std ::bad_alloc means a problem with allocating a memory - so yes, you're most likely out of memory. Unfortunately, there is no a...
Read more >MemoryError: std::bad_alloc encountered on fresh install on ...
I get MemoryError: std::bad_alloc on a fresh install on the pytorch vm image on google cloud. Steps to reproduce: Start instance. export ...
Read more >bad_alloc is not out-of-memory! - open-std.org
A custom allocator can preallocate a chunk of heap memory and distribute it to its callers. When the preallocated memory is run out...
Read more >MemoryError: std::bad_alloc: rapids.ai Dask-cuDF-Pandas ...
Coding example for the question MemoryError: std::bad_alloc: rapids.ai Dask-cuDF-Pandas,Python.
Read more >Memory error: std::bad_alloc - YouTube
Memory error : std :: bad_alloc. Watch later. Share. Copy link. Info. Shopping. Tap to unmute. If playback doesn't begin shortly, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Resize your input images prior to passing them through the network. Your input images are too large and your GPU is running out of memory.
I have the same issue on virtuabox machine. When changing detection-method to hog instead of cnn it works