Visualizing images

A Python function to visualize the facade labels and the images of facades looks as follows:

def visualize_bw_image(img):
"""
Visualize a black and white image
"""
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
ax.imshow(img, cmap='gray', interpolation='nearest')
ax.axis("off")
ax.set_title("Image")
plt.show()

Use the preceding function to visualize the facade labels or the photos of facades, as follows:

visualize_bw_image(image)
visualize_bw_image(image)

An example of an image of the facade of a building is as follows:

The following image represents the architectural labels for the preceding facade image:

We will train a pix2pix network that is capable of generating an image of a facade from a facade label. Let's start working with the Keras implementations for the generator and the discriminator. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.66.185