:mod:`blueoil.datasets.pascalvoc_base` ====================================== .. py:module:: blueoil.datasets.pascalvoc_base Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: blueoil.datasets.pascalvoc_base.PascalvocBase .. py:class:: PascalvocBase(subset='train', batch_size=10, skip_difficult=True, *args, **kwargs) Bases: :class:`blueoil.datasets.base.ObjectDetectionBase` Dataset base class .. attribute:: _cache .. attribute:: default_classes :annotation: = ['aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor'] .. attribute:: classes :annotation: = [] .. attribute:: num_classes .. attribute:: available_subsets .. attribute:: extend_dir .. method:: count_max_boxes(cls, skip_difficult=True) :classmethod: Count max boxes size over all subsets. .. method:: num_max_boxes(self) :property: Return count max box size of available subsets. .. method:: num_per_epoch(self) :property: Returns the number of datas in the data subset. .. method:: _get_boxes_from_annotation(self, xml_file) Get gt boxes list from annotation object. :param xml_file: file name for bounding box annotation xml :returns: gt boxes list [[x, y, w, h, class_id]]. :rtype: list .. method:: _annotation_file_from_image_id(self, image_id) Return annotation xml file path. .. method:: _image_file_from_image_id(self, image_id) Return image file name of a image. .. method:: _gt_boxes_from_image_id(self, image_id) Return gt boxes list ([[x, y, w, h, class_id]]) of a image. .. method:: _image_ids(self, data_type=None) Get image ids in data_type, classes. .. method:: _all_image_ids(self, data_type=None, is_debug=False) Get all image ids in data_type. .. method:: _files_and_annotations(self) :abstractmethod: .. method:: _init_files_and_annotations(self) Init files and gt_boxes list, Cache these. .. method:: __getitem__(self, i) Returns the i-th item of the dataset. .. method:: __len__(self) returns the number of items in the dataset.