junyanz / interactive-deep-colorization

Deep learning software for colorizing black and white images with a few clicks.
https://richzhang.github.io/ideepcolor/
MIT License
2.69k stars 447 forks source link

how to compute the global color histogram #61

Open cccusername opened 5 years ago

cccusername commented 5 years ago

hi, @richzhang i am confused about how to compute the global color histogram. Does it come from Global Hints Network? If my hypothesis is right, the input of Global Hints Network is a reference image, right? I am looking forward to your reply, thanks!

richzhang commented 5 years ago

An example for extracting the global color histogram is here in function get_global_histogram. It called a network here. The network resizes the image, computes the color bin that each pixel belongs to using this function, and then averages all the pixels in the image to get a distribution.

cccusername commented 5 years ago

@richzhang The target of the image is colorized with a reference image. So how to color the the background of the image.

junyanz commented 5 years ago

The entire image is colorized based on a reference image, not only the target.

mattclifford1 commented 5 years ago

Would it be possible to get a pytorch version of the global hints network?

junyanz commented 5 years ago

It's currently not available. We have a notebook with Caffe backend.