Beispiel #1
0
def save_image_data(fold, id_, tags, dset=None, 
                    model_tags=None, model_probs=None):
    dset = get_random_dset() if dset is None else dset
    entry = data.make_entry(tags, model_tags, model_probs)
    data.move_unlabeled_to_labeled(fold, dset, id_, entry)
    data.save_fold(fold)
    data.update_counts(fold["name"])
Beispiel #2
0
def save_obj_detect_image(id_, project, annos, dset=None):
    dset = get_random_dset() if dset is None else dset
    entry = data.make_obj_detect_entry(annos)
    fold = data.load_fold(project)
    if id_ in fold[cfg.UNLABELED]:
        data.move_unlabeled_to_labeled(fold, dset, id_, entry)
    else:
        for dset in [cfg.VAL, cfg.TRAIN]:
            if id_ in fold[dset]:
                fold[dset][id_] = entry
                break