chaofengc / PSFRGAN

PyTorch codes for "Progressive Semantic-Aware Style Transformation for Blind Face Restoration", CVPR2021
Other
370 stars 68 forks source link

Segmentation fault (core dumped) #38

Closed chensjtu closed 3 years ago

chensjtu commented 3 years ago

Thanks for your great work, I conduct the code and it works well. But after all the code is running over (the results are generated), it occurs "core dumped". This is really weird and I really don't know what happened. Here are the prints:

model [EnhanceModel] was created Loading pretrained LQ face parsing network from ./pretrain_models/parse_multi_iter_90000.pth Loading pretrained PSFRGAN from ./pretrain_models/psfrgan_epoch15_net_G.pth ======> Loading image test_dir/Solvay_conference_1927.jpg ======> Saving aligned LQ faces to test_unalign_results/Solvay_conference_1927/LQ_faces 100%|█████████████████████████████████████████████| 29/29 [00:02<00:00, 10.87it/s] ======> Save parsing map and the enhanced faces. ======> Paste the enhanced faces back to the original image. 100%|█████████████████████████████████████████████| 29/29 [00:13<00:00, 2.16it/s] ======> Save final result to test_unalign_results/Solvay_conference_1927/hq_final.jpg ======> Loading image test_dir/test_hzgg.jpg ======> Saving aligned LQ faces to test_unalign_results/test_hzgg/LQ_faces 100%|███████████████████████████████████████████████| 3/3 [00:00<00:00, 11.32it/s] ======> Save parsing map and the enhanced faces. ======> Paste the enhanced faces back to the original image. 100%|███████████████████████████████████████████████| 3/3 [00:00<00:00, 11.76it/s] ======> Save final result to test_unalign_results/test_hzgg/hq_final.jpg Segmentation fault (core dumped)

chaofengc commented 3 years ago

Thank you for interest. The code works fine in my own machine. I am not able to help you without further details to reproduce the bug.

chenruolin2019 commented 3 years ago

According to the code, the addition of residuals should be added after ST Block, but the figure shows that the addition is performed before ST Block. img

chaofengc commented 3 years ago

Thank you for pointing out this problem. I am sorry that the figure is just simple illustrations. The ST block is applied after every convolution layers. We cannot think a better way to draw the figure. If there are any inconsistency between the figure and the codes, please always follow the codes.