5
ResearchDoom and CocoDoom: Learning Computer Vision with Games A. Mahendran Department of Engineering Science University of Oxford Oxford UK [email protected] H. Bilen Department of Engineering Science University of Oxford Oxford UK [email protected] J. F. Henriques Department of Engineering Science University of Oxford Oxford UK [email protected] A. Vedaldi Department of Engineering Science University of Oxford Oxford UK [email protected] Abstract In this short note we introduce ResearchDoom, an implementation of the Doom first-person shooter that can extract detailed metadata from the game. We also introduce the CocoDoom dataset, a collection of pre-recorded data extracted from Doom gaming sessions along with annotations in the MS Coco format. Re- searchDoom and CocoDoom can be used to train and evaluate a variety of com- puter vision methods such as object recognition, detection and segmentation at the level of instances and categories, tracking, ego-motion estimation, monocu- lar depth estimation and scene segmentation. The code and data are available at http://www.robots.ox.ac.uk/~vgg/research/researchdoom. 1 Introduction As data-hungry methods such as deep neural networks become predominant in most areas of com- puter vision, the community faces the challenge of obtaining sufficiently large quantities of super- vised data to train models. One increasingly popular and effective approach is to use synthetic data [2, 5, 3, 4]. While this data can be created ad-hoc, research in reinforcement learning has re- cently built on the idea of using video games as off-the-shelf virtual environments suitable to learn agents [8, 7, 1]. This approach is rather powerful as, while video games may not be entirely re- alistic, they capture many of the fundamental nuances and challenges of real-life perception. This is especially true for modern 3D games. We believe that these ideas can be applied well beyond reinforcement learning, and that video games can be used to train and evaluate in a direct manner a wide variety of computer vision algorithms. In order to explore this idea, in this paper we propose to extract richly-annotated data from Doom, one of the early examples of 3D games. In order to do so, we introduce a modification of the open- source Doom engine. This variant, which we call ResearchDoom (??), is able to extract a wealth of geometric and semantic metadata during gaming sessions. Second, in order to lower as much as possible the barrier of entry for other computer vision researchers, we also provide pre-computed Doom data with full annotations, as well as a subset of the annotations using the Microsoft Coco format [6], including well defined training, validation, and test split to simplify comparing results. We call this dataset CocoDoom (??). arXiv:1610.02431v1 [cs.CV] 7 Oct 2016

arXiv:1610.02431v1 [cs.CV] 7 Oct 2016homepages.inf.ed.ac.uk/hbilen/assets/pdf/Mahendran16.pdf · puter vision, the community faces the challenge of obtaining sufficiently large quantities

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: arXiv:1610.02431v1 [cs.CV] 7 Oct 2016homepages.inf.ed.ac.uk/hbilen/assets/pdf/Mahendran16.pdf · puter vision, the community faces the challenge of obtaining sufficiently large quantities

ResearchDoom and CocoDoom:Learning Computer Vision with Games

A. MahendranDepartment of Engineering Science

University of OxfordOxford UK

[email protected]

H. BilenDepartment of Engineering Science

University of OxfordOxford UK

[email protected]

J. F. HenriquesDepartment of Engineering Science

University of OxfordOxford UK

[email protected]

A. VedaldiDepartment of Engineering Science

University of OxfordOxford UK

[email protected]

Abstract

In this short note we introduce ResearchDoom, an implementation of the Doomfirst-person shooter that can extract detailed metadata from the game. We alsointroduce the CocoDoom dataset, a collection of pre-recorded data extracted fromDoom gaming sessions along with annotations in the MS Coco format. Re-searchDoom and CocoDoom can be used to train and evaluate a variety of com-puter vision methods such as object recognition, detection and segmentation atthe level of instances and categories, tracking, ego-motion estimation, monocu-lar depth estimation and scene segmentation. The code and data are available athttp://www.robots.ox.ac.uk/~vgg/research/researchdoom.

1 Introduction

As data-hungry methods such as deep neural networks become predominant in most areas of com-puter vision, the community faces the challenge of obtaining sufficiently large quantities of super-vised data to train models. One increasingly popular and effective approach is to use syntheticdata [2, 5, 3, 4]. While this data can be created ad-hoc, research in reinforcement learning has re-cently built on the idea of using video games as off-the-shelf virtual environments suitable to learnagents [8, 7, 1]. This approach is rather powerful as, while video games may not be entirely re-alistic, they capture many of the fundamental nuances and challenges of real-life perception. Thisis especially true for modern 3D games. We believe that these ideas can be applied well beyondreinforcement learning, and that video games can be used to train and evaluate in a direct manner awide variety of computer vision algorithms.

In order to explore this idea, in this paper we propose to extract richly-annotated data from Doom,one of the early examples of 3D games. In order to do so, we introduce a modification of the open-source Doom engine. This variant, which we call ResearchDoom (??), is able to extract a wealthof geometric and semantic metadata during gaming sessions. Second, in order to lower as much aspossible the barrier of entry for other computer vision researchers, we also provide pre-computedDoom data with full annotations, as well as a subset of the annotations using the Microsoft Cocoformat [6], including well defined training, validation, and test split to simplify comparing results.We call this dataset CocoDoom (??).

