--- id: pytorch-fid version: "0.3.0" license: unclear license_treatment: permissive maintenance: dormant --- # pytorch-fid — Package for calculating Frechet Inception Distance (FID) using PyTorch License: permissive · Maintenance: dormant · Downloads: 153.2K/mo ## What it is and what it does pytorch-fid is a PyTorch implementation of the Fréchet Inception Distance metric, originally developed to evaluate generative model quality by measuring statistical distance between real and generated image distributions. It computes FID by fitting Gaussians to feature representations extracted from the Inception network and calculating the Fréchet distance between them. The package provides a command-line interface to compute FID scores between two image folders, with options to use different Inception layers (64, 192, 768, or 2048 dimensions) and GPU acceleration. It can also pre-compute and cache dataset statistics as .npz files for repeated comparisons. The weights and model match the official implementation, though results may differ slightly due to image interpolation and backend differences. Use it for: - Evaluate generative adversarial network (GAN) sample quality during training or model comparison - Measure similarity between real and synthetic image datasets for validation - Pre-compute and cache statistics from a reference dataset to benchmark multiple models against it - Compare image generation models using a standardized metric that correlates with human visual quality judgment - Use lower-dimensional Inception features when comparing datasets with fewer than 2048 images ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Computes Fréchet Inception Distance (FID), a metric for measuring similarity between two image datasets using PyTorch and the Inception network. Yes, if you need FID evaluation for generative models in PyTorch. The package is stable, permissively licensed, and has low install friction. However, maintenance is dormant (last release January 2023); verify current compatibility with your PyTorch version first. Results differ slightly from the original implementation, so check whether exact reproducibility matters for your use case. ## Install pip install pytorch-fid uv add pytorch-fid poetry add pytorch-fid ## Installing pytorch-fid Before you install: Low friction install with standard dependencies. Dormant maintenance status (last release January 2023) means no active development, but the package is stable. License in practice: Licensed under Apache License 2.0 (permissive), allowing commercial and private use with minimal restrictions. Quickstart: pip install pytorch-fid python -m pytorch_fid path/to/dataset1 path/to/dataset2 # Or with GPU acceleration: python -m pytorch_fid --device cuda:0 path/to/dataset1 path/to/dataset2 Requires PyTorch and torchvision installed; GPU acceleration requires CUDA-capable hardware. Verify before relying: - Whether results remain comparable to official TensorFlow implementation given reported interpolation differences - Current compatibility with recent PyTorch and torchvision versions beyond requires_python >=3.5 ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 153.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags FID score calculation, image quality evaluation metric, generative model evaluation, inception distance pytorch, GAN sample quality assessment, frechet distance images, dataset similarity measurement, generative-models, image-metrics, evaluation [View on SkillFed](https://skillfed.io/packages/pytorch-fid) · [View on PyPI](https://pypi.org/project/pytorch-fid/)