8.1.1.3.1.12. blueoil.datasets.image_folder

8.1.1.3.1.12.1. Module Contents

8.1.1.3.1.12.1.1. Classes

ImageFolderBase

Abstract class of dataset for loading image files stored in a folder.

class blueoil.datasets.image_folder.ImageFolderBase(*args, **kwargs)

Bases: blueoil.datasets.base.StoragePathCustomizable, blueoil.datasets.base.Base

Abstract class of dataset for loading image files stored in a folder.

structure like

$DATA_DIR/extend_dir/cat/0001.jpg $DATA_DIR/extend_dir/cat/xxxa.jpeg $DATA_DIR/extend_dir/cat/yyyb.png $DATA_DIR/extend_dir/dog/123.jpg $DATA_DIR/extend_dir/dog/023.jpg $DATA_DIR/extend_dir/dog/wwww.jpg

When child class has validation_extend_dir, the validation subset consists from the folders.

$DATA_DIR/validation_extend_dir/cat/0001.jpg $DATA_DIR/validation_extend_dir/cat/xxxa.png

property classes(self)

Returns the classes list in the data set.

property num_classes(self)

Return the number of classes in the data set.

property num_per_epoch(self)

Returns the number of datas in the data subset.

_all_files(self)
property files(self)
get_label(self, filename)

Returns label.

__getitem__(self, i)

Returns the i-th item of the dataset.

__len__(self)

returns the number of items in the dataset.