In [4]:
%load_ext autoreload
%autoreload 2
import vislab.datasets

images_df, objects_df = vislab.datasets.inria_person.load_dataset()

n = 5
print images_df.iloc[np.random.choice(images_df.shape[0], n, False)]
print objects_df.iloc[np.random.choice(objects_df.shape[0], n, False)]


The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload
                      PASperson                             filename  height  \
00001077a                 False              Train/neg/00001077a.png     NaN   
D2004-07-09_17h00m32s     False  Train/neg/D2004-07-09_17h00m32s.jpg     NaN   
00000998a                 False              Train/neg/00000998a.png     NaN   
00001335                  False                Test/neg/00001335.png     NaN   
D2004-09-18_15h42m50s     False  Train/neg/D2004-09-18_15h42m50s.jpg     NaN   

                       num_objects  width  split  
00001077a                        0    NaN  Train  
D2004-07-09_17h00m32s            0    NaN  Train  
00000998a                        0    NaN  Train  
00001335                         0    NaN   Test  
D2004-09-18_15h42m50s            0    NaN  Train  

[5 rows x 6 columns]
                               center_x  center_y      class          label  \
image_id            object_id                                                 
person_350          1               121       110  PASperson  UprightPerson   
person_137          2               189       125  PASperson  UprightPerson   
person_225          2               120        42  PASperson  UprightPerson   
crop001594          3               122       208  PASperson  UprightPerson   
person_and_bike_209 0               384       132  PASperson  UprightPerson   

                               xmax  xmin  ymax  ymin  width  height  \
image_id            object_id                                          
person_350          1           146    40   473    79    640     480   
person_137          2           215   152   303   100    640     480   
person_225          2           180    59   355    17    640     480   
crop001594          3           149    97   358   182    762     673   
person_and_bike_209 0           418   336   316   112    640     480   

                                                        filename  split  
image_id            object_id                                            
person_350          1                    Test/pos/person_350.png   Test  
person_137          2                    Test/pos/person_137.png   Test  
person_225          2                   Train/pos/person_225.png  Train  
crop001594          3                   Train/pos/crop001594.png  Train  
person_and_bike_209 0          Train/pos/person_and_bike_209.png  Train  

[5 rows x 12 columns]
/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/io/pytables.py:528: DeprecationWarning: openFile() is pending deprecation, use open_file() instead. You may use the pt2to3 tool to update your source code.
  self._handle = tables.openFile(self._path, self._mode, **kwargs)
/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/io/pytables.py:1044: DeprecationWarning: getNode() is pending deprecation, use get_node() instead. You may use the pt2to3 tool to update your source code.
  return self._handle.getNode(self.root, key)
/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/io/pytables.py:528: DeprecationWarning: openFile() is pending deprecation, use open_file() instead. You may use the pt2to3 tool to update your source code.
  self._handle = tables.openFile(self._path, self._mode, **kwargs)
/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/io/pytables.py:1044: DeprecationWarning: getNode() is pending deprecation, use get_node() instead. You may use the pt2to3 tool to update your source code.
  return self._handle.getNode(self.root, key)

In [5]:
images_df['PASperson'].value_counts()


Out[5]:
False    1671
True      902
dtype: int64

In [6]:
images_df['num_objects'].value_counts()


Out[6]:
0     1671
1      455
2      221
3      105
4       56
5       36
6       15
7        6
8        5
16       1
12       1
10       1
dtype: int64