PascalVOC

class src.dataset.pascal_voc.PascalVOC(sets, obj_resize)[source]
filter_list()[source]

Filter out ‘truncated’, ‘occluded’ and ‘difficult’ images following the practice of previous works. In addition, this dataset has uncleaned label (in person category). They are omitted as suggested by README.

get_multi(cls=None, num=2, shuffle=True, filter_outlier=True)[source]

Randomly get multiple objects from VOC-Berkeley keypoints dataset for multi-matching. The first image is fetched with all appeared keypoints, and the rest images are fetched with only inliers. :param cls: None for random class, or specify for a certain set :param num: number of objects to be fetched :param shuffle: random shuffle the keypoints :param filter_outlier: filter out outlier keypoints among images :return: (list of data, list of permutation matrices)

get_pair(cls=None, shuffle=True, tgt_outlier=False, src_outlier=False)[source]

Randomly get a pair of objects from VOC-Berkeley keypoints dataset :param cls: None for random class, or specify for a certain set :param shuffle: random shuffle the keypoints :param src_outlier: allow outlier in the source graph (first graph) :param tgt_outlier: allow outlier in the target graph (second graph) :return: (pair of data, groundtruth permutation matrix)

get_single_to_ref(idx, cls, shuffle=True)[source]

Get a single image, against a reference model containing all ground truth keypoints. :param idx: index in this class :param cls: specify for a certain class :param shuffle: random shuffle the keypoints :return: (data, groundtruth permutation matrix)

property length
length_of(cls)[source]