arX

iv:1

610.

0243

1v1

[cs

.CV

] 7

Oct

201

6

Page 2: arXiv:1610.02431v1 [cs.CV] 7 Oct 2016homepages.inf.ed.ac.uk/hbilen/assets/pdf/Mahendran16.pdf · puter vision, the community faces the challenge of obtaining sufficiently large quantities

We open source both ResearchDoom and CocoDoom and make them available at http://www.robos.ox.ac.uk/~vgg/research/researchdoom for other researchers to use.

1.1 Related work

As noted above, several researchers have been proposing to use computer graphics and simulateddata for learning in computer vision and reinforcement learning. The work that is probably mostrelated to ours is VizDoom, a modified version of the Doom engine that allows interfacing the gameto machine learning algorithms for the purpose of reinforcement learning. ResearchDoom, whichwas developed partially concurrently to VizDoom, rather than providing an interface to control thegame as needed in reinforcement learning, it focuses on extracting abundant metadata from recordedgaming sessions, including extracting depth information, object instance and class segmentations,as well as other data such as egomotion. The idea is that such annotated data can be used directlyin a large number of computer vision tasks even without reinforcement learning. Example problemsthat can be targeted by using this data include object recognition, detection, and tracking, instanceand semantic segmentation, monocular depth estimation, and ego-motion estimation. While Re-searchDoom was developed independently of VizDoom, in the future we hope to be able to portResearchDoom functionalities to VizDoom.

Another recent effort similar to ResearchDoom is Unreal CV [9]. This engine can also extract meta-data similar to ResearchDoom and, by building on the Unreal engine, can potentially be applicableto a huge variety of modern video games. ResearchDoom is much simpler than Unreal CV as it ap-plies to a single and relatively old game. While Doom incorporates several limitations, such as thefact that the camera can only rotate around the vertical axis, the data is nevertheless fairly complex.Furthermore, Doom provides a relatively restricted and consistent world form which data can beextracted for experiments. We leverage the latter fact to define and provide abundant pre-computeddata with detailed metadata as well as with annotations using the Microsoft Coco format.

Another related project is the OpenAI Gym [1], a collection of simulations and virtual environments,including video games such as Doom, for research in reinforcement learning by OpenAI.

2 The ResearchDoom engine

The ResearchDoom engine is a minimal modification of the Chocolate Doom1 engine. It allowsextracting various types of data and metadata from the game, including appearance, egomotion,depth, and object masks. By using ResearchDoom it is possible to cheaply generate large quantitiesof images from this virtual 3D environment annotated in great detail and without errors.

The ResearchDoom engine is typically used to extract data from pre-recorded playthroughs. It isdeterministic, in the sense that, given these game files, all the data can be reproduced exactly.

Time in Doom is measured in terms of the so-called tics. Each tic produces exactly a frame, and foreach frame ResearchDoom saves three PNG files, containing the appearance information, the depthmap, and the object masks. The engine also writes a log of game events in a text file which can beused, among other things, to recover the location and orientation of the player in the 3D world aswell as the category of each object instance. The detailed format of these files is described in theResearchDoom homepage.

3 The CocoDoom data

As a simple point of entry for computer vision researchers, we also provide extensive pre-recordeddata. The data contains the annotations produced by the ResearchDoom engine, as described in ??.It also contains object annotations in the same format used by Microsoft Coco [6]. Therefore, it is aplug-and-play resource for computer vision systems that use this format.

The data itself was generated from three complete playthroughs of the Doom II version of the game.The game itself consists of 32 maps or levels, divided in four episodes. We consider two differ-ent splits of the data in training, validation, and test sets as follows. The run split uses the first

1https://www.chocolate-doom.org/

2

Page 3: arXiv:1610.02431v1 [cs.CV] 7 Oct 2016homepages.inf.ed.ac.uk/hbilen/assets/pdf/Mahendran16.pdf · puter vision, the community faces the challenge of obtaining sufficiently large quantities

36/81 (MISC31)

38/30 (BARREL) 40/30 (BARREL)45/46 (MISC3)

51/100 (MISC50)

78/119 (MISC69)

Appearance and objects (time 000301) Depth map

Class and instance segmentation Ego-motion (level E1M1)

Figure 1: ResearchDoom data and metadata. Top-left: depth map. Top-right: appearance withbounding box annotations for objects (each object is labelled with an instance identifier and a classidentifier). Bottom-left: object masks as well as vertical/horizontal surfaces segmentation. Bottom-right: ego-motion.

playthrough for training, the second for validation, and the last for testing. The episode split usesthe first two episodes for training, the third for validation, and the fourth for testing. The episodesplit is therefore harder as different game maps are contained in the different splits.

