A deep neural network which recolors an image according to a given target colour that is useful to express images in various colour concepts. The network is capable of performing a content-aware recolorization based on the target palette. The main features are:
- A convolutional encoder that extracts features from the input image
- A convolutional decoder that generates a colourized output image
- A perceptual loss function that measures the similarity between the output and the ground truth images
- A dataset loader that can handle different image formats and sizes
b) The Target Palette
c) The recolorized image as per the target palette
Run DL2022/run.py as
python run.py -i 'path_to_input_image' -p 'hexcodes_of_color_palette' -m 'path_to_saved_model' -o 'path_of_output'
Example
python run.py -i 'Samples/3/3.png' -p '#507b71' '#6caebc' '#6ead9c' '#afd9c3' '#b8dfdc' '#ecebd7' -m 'saved_model/model.pth' -o 'output.jpg'