Open 18445864529 opened 6 months ago
Hi @18445864529 , thanks for your interest in my implementation.
I believe the data range should be 0 ~ 1
.
Thank you for the prompt reply.
For my data, when I tried 0 ~ 1
, the resulting value was 0.0149, -1 ~ 1
was 0.125, and 0 ~ 255
was billion. None of them seems correct.
I also tried a=torch.rand(50,3,20,256,256); b=0.9*a; compute_fvd(a,b)
, and the result was also 0.0018, which does not seem right.
What is the probable reason?
You are right this does not seem correct and does not correspond to the values I got with the implementation. I'm sorry currently I do not know how to fix the problem. If the problem persists I would recommend contacting the authors of the StyleGAN-V repository as my implementation is 90% taken from their source code and uses their pretrained model. If you discover a solution please inform me!
Yes I am also getting relly low results for that!
Simply load the model like this: def load_i3d(device='cuda'): """Load the I3D model from PyTorch Hub.""" detector_url = 'https://www.dropbox.com/s/ge9e5ujwgetktms/i3d_torchscript.pt?dl=1' detector_kwargs = dict(rescale=False, resize=False, return_features=True) # Return raw features before the softmax layer. with open_url(detector_url, verbose=False) as f: detector = torch.jit.load(f).eval().to(device) return detector See: https://github.com/universome/fvd-comparison/tree/master
@samueleruffino99 I tried to implement your fix, however, I get almost the exact same values using my model load and the function you proposed (and the function used in the original repository). You can find my implementation and some experiments in the fix-model-load branch. Maybe I did something wrong?
If you would open a Pull Request with a working fix, I would be happy to merge it!
Hi @ragor114 . In the original StyleGAN-V repo, doesn't this line indicate that the input range should be [0, 255] as uint8?
0~255
or0~1
or-1~1
? Thanks!