Exemple #1
0
def main(args):

    dbf_parameters_dict = parse_parameters_json(args.dbf_parameters_json)
    pprint.pprint(dbf_parameters_dict)

    validation_detectors_detections = read_detectors_detections(
        dbf_parameters_dict['validation_detections_filenames'])

    annotations_dir = os.path.join(args.validation_dataset_dir, 'Annotations/')
    images_dir = os.path.join(args.validation_dataset_dir, 'JPEGImages/')

    validation_imagenames = read_imagenames(
        args.validation_imagenames_filename, images_dir)
    validation_annotations = read_annotations(
        args.validation_pickled_annots_filename, annotations_dir,
        validation_imagenames, args.dataset_name)

    annotations_dir = os.path.join(args.test_dataset_dir, 'Annotations/')
    images_dir = os.path.join(args.test_dataset_dir, 'JPEGImages/')

    test_imagenames = read_imagenames(args.test_imagenames_filename,
                                      images_dir)
    test_annotations = read_annotations(args.test_pickled_annots_filename,
                                        annotations_dir, test_imagenames,
                                        args.dataset_name)

    test_detectors_detections = read_detectors_detections(
        dbf_parameters_dict['test_detections_filenames'])

    validate_DBF(args.dataset_name, args.validation_dataset_dir,
                 validation_imagenames, validation_annotations,
                 validation_detectors_detections, args.test_dataset_dir,
                 test_imagenames, test_annotations, test_detectors_detections,
                 dbf_parameters_dict, args.map_iou_threshold,
                 args.output_filename)
Exemple #2
0
def main(args):

    alfa_parameters_dict = parse_parameters_json(args.alfa_parameters_json)
    pprint.pprint(alfa_parameters_dict)

    keys = {}
    for i in range(len(alfa_parameters_dict['detections_filenames'])):
        path = alfa_parameters_dict['detections_filenames'][i]
        if 'SSD' in path:
            keys[i] = 'SSD'
        elif 'DeNet' in path:
            keys[i] = 'DeNet'
        elif 'Faster_R-CNN' in path:
            keys[i] = 'Faster R-CNN'

    detectors_detections = read_detectors_detections(
        alfa_parameters_dict['detections_filenames'])

    new_detectors_detections = {}
    for key in detectors_detections.keys():
        new_detectors_detections[keys[key]] = detectors_detections[key]

    detectors_detections = new_detectors_detections

    draw_paper_pic(args.image_filename, args.annotation_filename,
                   detectors_detections, alfa_parameters_dict)
Exemple #3
0
def main(args):

    annotations_dir = os.path.join(args.dataset_dir, 'Annotations/')
    images_dir = os.path.join(args.dataset_dir, 'JPEGImages/')

    imagenames = read_imagenames(args.imagenames_filename, images_dir)
    annotations = read_annotations(args.pickled_annots_filename, annotations_dir, imagenames, args.dataset_name)

    dbf_parameters_dict = parse_parameters_json(args.dbf_parameters_json)
    pprint.pprint(dbf_parameters_dict)

    detectors_detections = read_detectors_detections(dbf_parameters_dict['validation_detections_filenames'])

    cross_validate_ALFA(args.dataset_name, args.dataset_dir, imagenames, annotations, detectors_detections,
                        dbf_parameters_dict, args.map_iou_threshold, args.folds_count)
Exemple #4
0
def main(args):

    nms_parameters_dict = parse_parameters_json(args.nms_parameters_json)
    pprint.pprint(nms_parameters_dict)

    detectors_detections = read_detectors_detections(
        nms_parameters_dict['detections_filenames'])

    annotations_dir = os.path.join(args.dataset_dir, 'Annotations/')
    images_dir = os.path.join(args.dataset_dir, 'JPEGImages/')

    imagenames = read_imagenames(args.imagenames_filename, images_dir)
    annotations = read_annotations(args.pickled_annots_filename,
                                   annotations_dir, imagenames,
                                   args.dataset_name)

    validate_NMS(args.dataset_name, args.dataset_dir, imagenames, annotations,
                 detectors_detections, nms_parameters_dict,
                 args.map_iou_threshold, args.output_filename)