evan

:mag: python package to evaluate GANs for video generation

https://github.com/raahii/evan

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary

Keywords

deep-learning deep-neural-networks gan gans generative-adversarial-network video video-generation videos
Last synced: 6 months ago · JSON representation

Repository

:mag: python package to evaluate GANs for video generation

Basic Info
  • Host: GitHub
  • Owner: raahii
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 371 KB
Statistics
  • Stars: 21
  • Watchers: 2
  • Forks: 6
  • Open Issues: 0
  • Releases: 0
Topics
deep-learning deep-neural-networks gan gans generative-adversarial-network video video-generation videos
Created about 7 years ago · Last pushed almost 6 years ago

https://github.com/raahii/evan/blob/master/

Library and CLI tool for evaluating video GANs

build

"Evan" automates GAN evaluation for video generation. The library gives two advantages for you. 1. You don't need to **prepare the Inception Model and process your samples for evaluation**. 2. You don't need to **find source codes or write algorithm of each GAN metric**. Now, evan supports following metrics. - Inception Score [1] - Frechet Inception Distace [2] - Precision and Recall for Distributions [3] ## Installation Required - Python 3.6 or higher - [FFmpeg](https://github.com/adaptlearning/adapt_authoring/wiki/Installing-FFmpeg) ``` $ pip install evan ``` ## Example See examples directory or docs for details. ```python import torch from pathlib import Path import skvideo.io import evan gen = YourGenerater() N = 5000 batchsize = 100 temp = tempfile.TemporaryDirectory() temp_dir = Path(temp.name) fps = 30 # generate video samples by your GAN and # save them into a directory in .mp4 for batch in range(0, N, batchsize): xs = gen.generate(batchsize) # (B, T, H, W, C) for i, x in enumerate(xs): path = str(temp_dir / f"{i}.mp4") writer = skvideo.io.FFmpegWriter(path, inputdict={"-r": str(fps)}) for frame in video: writer.writeFrame(frame) # compute Inception Score by using evan score = evan.compute_inception_score( temp_dir, batchsize=batchsize, verbose=True ) # >> found 10000 samples. # >> converting videos into conv features using inception model (on gpu)... # 100%|| 10000/10000 [XX:XX> computing IS... # generated samples: '/var/folders/k4/xxx/probs.npy' print(score) temp.cleanup() ``` ## CLI ``` evan -h usage: evan [-h] {compute,plot} ... a tool for evaluation video GANs. optional arguments: -h, --help show this help message and exit subcommands: command names. {compute,plot} compute compute evaluation score. plot visualize evaluation result. ``` ## Details ### Evaluation flow

WIP ### Inception Model WIP ### Reference - [1] "Improved Techniques for Training GANs", https://arxiv.org/abs/1606.03498 - [2] "GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium", https://arxiv.org/abs/1706.08500 - [3] "Assessing Generative Models via Precision and Recall", https://arxiv.org/abs/1806.00035 - [4] "An empirical study on evaluation metrics of generative adversarial networks", https://arxiv.org/abs/1806.07755

Owner

  • Name: raahii
  • Login: raahii
  • Kind: user
  • Location: Japan

web engineer

GitHub Events

Total
Last Year

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 42
  • Total Committers: 1
  • Avg Commits per committer: 42.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
raahii p****t@g****m 42

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 4
  • Total pull requests: 0
  • Average time to close issues: 6 months
  • Average time to close pull requests: N/A
  • Total issue authors: 4
  • Total pull request authors: 0
  • Average comments per issue: 3.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • abhishekaich27 (1)
  • raahii (1)
  • liangbingzhao (1)
  • RenYurui (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • googledrivedownloader *
  • matplotlib *
  • numpy *
  • opencv-python *
  • requests *
  • scikit-learn *
  • scikit-video *
  • torch >=1.2.0
  • tqdm *