我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用datasets.ROOT_DIR。
def _get_default_path(self): """ Return the default path where PASCAL VOC is expected to be installed. """ return os.path.join(datasets.ROOT_DIR, 'data', 'VOCdevkit' + self._year)
def cache_path(self): cache_path = osp.abspath(osp.join(datasets.ROOT_DIR, 'data', 'cache')) if not os.path.exists(cache_path): os.makedirs(cache_path) return cache_path
def _get_default_path(self): """ Return the default path where PASCAL VOC is expected to be installed. """ return os.path.join(datasets.ROOT_DIR, 'data', 'coco')
def _get_default_path(self): """ Return the default path where NISSAN is expected to be installed. """ return os.path.join(datasets.ROOT_DIR, 'data', 'NISSAN')
def _get_default_path(self): """ Return the default path where PASCAL VOC is expected to be installed. """ return os.path.join(datasets.ROOT_DIR, 'data', 'PASCAL')
def _get_default_path(self): """ Return the default path where nthu is expected to be installed. """ return os.path.join(datasets.ROOT_DIR, 'data', 'NTHU')
def _get_default_path(self): """ Return the default path where PASCAL3D is expected to be installed. """ return os.path.join(datasets.ROOT_DIR, 'data', 'PASCAL3D')
def _get_default_path(self): """ Return the default path where KITTI is expected to be installed. """ return os.path.join(datasets.ROOT_DIR, 'data', 'KITTI')
def _get_default_path(self): """ Return the default path where imagenet3d is expected to be installed. """ return os.path.join(datasets.ROOT_DIR, 'data', 'ImageNet3D')
def _get_default_path(self): """ Return the default path where kitti_tracking is expected to be installed. """ return os.path.join(datasets.ROOT_DIR, 'data', 'KITTI_Tracking')
def _do_matlab_eval(self, output_dir='output'): print '-----------------------------------------------------' print 'Computing results with the official MATLAB eval code.' print '-----------------------------------------------------' path = os.path.join(cfg.ROOT_DIR, 'lib', 'datasets', 'VOCdevkit-matlab-wrapper') cmd = 'cd {} && '.format(path) cmd += '{:s} -nodisplay -nodesktop '.format(cfg.MATLAB) cmd += '-r "dbstop if error; ' cmd += 'voc_eval(\'{:s}\',\'{:s}\',\'{:s}\',\'{:s}\'); quit;"' \ .format(self._devkit_path, self._get_comp_id(), self._image_set, output_dir) print('Running:\n{}'.format(cmd)) status = subprocess.call(cmd, shell=True)
def _get_default_path(self): """ Return the default path where TATTC VOC is expected to be installed. """ #return os.path.join(datasets.ROOT_DIR, 'data', self._year, 'tattc_voc') dir=os.path.join(datasets.ROOT_DIR, 'data', 'tattc_voc', self._year, 'tattc_voc') print('[default path]', dir) return dir
def __init__(self, name): self._name = name self._classes = [] self._image_list = [] self._gtdb = {} self._data_path = osp.abspath(osp.join(datasets.ROOT_DIR, 'data')) # Options specific to a particular datasets self.config = {}
def cache_path(self): cache_path = osp.abspath(osp.join(datasets.ROOT_DIR, 'data', 'cache')) if not osp.exists(cache_path): os.makedirs(cache_path) return cache_path
def _get_default_path(self): """ Return the default path where KITTI is expected to be installed......? """ return os.path.join(datasets.ROOT_DIR, 'data', 'building_data') # ---------------------------------------------------------------------------------------------------------------- #