예제 #1
0
def resNet152Test():
	net = loadResNet(modelpath="../TestData/ResNet-152-model.hdf", layers="152")

	sample = loadResNetSample(net, "../TestData/tarantula.jpg")
	labels = loadLabels(synpath="../TestData/synsets.txt", wordpath="../TestData/synset_words.txt")

	res = net(gpuarray.to_gpu(sample)).get().reshape(-1)
	showLabelResults(res, labels, header=net.name)
예제 #2
0
def main():
    net = loadNiNImageNet(modelpath="../TestData/nin_imagenet.hdf")

    sample = loadSample("../TestData/barometer.jpg")
    labels = loadLabels(synpath="../TestData/synsets.txt",
                        wordpath="../TestData/synset_words.txt")

    res = net(gpuarray.to_gpu(sample)).get().reshape(-1)
    showLabelResults(res, labels, header="NiN")
예제 #3
0
def inceptionBNTest():
    net = loadInceptionBN(modelpath="../TestData/Inception-BN-0126.hdf")

    sample = loadVGGSample("../TestData/tarantula.jpg")
    labels = loadLabels(synpath="../TestData/synsets.txt",
                        wordpath="../TestData/synset_words.txt")

    res = net(gpuarray.to_gpu(sample)).get().reshape(-1)
    showLabelResults(res, labels, header=net.name)
예제 #4
0
파일: VGG.py 프로젝트: rsarbaev/PuzzleLib
def vgg19Test():
    net = loadVGG(modelpath="../TestData/VGG_ILSVRC_19_layers.hdf",
                  layers="19")

    sample = loadVGGSample("../TestData/tarantula.jpg")
    labels = loadLabels(synpath="../TestData/synsets.txt",
                        wordpath="../TestData/synset_words.txt")

    res = net(gpuarray.to_gpu(sample)).get().reshape(-1)
    showLabelResults(res, labels, header=net.name)
예제 #5
0
def inceptionV3Test():
    net = loadInceptionV3(modelpath="../TestData/Inception-7-0001.hdf")

    sample = loadVGGSample("../TestData/tarantula.jpg",
                           shape=(299, 299),
                           normalize=True)
    labels = loadV3Labels(filename="../TestData/synset_inception_v3.txt")

    res = net(gpuarray.to_gpu(sample)).get().reshape(-1)
    showLabelResults(res, labels, header=net.name)