• Stars
    star
    2,089
  • Rank 22,116 (Top 0.5 %)
  • Language
    C++
  • License
    Other
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An End-To-End, Lightweight and Flexible Platform for Game Research

ELF: An Extensive, Lightweight and Flexible Platform for Game Research

Overview

ELF is an Extensive, Lightweight and Flexible platform for game research, in particular for real-time strategy (RTS) games. On the C++-side, ELF hosts multiple games in parallel with C++ threading. On the Python side, ELF returns one batch of game state at a time, making it very friendly for modern RL. In comparison, other platforms (e.g., OpenAI Gym) wraps one single game instance with one Python interface. This makes concurrent game execution a bit complicated, which is a requirement of many modern reinforcement learning algorithms.

Besides, ELF now also provides a Python version for running concurrent game environments, by Python multiprocessing with ZeroMQ inter-process communication. See ./ex_elfpy.py for a simple example.

For research on RTS games, ELF comes with an fast RTS engine, and three concrete environments: MiniRTS, Capture the Flag and Tower Defense. MiniRTS has all the key dynamics of a real-time strategy game, including gathering resources, building facilities and troops, scouting the unknown territories outside the perceivable regions, and defend/attack the enemy. User can access its internal representation and can freely change the game setting.

Overview

ELF has the following characteristics:

  • End-to-End: ELF offers an end-to-end solution to game research. It provides miniature real-time strategy game environments, concurrent simulation, intuitive APIs, web-based visualzation, and also comes with a reinforcement learning backend empowered by Pytorch with minimal resource requirement.

  • Extensive: Any game with C/C++ interface can be plugged into this framework by writing a simple wrapper. As an example, we already incorporate Atari games into our framework and show that the simulation speed per core is comparable with single-core version, and is thus much faster than implementation using either multiprocessing or Python multithreading. In the future, we plan to incorporate more environments, e.g., DarkForest Go engine.

  • Lightweight: ELF runs very fast with minimal overhead. ELF with a simple game (MiniRTS) built on RTS engine runs 40K frame per second per core on a MacBook Pro. Training a model from scratch to play MiniRTS takes a day on 6 CPU + 1 GPU.

  • Flexible: Pairing between environments and actors is very flexible, e.g., one environment with one agent (e.g., Vanilla A3C), one environment with multiple agents (e.g., Self-play/MCTS), or multiple environment with one actor (e.g., BatchA3C, GA3C). Also, any game built on top of the RTS engine offers full access to its internal representation and dynamics. Besides efficient simulators, we also provide a lightweight yet powerful Reinforcement Learning framework. This framework can host most existing RL algorithms. In this open source release, we have provided state-of-the-art actor-critic algorithms, written in PyTorch.

Tutorials

See here.

Install scripts

You need to have cmake >= 3.8, gcc >= 4.9 and tbb (linux libtbb-dev) in order to install this script successfully.

# Download miniconda and install. 
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/miniconda.sh
/bin/bash $HOME/miniconda.sh -b
$HOME/miniconda3/bin/conda update -y --all python=3

# Add the following to ~/.bash_profile (if you haven't already) and source it:
export PATH=$HOME/miniconda3/bin:$PATH

# Create a new conda environment and install the necessary packages:
conda create -n elf python=3
source activate elf
# If you use cuda 8.0
# conda install pytorch cuda80 -c soumith
conda install pytorch -c soumith 

pip install --upgrade pip
pip install msgpack_numpy
conda install tqdm
conda install libgcc

# Install cmake >= 3.8, gcc >= 4.9 and libtbb-dev
# This is platform-dependent.

# Clone and build the repository:
cd ~
git clone https://github.com/facebookresearch/ELF
cd ELF/rts/
mkdir build && cd build
cmake .. -DPYTHON_EXECUTABLE=$HOME/miniconda3/bin/python
make

# Train the model
cd ../..
sh ./train_minirts.sh --gpu 0

Supported Environments

