def classify(images, config, weights):
    print("Classifying: %d region images" % len(images))

    assert(os.path.isfile(config) and os.path.isfile(weights))

    # Caffe swaps RGB channels
    channel_swap = [2, 1, 0]

    # TODO: resizing on incoming config to make batching more efficient, predict
    # loops over each image, slow
    # Make classifier.
    classifier = caffe.Classifier(config,
                                  weights,
                                  raw_scale=255,
                                  channel_swap=channel_swap,
                                 )

    # Classify.
    return classifier.predict(images, oversample=False)
Classifies our region proposals.
dataset/ETHPy150Open BradNeuberg/cloudless/src/cloudless/inference/localization.py/classify