Exemple #1
0
def get_YOLOv2_Predictor():
    # has been trained with coco
    file_yolov2_cfg = getDataFile("yolov2/yolov2.cfg")

    yolov2_training_ctx = TrainingContext(
        n_classes = 80,
        trainfile = "/home/pjreddie/data/coco/trainvalno5k.txt",
        validfile = "coco_testdev",
        namefile = getDataFile("yolov3/coco.names"), # all the other values don't make any difference when predicting
        backup_dir ="/home/pjreddie/backup/",
        setname = "coco"
    )

    return Predictor(training_ctx = yolov2_training_ctx, weight_file = get_yolov2_weights_file(), config_file = file_yolov2_cfg, thresh = 0.6)
Exemple #2
0
def test1():
    st="""Empty test
    """
    pre=pre_mod+"test1 :"
    print(pre,st)

    ctx = TrainingContext(
        n_classes = 80,
        trainfile = "/home/pjreddie/data/coco/trainvalno5k.txt",
        validfile = "coco_testdev",
        namefile = "/home/sampsa/C/darknet/data/coco.names",
        backup_dir ="/home/pjreddie/backup/",
        setname = "coco"
    )

    predictor = Predictor(training_ctx = ctx, weight_file = "/home/sampsa/C/darknet/yolov3.weights", config_file = "/home/sampsa/C/darknet/cfg/yolov3.cfg")