diff --git a/exp/kerokero/test.py b/exp/kerokero/test.py --- a/exp/kerokero/test.py +++ b/exp/kerokero/test.py @@ -25,7 +25,7 @@ model.summary() log.info("loading data...") with np.load(args.data) as data: testImages=(np.float32(data["testImages"])/128-1).reshape((-1,224,224,1)) - testLabels=data["testLabels"].reshape((-1,4,2)) + testLabels=data["testLabels"].reshape((-1,1,2)) log.info("done") log.info(model.evaluate(testImages,testLabels)) @@ -34,8 +34,8 @@ for img in testImages: label=model.predict(np.reshape(img,(1,224,224,1))) print(label) points=[] - for i in range(4): + for i in range(1): points.append(EPoint((label[0][i][0]+1)*112,(label[0][i][1]+1)*112)) - corners=Corners(points) + corners=points sample=Sample(np.uint8((img+1)*128),corners) sample.show()