# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------

"""Factory method for easily getting imdbs by name."""

__sets = {}

from datasets.pascal_voc import pascal_voc
from datasets.coco import coco
from datasets.face import face
# from datasets.map_data import map_data
import numpy as np

# Set up voc_<year>_<split> using selective search "fast" mode
for year in ['2007', '2012']:
    for split in ['train', 'val', 'trainval', 'test']:
        name = 'voc_{}_{}'.format(year, split)
        __sets[name] = (lambda split=split, year=year: pascal_voc(split, year))

# Set up coco_2014_<split>
for year in ['2014']:
    for split in ['train', 'val', 'minival', 'valminusminival']:
        name = 'coco_{}_{}'.format(year, split)
        __sets[name] = (lambda split=split, year=year: coco(split, year))

# Set up coco_2015_<split>
for year in ['2015']:
    for split in ['test', 'test-dev']:
        name = 'coco_{}_{}'.format(year, split)
        __sets[name] = (lambda split=split, year=year: coco(split, year))

# Set up wider
wider_devkit_path = 'data/WIDER'
for split in ['train', 'test']:
    name = '{}_{}'.format('wider', split)
    __sets[name] = (lambda split=split: face(split, wider_devkit_path))

# Set up IJB-A
ijba_devkit_path = 'data/IJB_A'
for split in xrange(1, 11):
	name = 'ijba_train_split_%d' % split
	__sets[name] = (lambda split = split: face('train', split, ijba_devkit_path))

def get_imdb(name):
    """Get an imdb (image database) by name."""
    if not __sets.has_key(name):
        raise KeyError('Unknown dataset: {}'.format(name))
    return __sets[name]()

def list_imdbs():
    """List all registered imdbs."""
    return __sets.keys()

@@ -1374,16 +1374,19 @@
 e(split,
+ 0,
  wider_d
@@ -1395,24 +1395,26 @@
 kit_path))%0A%0A
+# 
 # Set up IJB
@@ -1416,16 +1416,18 @@
 p IJB-A%0A
+# 
 ijba_dev
@@ -1450,16 +1450,18 @@
 /IJB_A'%0A
+# 
 for spli
@@ -1480,16 +1480,18 @@
 1, 11):%0A
+# 
 %09name = 
@@ -1520,16 +1520,18 @@
 %25 split%0A
+# 
 %09__sets%5B

Fix a bug