Any game with C/C++ interface can be plugged into this framework by writing a simple wrapper. Currently we have the following environment:

  1. MiniRTS and its extensions (./rts)
    A miniature real-time strategy game that captures the key dynamics of its genre, including building workers, collecting resources, exploring unseen territories, defend the enemy and attack them back. The game runs extremely fast (40K FPS per core on a laptop) to faciliate the usage of many existing on-policy reinforcement learning approaches.

  2. Atari games (./atari)
    We incorporate Arcade Learning Environment (ALE) into ELF so that you can load any rom and run 1000 concurrent game instances easily.

  3. Go engine (./go)
    We reimplement our DarkForest Go engine in ELF platform. Now you can easily load a bunch of .sgf files and train your own Go AI with minimal resource requirements (i.e., a single GPU plus a week).

Reference

When you use ELF, please reference the paper with the following BibTex entry:

ELF: An Extensive, Lightweight and Flexible Research Platform for Real-time Strategy Games
Yuandong Tian, Qucheng Gong, Wenling Shang, Yuxin Wu, C. Lawrence Zitnick
NIPS 2017

@article{tian2017elf, 
  title={ELF: An Extensive, Lightweight and Flexible Research Platform for Real-time Strategy Games},
  author={Yuandong Tian and Qucheng Gong and Wenling Shang and Yuxin Wu and C. Lawrence Zitnick},
  journal={Advances in Neural Information Processing Systems (NIPS)},
  year={2017}
}

Relevant Materials

Slides in ICML Video Games and Machine Learning (VGML) workshop.

Demo. Top-left is trained bot while bottom-right is rule-based bot.

Documentation

Check here for detailed documentation. You can also compile your version in ./doc using sphinx.

Basic Usage

ELF is very easy to use. The initialization looks like the following:

# We run 1024 games concurrently.
num_games = 1024

# Wait for a batch of 256 games.
batchsize = 256  

# The return states contain key 's', 'r' and 'terminal'
# The reply contains key 'a' to be filled from the Python side.
# The definitions of the keys are in the wrapper of the game.  
input_spec = dict(s='', r='', terminal='')
reply_spec = dict(a='')

context = Init(num_games, batchsize, input_spec, reply_spec)

The main loop is also very simple:

# Start all game threads and enter main loop.
context.Start()  
while True:
    # Wait for a batch of game states to be ready
    # These games will be blocked, waiting for replies.
    batch = context.Wait()

    # Apply a model to the game state. The output has key 'pi'
    # You can do whatever you want here. E.g., applying your favorite RL algorithms.
    output = model(batch)

    # Sample from the output to get the actions of this batch.
    reply['a'][:] = SampleFromDistribution(output)

    # Resume games.
    context.Steps()   

# Stop all game threads.
context.Stop()  

Please check train.py and eval.py for actual runnable codes.

Dependency

C++ compiler with C++11 support (e.g., gcc >= 4.9) is required. The following libraries are required tbb. CMake >=3.8 is also required.

Python 3.x is required. In addition, you need to install following package: PyTorch version 0.2.0+, tqdm, zmq, msgpack, msgpack_numpy

How to train

To train a model for MiniRTS, please first compile ./rts/game_MC (See the instruction in ./rts/ using cmake). Note that a compilation of ./rts/backend is not necessary for training, unless you want to see visualization.

Then please run the following commands in the current directory (you can also reference train_minirts.sh):

game=./rts/game_MC/game model=actor_critic model_file=./rts/game_MC/model \ 
python3 train.py 
    --num_games 1024 --batchsize 128                                                                  # Set number of games to be 1024 and batchsize to be 128.  
    --freq_update 50                                                                                  # Update behavior policy after 50 updates of the model.
    --players "fs=50,type=AI_NN,args=backup/AI_SIMPLE|delay/0.99|start/500;fs=20,type=AI_SIMPLE"      # Specify AI and its opponent, separated by semicolon. `fs` is frameskip that specifies How often your opponent makes a decision (e.g., fs=20 means it acts every 20 ticks)
                                                                                                      # If `backup` is specified in `args`, then we use rule-based AI for the first `start` ticks, then trained AI takes over. `start` decays with rate `decay`. 
    --tqdm                                                                  # Show progress bar.
    --gpu 0                                                                 # Use first gpu. If you don't specify gpu, it will run on CPUs. 
    --T 20                                                                  # 20 step actor-critic
    --additional_labels id,last_terminal         
    --trainer_stats winrate                                                 # If you want to see the winrate over iterations. 
                                                                            # Note that the winrate is computed when the action is sampled from the multinomial distribution (not greedy policy). 
                                                                            # To evaluate your model more accurately, please use eval.py.

