コード例 #1
0
import kitti
import kitti_tracking
import voc

import sys

logger = logging.getLogger()
logger.setLevel(logging.INFO)

INGESTORS = {
    'kitti': kitti.KITTIIngestor(),
    'kitti-tracking': kitti_tracking.KITTITrackingIngestor(),
    'voc': voc.VOCIngestor(),
}

EGESTORS = {'voc': voc.VOCEgestor(), 'kitti': kitti.KITTIEgestor()}


def main(*, from_path, from_key, to_path, to_key, select_only_known_labels,
         filter_images_without_labels):
    success, msg = converter.convert(
        from_path=from_path,
        ingestor=INGESTORS[from_key],
        to_path=to_path,
        egestor=EGESTORS[to_key],
        select_only_known_labels=select_only_known_labels,
        filter_images_without_labels=filter_images_without_labels)
    if success:
        print(f"Successfully converted from {from_key} to {to_key}.")
    else:
        print(f"Failed to convert from {from_key} to {to_key}: {msg}")
コード例 #2
0
import sys

logger = logging.getLogger()
logger.setLevel(logging.INFO)

INGESTORS = {
    'kitti': kitti.KITTIIngestor(),
    'kitti-tracking': kitti_tracking.KITTITrackingIngestor(),
    'voc': voc.VOCIngestor(),
    'udacity-crowdai': udacity.UdacityCrowdAIIngestor(),
    'udacity-autti': udacity.UdacityAuttiIngestor()
}

EGESTORS = {
    'voc': voc.VOCEgestor(),
    # 'kitti': kitti.KITTIEgestor(),
    'tensorflow': tf_record.TensorflowEgestor(),
}


def main(from_path, from_key, to_path, to_key, select_only_known_labels,
         filter_images_without_labels, train_ids):
    success, msg = converter.convert(
        from_path=from_path,
        ingestor=INGESTORS[from_key],
        to_path=to_path,
        egestor=EGESTORS[to_key],
        select_only_known_labels=select_only_known_labels,
        filter_images_without_labels=filter_images_without_labels,
        train_ids=train_ids)