junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
22.8k stars 6.29k forks source link

How to use test.py to test both directions for cyclegan? #1623

Closed lamwilton closed 7 months ago

lamwilton commented 7 months ago

I ran test.py but it is only giving results from A to B, but I want the results from B to A also. Putting --direction BtoA only switches the input but not the model. Thank you

lamwilton commented 7 months ago

For testing B to A direction, I have to manually rename the model to switch A and B which is so dumb, which is latest_net_G_A.pth to latest_net_G_B.pth and vice versa. Then adding —direction BtoA for test.py run will give the correct result