Note that long horizon (e.g., --T 20) could make the training much faster and (at the same time) stable. With long horizon, you should be able to train it to 70% winrate within 12 hours with 16CPU and 1GPU. You can control the number of CPUs used in the training using taskset -c.

Here is one trained model with 80% winrate against AI_SIMPLE for frameskip=50. Here is one game replay.

The following is a sample output during training:

Version:  bf1304010f9609b2114a1adff4aa2eb338695b9d_staged
Num Actions:  9
Num unittype:  6
100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 5000/5000 [01:35<00:00, 52.37it/s]
[2017-07-12 09:04:13.212017][128] Iter[0]:
Train count: 820/5000, actor count: 4180/5000
Save to ./
Filename = ./save-820.bin
Command arguments run.py --batchsize 128 --freq_update 50 --fs_opponent 20 --latest_start 500 --latest_start_decay 0.99 --num_games 1024 --opponent_type AI_SIMPLE --tqdm
0:acc_reward[4100]: avg: -0.34079, min: -0.58232[1580], max: 0.25949[185]
0:cost[4100]: avg: 2.15912, min: 1.97886[2140], max: 2.31487[1173]
0:entropy_err[4100]: avg: -2.13493, min: -2.17945[438], max: -2.04809[1467]
0:init_reward[820]: avg: -0.34093, min: -0.56980[315], max: 0.26211[37]
0:policy_err[4100]: avg: 2.16714, min: 1.98384[1520], max: 2.31068[1176]
0:predict_reward[4100]: avg: -0.33676, min: -1.36083[1588], max: 0.39551[195]
0:reward[4100]: avg: -0.01153, min: -0.13281[1109], max: 0.04688[124]
0:rms_advantage[4100]: avg: 0.15646, min: 0.02189[800], max: 0.79827[564]
0:value_err[4100]: avg: 0.01333, min: 0.00024[800], max: 0.06569[1549]

 86%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‰                    | 4287/5000 [01:23<00:15, 46.97it/s]

To evaluate a model for MiniRTS, try the following command (you can also reference eval_minirts.sh):

game=./rts/game_MC/game model=actor_critic model_file=./rts/game_MC/model \ 
python3 eval.py 
    --load [your model]
    --batchsize 128 
    --players "fs=50,type=AI_NN;fs=20,type=AI_SIMPLE"  
    --num_games 1024 
    --num_eval 10000
    --tqdm                          # Nice progress bar
    --gpu 0                         # Use GPU 0 as the evaluation gpu.
    --additional_labels id          # Tell the game environment to output additional dict entries.
    --greedy                        # Use greedy policy to evaluate your model. If not specified, then it will sample from the action distributions. 

Here is an example output (it takes 1 min 40 seconds to evaluate 10k games with 12 CPUs):

Version:  dc895b8ea7df8ef7f98a1a031c3224ce878d52f0_
Num Actions:  9
Num unittype:  6
Load from ./save-212808.bin
Version:  dc895b8ea7df8ef7f98a1a031c3224ce878d52f0_
Num Actions:  9
Num unittype:  6
100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 10000/10000 [01:40<00:00, 99.94it/s]
str_acc_win_rate: Accumulated win rate: 0.735 [7295/2628/9923]
best_win_rate: 0.7351607376801297
new_record: True
count: 0
str_win_rate: [0] Win rate: 0.735 [7295/2628/9923], Best win rate: 0.735 [0]
Stop all game threads ...

SelfPlay

Try the following script if you want to do self-play in Minirts. It will start with two bots, both starting with the pre-trained model. One bot will be trained over time, while the other is held fixed. If you just want to check their winrate without training, try --actor_only.

sh ./selfplay_minirts.sh [your pre-trained model] 

Visualization

To visualize a trained bot, you can specify --save_replay_prefix [replay_file_prefix] when running eval.py to save (lots of) replays. Note that the same flag can also be applied to training/selfplay.

