schardong / ifmorph

Implementation of "Neural Implicit Morphing of Face Images", published on CVPR 2024
https://schardong.github.io/ifmorph/
MIT License
11 stars 1 forks source link

overlay_landmarks error #3

Closed manadopeee closed 1 month ago

manadopeee commented 1 month ago

I encountered an error during the process of running python warp-train.py --no-ui experiments/001_002.yaml. When overlay_landmarks=True is set in create_morphing, running python warp-train.py --no-ui experiments/001_002.yaml results in the following error:

0 198076.71875 1000 6930.771484375 2000 8996.615234375 3000 10698.48046875 4000 10069.029296875 5000 8267.44921875 6000 7299.728515625 7000 7660.1416015625 8000 7170.361328125 9000 6033.4658203125 10000 6467.5703125 Running the inference. Inference done. 11000 6084.212890625 12000 5930.025390625 13000 6138.15234375 14000 5939.9580078125 15000 5619.75244140625 16000 5773.9833984375 17000 4494.8466796875 18000 3961.1806640625 19000 4003.2822265625 20000 3432.94580078125 Running the inference. Inference done. 21000 3206.6298828125 Training done. Best results at step 20767, with loss 3043.38232421875. Saving the results in folder results/001_002. Running the inference. Traceback (most recent call last): File "/workspace/ifmorph/warp-train.py", line 356, in train_warping(p, o, args) File "/workspace/ifmorph/warp-train.py", line 268, in train_warping create_morphing( File "/workspace/ifmorph/ifmorph/util.py", line 571, in create_morphing ).detach().cpu().numpy() AttributeError: 'tuple' object has no attribute 'detach'

schardong commented 1 month ago

Hi @manadopeee, Its likely an error I introduced in the code. I'll check and fix this as soon as possible.

schardong commented 1 month ago

A, found the issue! I moved the detach().cpu().numpy() calls to y, since the warp_points function now returns a tuple instead of a tensor. I've fixed this on commit 34fcfd3. If you find any issues, just ask!