Package pyvision :: Package data
[hide private]
[frames] | no frames]

Package data

source code

This package contains some standard tests that can be performed with the test data distributed with pyvision.

Functions [hide private]
 
genderClassifier(clsfy, ilog=None)
genderClassifier takes a classifier as an argument and will use the csuScrapShot data to perform a gender classification test on that classifier.
source code
Variables [hide private]
  SCRAPS_EYES = EyesFile(os.path.join(pv.__path__ [0], 'data', '...
The path to a text file containing coordinates to the scrapshots dataset.
  AIRPLANE = '/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvisio...
The path to a commonly use test image of a jet airplane.
  BABOON = '/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/...
The path to a commonly use test image of a baboon face.
  FRUITS = '/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/...
The path to a commonly use test image of fruit.
  LENA = '/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/da...
The path to a commonly used "Lena" test image.
  LOGO = '/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/da...
The path to a commonly use test image of a butterfly used as the pyvision logo.
  TAZ_IMAGE = '/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvisi...
The path to a commonly use test image of a butterfly used as the pyvision logo.
  TAZ_VIDEO = '/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvisi...
The path to a test video of a Loony Tunes Taz stuffed animal.
  CAR_VIDEO = '/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvisi...
The path to a test video of a small moving car.
  BUGS_VIDEO = '/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvis...
The path to a test video sequence of bugs crawling through weeds.
  FONT_ARIAL = '/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvis...
The path to a file containing the Arial true type font.
  IRIS_PATH = '/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvisi...
  IRIS_LABELS = array(['setosa', 'setosa', 'setosa', 'setosa', '...
  IRIS_DATA = array([[ 5.0999999 , 3.5 , 1.39999998, 0....
  __package__ = 'pyvision.data'
Function Details [hide private]

genderClassifier(clsfy, ilog=None)

source code 

genderClassifier takes a classifier as an argument and will use the csuScrapShot data to perform a gender classification test on that classifier.

These three functions will be called:

   for im in training_images:
       clsfy.addTraining(label,im,ilog=ilog)
   
   clsfy.train(ilog=ilog)
   
   for im in testing_images:
       clsfy.predict(im,ilog=ilog)

label = 0 or 1 (0=Female,1=Male)

im is a 64x64 pyvision image that is normalized to crop the face

Output of predict should be a class label (0 or 1)

Returns:
the success rate for the testing set.

Variables Details [hide private]

SCRAPS_EYES

The path to a text file containing coordinates to the scrapshots dataset.

Value:
EyesFile(os.path.join(pv.__path__ [0], 'data', 'csuScrapShots', 'coord\
s.txt'))

AIRPLANE

The path to a commonly use test image of a jet airplane.

Value:
'/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/data/misc/airplan\
e.jpg'

BABOON

The path to a commonly use test image of a baboon face.

Value:
'/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/data/misc/baboon.\
jpg'

FRUITS

The path to a commonly use test image of fruit.

Value:
'/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/data/misc/fruits.\
jpg'

LENA

The path to a commonly used "Lena" test image.

Value:
'/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/data/misc/lena.jp\
g'

LOGO

The path to a commonly use test image of a butterfly used as the pyvision logo.

Value:
'/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/data/misc/logo.jp\
g'

TAZ_IMAGE

The path to a commonly use test image of a butterfly used as the pyvision logo.

Value:
'/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/data/test/TAZ_001\
0.jpg'

TAZ_VIDEO

The path to a test video of a Loony Tunes Taz stuffed animal.

Value:
'/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/data/test/TazSamp\
le.m4v'

CAR_VIDEO

The path to a test video of a small moving car.

Value:
'/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/data/test/toy_car\
.m4v'

BUGS_VIDEO

The path to a test video sequence of bugs crawling through weeds.

Value:
'/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/data/test/BugsSam\
ple.m4v'

FONT_ARIAL

The path to a file containing the Arial true type font.

Value:
'/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/config/Arial.ttf'

IRIS_PATH

Value:
'/Users/qdb/Dropbox (ORNL)/git/pyvision/src/pyvision/data/ml/iris.csv'

IRIS_LABELS

Value:
array(['setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',
       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',
       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',
       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',
       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',
       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',
       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',
       'setosa', 'setosa', 'setosa', 'setosa', 'setosa', 'setosa',
...

IRIS_DATA

Value:
array([[ 5.0999999 ,  3.5       ,  1.39999998,  0.2       ],
       [ 4.9000001 ,  3.        ,  1.39999998,  0.2       ],
       [ 4.69999981,  3.20000005,  1.29999995,  0.2       ],
       [ 4.5999999 ,  3.0999999 ,  1.5       ,  0.2       ],
       [ 5.        ,  3.5999999 ,  1.39999998,  0.2       ],
       [ 5.4000001 ,  3.9000001 ,  1.70000005,  0.40000001],
       [ 4.5999999 ,  3.4000001 ,  1.39999998,  0.30000001],
       [ 5.        ,  3.4000001 ,  1.5       ,  0.2       ],
...