blueoil.datasets.pascalvoc_base Module Contents Classes


Dataset base class

class blueoil.datasets.pascalvoc_base.PascalvocBase(subset='train', batch_size=10, skip_difficult=True, *args, **kwargs)

Bases: blueoil.datasets.base.ObjectDetectionBase

Dataset base class

default_classes = ['aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor']
classes = []
classmethod count_max_boxes(cls, skip_difficult=True)

Count max boxes size over all subsets.

property num_max_boxes(self)

Return count max box size of available subsets.

property num_per_epoch(self)

Returns the number of datas in the data subset.

_get_boxes_from_annotation(self, xml_file)

Get gt boxes list from annotation object.


xml_file – file name for bounding box annotation xml


gt boxes list [[x, y, w, h, class_id]].

Return type


_annotation_file_from_image_id(self, image_id)

Return annotation xml file path.

_image_file_from_image_id(self, image_id)

Return image file name of a image.

_gt_boxes_from_image_id(self, image_id)

Return gt boxes list ([[x, y, w, h, class_id]]) of a image.

_image_ids(self, data_type=None)

Get image ids in data_type, classes.

_all_image_ids(self, data_type=None, is_debug=False)

Get all image ids in data_type.

abstract _files_and_annotations(self)

Init files and gt_boxes list, Cache these.

__getitem__(self, i)

Returns the i-th item of the dataset.


returns the number of items in the dataset.