A Python module to access the Chicago Face Database
Project description
cfd-reader
A python3
module to index, pre-process, and supply facial data from the Chicago Face Database (CFD).
A convenient way to load data from the Chicago Face Database, wrapped in numpy
arrays, to feed to your neural network.
installation
From a terminal, run the command:
[sudo -H] pip3 install cfd-reader
usage
In your Python (3.5+) script or interpreter session, run (suggested syntax):
import cfd_reader as cfdr
load face data
cfdr.load_data(
[options])
where options include:
grayscale=[True, False]
:True
: provides 3 channel BGR outputFalse
: provides single channel grayscale output
train_proportion=x
:x
: real-valued variable between 0 and 1.x
proportion of all data will be supplied as training data, and 1-x data will be supplied as test data
resize=[False, (x,y)]
:False
: keeps images in their original resolution(x,y)
: tuple of integers to resize the image to
returns:
numpy
array of shape (n, x, y, c)
where n
are the total number of images in that particular set (train/test), (x,y)
is the 2D image shape, and c
is the number of channels. In other words, (x,y,c)
is the image shape.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cfd_reader-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28b599597741143ebc77e2dd5a50afa8770a444d8f1da94585d0bda08c7b6415 |
|
MD5 | 188e8c37493f3a9237f887ee0d0da720 |
|
BLAKE2b-256 | bea6b30ade9b023003d5296cb2ea4b7f31bf953b24de13998609eb591efe695d |