8.1.1.3.1.14. blueoil.datasets.mscoco

8.1.1.3.1.14.1. Module Contents

8.1.1.3.1.14.1.1. Classes

MscocoSegmentation

Mscoco for segmentation.

MscocoObjectDetection

MSCOCO for object detection.

MscocoObjectDetectionPerson

“MSCOCO only person class for object detection.

8.1.1.3.1.14.1.2. Functions

main()

blueoil.datasets.mscoco.DEFAULT_CLASSES = ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush']
class blueoil.datasets.mscoco.MscocoSegmentation(subset='train', batch_size=10, *args, **kwargs)

Bases: blueoil.datasets.base.SegmentationBase

Mscoco for segmentation.

classes
num_classes
available_subsets = ['train', 'validation']
extend_dir = MSCOCO
property num_per_epoch(self)

Returns the number of datas in the data subset.

property coco(self)
property _image_ids(self)

Return all files and gt_boxes list.

_label_from_image_id(self, image_id)
_image_file_from_image_id(self, image_id)
__getitem__(self, i)

Returns the i-th item of the dataset.

__len__(self)

returns the number of items in the dataset.

class blueoil.datasets.mscoco.MscocoObjectDetection(subset='train', *args, **kwargs)

Bases: blueoil.datasets.base.ObjectDetectionBase

MSCOCO for object detection.

images: images numpy array. shape is [batch_size, height, width] labels: gt_boxes numpy array. shape is [batch_size, num_max_boxes, 5(x, y, w, h, class_id)]

_cache
classes
num_classes
available_subsets = ['train', 'validation']
extend_dir = MSCOCO
classmethod count_max_boxes(cls)

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.

property coco(self)
property _image_ids(self)

Return all files and gt_boxes list.

_image_file_from_image_id(self, image_id)
coco_category_id_to_lmnet_class_id(self, cat_id)
_gt_boxes_from_image_id(self, image_id)

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

_files_and_annotations(self)

Create files and gt_boxes list.

_init_files_and_annotations(self)
__getitem__(self, i)

Returns the i-th item of the dataset.

__len__(self)

returns the number of items in the dataset.

class blueoil.datasets.mscoco.MscocoObjectDetectionPerson(threshold_size=64 * 64, *args, **kwargs)

Bases: blueoil.datasets.mscoco.MscocoObjectDetection

“MSCOCO only person class for object detection.

images: images numpy array. shape is [batch_size, height, width] labels: gt_boxes numpy array. shape is [batch_size, num_max_boxes, 5(x, y, w, h, class_id)]

classes = ['person']
num_classes
_gt_boxes_from_image_id(self, image_id)

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

property _image_ids(self)

Return all files which contains person bounding boxes.

blueoil.datasets.mscoco.main()