-
Notifications
You must be signed in to change notification settings - Fork 112
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
Memory Error #2
Comments
As you posted, the line that is throwing the error is:
This is a simple Numpy matrix addition which shouldn't be a problem. It seems that you are running out of memory to perform this operation. Are you seeing this error specifically after frontalizing more than 300 images? Are you keeping all those images in memory? I suggest you keep track of your memory usage. One thing you can do is write the image to disk after you frontalize in order to free memory space. If you want to go further, you can check which Numpy operations are not inplace and optimize the memory usage as they mention here: http://stackoverflow.com/questions/4318615/python-numpy-memoryerror. But I don't think this would solve the problem if you're trying to keep this many images loaded in memory. Hope it helps! |
Hi @dougsouza |
Hi @haridatascientist |
Hi,
I run demo.py for a single image. it worked well
When I run more than 300 images in a loop in windows 32bit it shows the following error
Traceback (most recent call last):
File "demo.py", line 75, in
demo()
File "demo.py", line 57, in demo
frontal_raw, frontal_sym = frontalize.frontalize(img, proj_matrix, model3D.r
ef_U, eyemask)
File "C:\Users\Hubino\Downloads\face-frontalization-master\face-frontalization
-master\frontalize.py", line 88, in frontalize
denominator = weights + weight_take_from_org + weight_take_from_sym
MemoryError
How to avoid the memory error
Thanks in advance for your valuable help
The text was updated successfully, but these errors were encountered: