Skip to content

Commit

Permalink
Remove unexpected code
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlzla committed Jan 29, 2018
1 parent 4f4f5c4 commit 95702fb
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pspnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def predict(self, img, flip_evaluation=False):
img = misc.imresize(img, self.input_shape)

img = img - DATA_MEAN
#img /= 255.0
img = img[:, :, ::-1] # RGB => BGR
img = img.astype('float32')
print("Predicting...")
Expand All @@ -72,10 +71,6 @@ def predict(self, img, flip_evaluation=False):

def feed_forward(self, data, flip_evaluation=False):
assert data.shape == (self.input_shape[0], self.input_shape[1], 3)
#data = data[np.newaxis, :, :, :]

# utils.debug(self.model, data)
#pred = self.model.predict(data)[0]

if flip_evaluation:
print("Predict flipped")
Expand Down Expand Up @@ -191,9 +186,8 @@ def __init__(self, nb_classes, weights, input_shape):
768, 480), weights=args.weights)

probs = pspnet.predict(img, args.flip)
pspnet.model.save('model.h5')

print("Writing results...")
# import ipdb; ipdb.set_trace()
cm = np.argmax(probs, axis=2)
pm = np.max(probs, axis=2)

Expand Down

0 comments on commit 95702fb

Please sign in to comment.