def getLabelsSessions(dataset): sessions = [] folder = _root.relpath(_get_labels_folder(), dataset) if os.path.exists(folder): for fn in os.listdir(folder): sessions.append(fn) return sessions
def _get_dataset_folder(): if os.path.exists(_root.relpath('datasets_custom')): return 'datasets_custom' return 'datasets'
def logLabelsFilename(dataset, session): return _root.relpath(_get_labels_folder(), dataset, session, 'labels.log.jsons')
def exportFilename(dataset): return _root.relpath('export', dataset + '.csv')
def latestLabelsFilename(dataset, session): return _root.relpath(_get_labels_folder(), dataset, session, 'labels.latest.json')
def datasetConfigFilename(dataset): return _root.relpath(_get_dataset_folder(), dataset, 'config.json')
def datasetTileDir(dataset): return _root.relpath(_get_dataset_folder(), dataset, 'tiles')
def datasetDir(dataset): return _root.relpath(_get_dataset_folder(), dataset)
def _get_labels_folder(): if os.path.exists(_root.relpath('labels_custom')): return 'labels_custom' return 'labels'