{"library":"pytorch-fid","title":"PyTorch FID","description":"A PyTorch implementation of the Frechet Inception Distance (FID) for evaluating generative models. Version 0.3.0 is the latest stable release. The package is mature with infrequent releases.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install pytorch-fid"],"cli":{"name":"pytorch-fid","version":""}},"imports":["from pytorch_fid import fid_score; fid_score.calculate_fid_given_paths(paths, batch_size, device, dims, num_workers)"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import torch\nfrom pytorch_fid import fid_score\n\npaths = ['path/to/real/images', 'path/to/fake/images']\n\n# Use GPU if available\ndevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n\n# Calculate FID\nfid_value = fid_score.calculate_fid_given_paths(paths, batch_size=50, device=device, dims=2048, num_workers=8)\nprint('FID:', fid_value)","lang":"python","description":"Example of calculating FID between two directories of images.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}