All the frames were extracted from each run. Due to the large quantity of data produced in thismanner, we also consider a standard and a full subset. The standard subset contains only appear-ance images and Microsoft Coco annotations for the objects (which means that their boundaries areapproximated by polygons) whereas the full data contains depth information and pixel-level objectsegmentations. In the MS Coco annotations, objects with an area smaller than 30 pixels are dis-carded. The standard subset also contains only 1/5 of all the possible frames. Categories with lessthan 100 representative images in the standard training data split where removed, remaining with94 object types (??). Overall, the standard subset contains roughly 80K images and 300K objectinstance annotations, whereas the full data contains roughly 500K images and 1.4M object instanceannotations.

4 Conclusions

In this short note we have introduced ResearchDoom and CocoDoom, respectively software to ex-tract annotated data from the Doom game engine and a pre-computed collection of annotated gamingdata suitable for training and evaluating a variety of computer vision algorithms. This effort is mo-tivated by our belief that video game data, as well as computer graphics, synthetic, and augmenteddata in general, can provide a wealth of information for training computer vision systems. Whilethe utility of simulated environments is obvious for reinforcement learning applications, until theproblem of unsupervised learning is finally solved, such data can also be extremely useful in directcomputer vision problems due to the ability of extracting automatically a very detailed supervisorysignal.

3

Page 4: arXiv:1610.02431v1 [cs.CV] 7 Oct 2016homepages.inf.ed.ac.uk/hbilen/assets/pdf/Mahendran16.pdf · puter vision, the community faces the challenge of obtaining sufficiently large quantities

POSSESSED SHOTGUY VILE FIRE UNDEAD TRACER SMOKE

FATSO FATSHOT CHAINGUY TROOP SERGEANT HEAD BRUISER

BRUISERSHOT KNIGHT SKULL SPIDER BABY CYBORG PAIN

WOLFSS BARREL TROOPSHOT HEADSHOT ROCKET PLASMA BFG

ARACHPLAZ PUFF BLOOD TFOG EXTRABFG MISC0 MISC1

MISC2 MISC3 MISC4 MISC10 MISC11 MISC12 INV

MISC13 INS MISC14 MISC15 MEGA CLIP MISC17

MISC18 MISC19 MISC20 MISC21 MISC22 MISC23 MISC24

MISC25 CHAINGUN MISC26 MISC27 MISC28 SHOTGUN SUPERSHOTGUN

MISC29 MISC30 MISC32 MISC33 MISC34 MISC38 MISC39

MISC40 MISC41 MISC42 MISC43 MISC44 MISC45 MISC46

MISC47 MISC49 MISC50 MISC56 MISC58 MISC59 MISC60

MISC67 MISC68 MISC69 MISC71 MISC73 MISC74 MISC75

MISC76 MISC77 MISC84

Figure 2: The 94 CocoDoom categories.

In the future, we would like to merge ResearchDoom with the VizDoom codebase due to the techni-cal merits and advantages of the latter. At the same time, we think that providing pre-computed gam-ing data and corresponding benchmarks in familiar formats can encourage the adoption of gamingdata by a much larger portion of the computer vision community. This is the idea behind CocoDoomand for its future evolutions we hope to be able to leverage the power of more open-ended gamingengines such as Unreal CV.

References[1] Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang,

and Wojciech Zaremba. Openai gym. CoRR, abs/1606.01540, 2016.

[2] Ian J Goodfellow, Yaroslav Bulatov, Julian Ibarz, Sacha Arnoud, and Vinay Shet. Multi-digitnumber recognition from street view imagery using deep convolutional neural networks. InProc. ICLR, 2014.

4

Page 5: arXiv:1610.02431v1 [cs.CV] 7 Oct 2016homepages.inf.ed.ac.uk/hbilen/assets/pdf/Mahendran16.pdf · puter vision, the community faces the challenge of obtaining sufficiently large quantities

[3] Ankush Gupta, Andrea Vedaldi, and Andrew Zisserman. Synthetic data for text localisation innatural images. Proc. CVPR, 2016.

[4] Y. Hong, R. Arandjelovic, and A. Zisserman. Faces in places: Compound query retrieval. InProc. BMVC, 2016.

[5] M. Jaderberg, K. Simonyan, A. Vedaldi, and A. Zisserman. Synthetic data and artificial neuralnetworks for natural scene text recognition. In NIPS Deep Learning Workshop, 2014.

[6] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan,Piotr Dollár, and C. Lawrence Zitnick. Microsoft COCO: common objects in context. CoRR,abs/1405.0312, 2014.

[7] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, DaanWierstra, and Martin A. Riedmiller. Playing atari with deep reinforcement learning. CoRR,abs/1312.5602, 2013.

[8] Junhyuk Oh, Xiaoxiao Guo, Honglak Lee, Richard L Lewis, and Satinder Singh. Action-conditional video prediction using deep networks in atari games. In Advances in Neural In-formation Processing Systems, pages 2863–2871, 2015.

[9] Weichao Qiu and Alan Yuille. Unrealcv: Connecting computer vision to unreal engine. arXivpreprint arXiv:1609.01326, 2016.

5