This is a submodule providing all necessary data and helper scripts for Age Estimator.
NOTE: the data lives in the data branch
Raw images
To unzip the raw images, run the following script:
cat dataset.tar.* | tar -xzvf -
Extracted Features
cat features-train-worker0.npy.tar.* | tar -xzvf -
cat features-test-worker0.npy.tar.* | tar -xzvf -
In your model, do
from server.data.dataset import DataLoader
dl = DataLoader()
x_train, y_train = dl.load_train()
x_test, y_test = dl.load_test()to start playing with the data.
Note: the training data are strings of file name, so you'll still need to load the file as matrix to perform any scientific computation.
There are several ways to load an image. One way is use matplotlib:
import matplotlib.image as img
image = img.imread(x_train[0])In your model, do
from server.data.dataset import DataLoader
dl = DataLoader()
x_train, y_train = dl.load_train(feature=True)
x_test, y_test = dl.load_test(feature=True)