PSPNet-tensorflow icon indicating copy to clipboard operation
PSPNet-tensorflow copied to clipboard

eval_flip

Open FengLoveBella opened this issue 7 years ago • 0 comments

Could you explain how the flipped_eval work? I put raw_output(image) and raw_output(flip_image) together, but I found I got a worse prediction than using only raw_output(image). The left is my code based on your flipped_eval.

	if flipped_aval:
		flipped_out = tf.image.flip_left_right(tf.squeeze(net2.outputs))
		flipped_out = tf.expand_dims(flipped_out, dim=0)
		raw_output = tf.add_n([raw_output, flipped_out])
		raw_output_up = tf.image.resize_bilinear(raw_output, tf.shape(self.image_batch)[1:3, ])
		raw_output_up = tf.argmax(raw_output_up, axis=3)
		pred = tf.expand_dims(raw_output_up, dim=3)
	else:
		raw_output = tf.image.resize_bilinear(raw_output, tf.shape(self.image_batch)[1:3,])
		raw_output = tf.argmax(raw_output, axis=3)
		pred = tf.expand_dims(raw_output, dim=3)

FengLoveBella avatar Feb 08 '18 10:02 FengLoveBella