All replay files contain action sequences, are in .rep and should reproduce the exact same game when loaded. To load the replay in the command line, using the following:

./minirts-backend replay --load_replay [your replay] --vis_after 0

and open the webpage ./rts/frontend/minirts.html to check the game. To load and run the replay in the command line only (e.g, if you just want to quickly see who win the game), try:

./minirts-backend replay_cmd --load_replay [your replay]

More Repositories

1

llama

Inference code for LLaMA models
Python
44,989
star
2

segment-anything

The repository provides code for running inference with the SegmentAnything Model (SAM), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.
Jupyter Notebook
42,134
star
3

Detectron

FAIR's research platform for object detection research, implementing popular algorithms like Mask R-CNN and RetinaNet.
Python
25,771
star
4

fairseq

Facebook AI Research Sequence-to-Sequence Toolkit written in Python.
Python
25,718
star
5

detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
Python
25,567
star
6

fastText

Library for fast text representation and classification.
HTML
24,973
star
7

faiss

A library for efficient similarity search and clustering of dense vectors.
C++
24,035
star
8

audiocraft

Audiocraft is a library for audio processing and generation with deep learning. It features the state-of-the-art EnCodec audio compressor / tokenizer, along with MusicGen, a simple and controllable music generation LM with textual and melodic conditioning.
Python
19,691
star
9

codellama

Inference code for CodeLlama models
Python
13,303
star
10

sam2

The repository provides code for running inference with the Meta Segment Anything Model 2 (SAM 2), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.
Jupyter Notebook
11,906
star
11

detr

End-to-End Object Detection with Transformers
Python
11,076
star
12

seamless_communication

Foundational Models for State-of-the-Art Speech and Text Translation
Jupyter Notebook
10,584
star
13

ParlAI

A framework for training and evaluating AI models on a variety of openly available dialogue datasets.
Python
10,085
star
14

maskrcnn-benchmark

Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch.
Python
9,104
star
15

pifuhd

High-Resolution 3D Human Digitization from A Single Image.
Python
8,923
star
16

hydra

Hydra is a framework for elegantly configuring complex applications
Python
8,550
star
17

nougat

Implementation of Nougat Neural Optical Understanding for Academic Documents
Python
8,088
star
18

AnimatedDrawings

Code to accompany "A Method for Animating Children's Drawings of the Human Figure"
Python
8,032
star
19

ImageBind

ImageBind One Embedding Space to Bind Them All
Python
7,630
star
20

llama-recipes

Scripts for fine-tuning Llama2 with composable FSDP & PEFT methods to cover single/multi-node GPUs. Supports default & custom datasets for applications such as summarization & question answering. Supporting a number of candid inference solutions such as HF TGI, VLLM for local or cloud deployment.Demo apps to showcase Llama2 for WhatsApp & Messenger
Jupyter Notebook
7,402
star
21

pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
Python
7,322
star
22

dinov2

PyTorch code and models for the DINOv2 self-supervised learning method.
Jupyter Notebook
7,278
star
23

DensePose

A real-time approach for mapping all human pixels of 2D RGB images to a 3D surface-based model of the body
Jupyter Notebook
6,547
star
24

pytext

A natural language modeling framework based on PyTorch
Python
6,357
star
25

DiT

Official PyTorch Implementation of "Scalable Diffusion Models with Transformers"
Python
5,995
star
26

metaseq

Repo for external large-scale work
Python
5,947
star
27

demucs

Code for the paper Hybrid Spectrogram and Waveform Source Separation
Python
5,886
star
28

SlowFast

PySlowFast: video understanding codebase from FAIR for reproducing state-of-the-art video models.
Python
5,678
star
29

mae

PyTorch implementation of MAE https//arxiv.org/abs/2111.06377
Python
5,495
star
30

mmf

A modular framework for vision & language multimodal research from Facebook AI Research (FAIR)
Python
5,235
star
31

ConvNeXt

Code release for ConvNeXt model
Python
4,971
star
32

dino

PyTorch code for Vision Transformers training with the Self-Supervised learning method DINO
Python
4,830
star
33

AugLy

