Live data from Hacker News

Show HN: Open source colorizing grayscale images with NN

github.com

71–78 of 78 posts

Re: Show HN: Open source colorizing grayscale images with NN

#71
post #68

Earlier quoted context omitted.

Idle thought: Could colorization be used to (lossy) compress full color images (usefully)? What I imagine is full color input -> create B/W & color histogram (list of colors used) -> image viewer uses colorization algorithm to reapply colors.

I don't really know a ton about image compression, but I exported the same photo to jpg using the same settings twice: once with 3 channels and once desaturated and then with two channels hidden (I couldn't figure out how to make a 1-channel jpg in gimp, no sure if it's possible). The 1-channel export had less than 30% file size reduction. I don't think a compression technique that would require that much processing…

A 30% saving is roughly what I would expect.

Commonly JPEG separates the image into 1 channel of luma and 2 channels of chroma. It then downsamples the chroma to half the luma resolution, meaning that you have twice of much raw luma data as you have chroma.

It then goes on to do a whole load of fun discrete cosine transform, quantization and huffman encoding, but to a first approximation, I'd expect them to compress roughly similarly on average.

Since you've got twice as much luma data as chroma data, dropping the chroma will only save you ~30%.

Since the predictions from the neural network are not always accurate, you could then encode the error in the compressed file, and restore it on decompression. This will generally be close to 0, so compression should be pretty good.

At the end of the day, 30% better compression would be great... if the processing overheads aren't too great - I think that's the key factor.

(Most of this is from memory based on some hacking I did to be able to transcode videos to play on a cheap Chinese iPod Nano clone, which used an undocumented variant of MJPEG. The default quantization tables for luma and chroma are different from each other. The iPod Nano clone was using the standard quantization tables but the other way round (so using the luma table for chroma and the chroma table for luma). I can only imagine this was a bug in their code, as it was bound to reduce their compression ratio/image fidelity.)

Re: Show HN: Open source colorizing grayscale images with NN

#72

Earlier quoted context omitted.

Maybe it's about a truck painting shop, and every time they paint something, it either doesn't change color, or get a color different from what the customer ordered. I would watch that.

You mean you would watch paint dry?

Actually, someone recently filmed exactly that - a 10-hour film of paint drying, as a protest against film censorship. The British Board of Film Classification awarded it a "U" rating: universal/suitable for all.

http://www.telegraph.co.uk/film/movie-news/paint-drying-bbfc...

It would have been funny to splice in a couple frames of porn throughout, Fight Club-style.

Re: Show HN: Open source colorizing grayscale images with NN

#73
post #17

Earlier quoted context omitted.

I'd imagine that many people wouldn't even notice (unless the truck's color is part of the plot)

Truck's color can not be part of the plot, its a B&W movie!

Protagonist: "Do you see that red truck?" light blue truck rolls through the scene

Re: Show HN: Open source colorizing grayscale images with NN

#75

Earlier quoted context omitted.

That TIJ cars were distinguishable only by color was made possible by filming in color. A BW movie would not make a film requiring distinguishing colors that filmed as equal shades of grey. In any case, any such colorizing system would be designed to accept a bit of guidance here and there from the artist. This is much like when an OCR'd document needs a bit of touch-up. And even if it wasn't perfect, many BW movies…

Even though already perfectly enjoyable, I'm thinking Kurosawa films like Seven Samurai and Yojimbo. Man that would be something.

Yup. For what is possible, see reddit's colorizedhistory subreddit. The old pictures become much more interesting.

Re: Show HN: Open source colorizing grayscale images with NN

#76

These results: http://richzhang.github.io/colorization/ from Berkeley are much better than this model (and the code is open source as well). Furthermore, those better results have the advantage of a much simpler model. This model has a fairly complicated architecture (a complex residual concatenation setup) and many more parameters (I would guess anywhere between 2x-10x as many, but I'd have to take a closer look), w…

Idle thought: Could colorization be used to (lossy) compress full color images (usefully)? What I imagine is full color input -> create B/W & color histogram (list of colors used) -> image viewer uses colorization algorithm to reapply colors.

I think you could do quite well with seeding areas with known colours. Provide data of x,y,colour at a few sample points where the initial guess was too far out. A very small amount of data might allow for quite accurate results.

Re: Show HN: Open source colorizing grayscale images with NN

#78

Earlier quoted context omitted.

Not OP, but---I've been in software and OSS for a long time now, and I never knew this. I thought the term for that was Free Software. In fact, looking closely at that definition, isn't practically nothing open source? "Open-source software is computer software with its source code made available with a license in which the copyright holder provides the rights to study, change, and distribute the software to anyone a…

I think you've highlighted an inaccuracy, or at least a lack of clarity, in the Wikipedia article. I guess a Wikipedian could argue it should be interpreted as "for any purpose depending on the chosen licence", but that's definitely not clear. Re: Open source vs Free software, this is a matter for debate (the tendency being too associate Free software with the more copyleft/viral/gnu-ish side of things), but I would…

I would usually use the term "FLOSS", for Free-Liberte, OSS"

The L part clarified the type of freedom, as the FL clarifies that it's not just OSS.

Post reply on HN