facebookresearch / pifuhd

High-Resolution 3D Human Digitization from A Single Image.
Other
9.49k stars 1.44k forks source link

Does running simple_test.py require a lot of cpu memory? #119

Open fei88988 opened 3 years ago

fei88988 commented 3 years ago

When I tried to run the test, the process was always killed by the system because it exceeded the memory range. The total memory of my CPU was 16G. Before the test process was killed, the CPU utilization of the test process reached 500%.

fei88988 commented 3 years ago

Can someone answer it, I will be grateful to your answer !

manncodes commented 3 years ago

Yes it does. I don't know much about Mac CPU utilization, but for Windows 8G CPU utilization will be 100% for time depending on the resolution parameter. 256x256 -> 50 sec 512x512 -> 3-4 min 1024x1024 -> 7 min

to improve memory usage, do following changes in recon.py:

-add following line after imports:

os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"

-after importing torch add line:

torch.cuda.empty_cache()

-for switching to CPU change line 145 to:

cuda = torch.device('cpu')

hope it helps.

GabbyYam commented 2 years ago

exactly the same problem, did you get a solution now?