A data augmentations library for audio, image, text, and video.
Python
4,739
star
34

Kats

Kats, a kit to analyze time series data, a lightweight, easy-to-use, generalizable, and extendable framework to perform time series analysis, from understanding the key statistics and characteristics, detecting change points and anomalies, to forecasting future trends.
Python
4,387
star
35

DrQA

Reading Wikipedia to Answer Open-Domain Questions
Python
4,374
star
36

sapiens

High-resolution models for human tasks.
Python
4,340
star
37

xformers

Hackable and optimized Transformers building blocks, supporting a composable construction.
Python
4,191
star
38

moco

PyTorch implementation of MoCo: https://arxiv.org/abs/1911.05722
Python
4,035
star
39

StarSpace

Learning embeddings for classification, retrieval and ranking.
C++
3,856
star
40

lingua

Meta Lingua: a lean, efficient, and easy-to-hack codebase to research LLMs.
Python
3,829
star
41

fairseq-lua

Facebook AI Research Sequence-to-Sequence Toolkit
Lua
3,765
star
42

nevergrad

A Python toolbox for performing gradient-free optimization
Python
3,446
star
43

deit

Official DeiT repository
Python
3,425
star
44

dlrm

An implementation of a deep learning recommendation model (DLRM)
Python
3,417
star
45

ReAgent

A platform for Reasoning systems (Reinforcement Learning, Contextual Bandits, etc.)
Python
3,395
star
46

LASER

Language-Agnostic SEntence Representations
Python
3,308
star
47

VideoPose3D

Efficient 3D human pose estimation in video using 2D keypoint trajectories
Python
3,294
star
48

PyTorch-BigGraph

Generate embeddings from large-scale graph-structured data.
Python
3,238
star
49

deepmask

Torch implementation of DeepMask and SharpMask
Lua
3,113
star
50

MUSE

A library for Multilingual Unsupervised or Supervised word Embeddings
Python
3,094
star
51

vissl

VISSL is FAIR's library of extensible, modular and scalable components for SOTA Self-Supervised Learning with images.
Jupyter Notebook
3,038
star
52

pytorchvideo

A deep learning library for video understanding research.
Python
2,885
star
53

XLM

PyTorch original implementation of Cross-lingual Language Model Pretraining.
Python
2,763
star
54

audio2photoreal

Code and dataset for photorealistic Codec Avatars driven from audio
Python
2,696
star
55

ijepa

Official codebase for I-JEPA, the Image-based Joint-Embedding Predictive Architecture. First outlined in the CVPR paper, "Self-supervised learning from images with a joint-embedding predictive architecture."
Python
2,670
star
56

jepa

PyTorch code and models for V-JEPA self-supervised learning from video.
Python
2,646
star
57

habitat-sim

A flexible, high-performance 3D simulator for Embodied AI research.
C++
2,621
star
58

co-tracker

CoTracker is a model for tracking any point (pixel) on a video.
Jupyter Notebook
2,564
star
59

hiplot

HiPlot makes understanding high dimensional data easy
TypeScript
2,481
star
60

fairscale

PyTorch extensions for high performance and large scale training.
Python
2,319
star
61

encodec

State-of-the-art deep learning based audio codec supporting both mono 24 kHz audio and stereo 48 kHz audio.
Python
2,313
star
62

InferSent

InferSent sentence embeddings
Jupyter Notebook
2,264
star
63

Pearl

A Production-ready Reinforcement Learning AI Agent Library brought by the Applied Reinforcement Learning team at Meta.
Python
2,193
star
64

pyrobot

PyRobot: An Open Source Robotics Research Platform
Python
2,109
star
65

darkforestGo

DarkForest, the Facebook Go engine.
C
2,108
star
66

pycls

Codebase for Image Classification Research, written in PyTorch.
Python
2,053
star
67

esm

Evolutionary Scale Modeling (esm): Pretrained language models for proteins
Python
2,026
star
68

frankmocap

A Strong and Easy-to-use Single View 3D Hand+Body Pose Estimator
Python
1,972
star
69

video-nonlocal-net

Non-local Neural Networks for Video Classification
Python
1,931
star
70

SentEval

A python tool for evaluating the quality of sentence embeddings.
Python
1,930
star
71

habitat-lab

A modular high-level library to train embodied AI agents across a variety of tasks and environments.
Python
1,867
star
72

ResNeXt

Implementation of a classification framework from the paper Aggregated Residual Transformations for Deep Neural Networks
Lua
1,863
star
73

SparseConvNet

Submanifold sparse convolutional networks
C++
1,847
star
74

schedule_free

Schedule-Free Optimization in PyTorch
Python
1,842
star
75

chameleon

Repository for Meta Chameleon, a mixed-modal early-fusion foundation model from FAIR.
Python
1,811
star
76

swav

PyTorch implementation of SwAV https//arxiv.org/abs/2006.09882
Python
1,790
star
77

TensorComprehensions

A domain specific language to express machine learning workloads.
C++
1,747
star
78

Mask2Former

Code release for "Masked-attention Mask Transformer for Universal Image Segmentation"
Python
1,638
star
79

fvcore

Collection of common code that's shared among different research projects in FAIR computer vision team.
Python
1,623
star
80

TransCoder

Public release of the TransCoder research project https://arxiv.org/pdf/2006.03511.pdf
Python
1,611
star
81

poincare-embeddings

PyTorch implementation of the NIPS-17 paper "Poincarรฉ Embeddings for Learning Hierarchical Representations"
Python
1,587
star
82

votenet

Deep Hough Voting for 3D Object Detection in Point Clouds
Python
1,563
star
83

pytorch_GAN_zoo

A mix of GAN implementations including progressive growing
Python
1,554
star
84

ClassyVision

An end-to-end PyTorch framework for image and video classification
Python
1,552
star
85

deepcluster

Deep Clustering for Unsupervised Learning of Visual Features
Python
1,544
star
86

higher

higher is a pytorch library allowing users to obtain higher order gradients over losses spanning training loops rather than individual training steps.
Python
1,524
star
87

UnsupervisedMT

Phrase-Based & Neural Unsupervised Machine Translation
Python
1,496
star
88

consistent_depth

We estimate dense, flicker-free, geometrically consistent depth from monocular video, for example hand-held cell phone video.
Python
1,479
star
89

ConvNeXt-V2

Code release for ConvNeXt V2 model
Python
1,454
star
90

Detic

Code release for "Detecting Twenty-thousand Classes using Image-level Supervision".
Python
1,446
star
91

end-to-end-negotiator

Deal or No Deal? End-to-End Learning for Negotiation Dialogues
Python
1,368
star
92

DomainBed

DomainBed is a suite to test domain generalization algorithms
Python
1,355
star
93

multipathnet

A Torch implementation of the object detection network from "A MultiPath Network for Object Detection" (https://arxiv.org/abs/1604.02135)
Lua
1,349
star
94

CommAI-env

A platform for developing AI systems as described in A Roadmap towards Machine Intelligence - http://arxiv.org/abs/1511.08130
1,324
star
95

theseus

A library for differentiable nonlinear optimization
Python
1,306
star
96

DPR

Dense Passage Retriever - is a set of tools and models for open domain Q&A task.
Python
1,292
star
97

CrypTen

A framework for Privacy Preserving Machine Learning
Python
1,283
star
98

denoiser

Real Time Speech Enhancement in the Waveform Domain (Interspeech 2020)We provide a PyTorch implementation of the paper Real Time Speech Enhancement in the Waveform Domain. In which, we present a causal speech enhancement model working on the raw waveform that runs in real-time on a laptop CPU. The proposed model is based on an encoder-decoder architecture with skip-connections. It is optimized on both time and frequency domains, using multiple loss functions. Empirical evidence shows that it is capable of removing various kinds of background noise including stationary and non-stationary noises, as well as room reverb. Additionally, we suggest a set of data augmentation techniques applied directly on the raw waveform which further improve model performance and its generalization abilities.
Python
1,272
star
99

DeepSDF

Learning Continuous Signed Distance Functions for Shape Representation
Python
1,191
star
100

TimeSformer

The official pytorch implementation of our paper "Is Space-Time Attention All You Need for Video Understanding?"
Python
1,172
star