Skip to content

CoreML conversion of automatic colourization using deep neural networks. "Colorful Image Colorization." In ECCV, 2016

License

Notifications You must be signed in to change notification settings

c2p-cmd/b-w_colorization

 
 

Repository files navigation

B&W Colorizer using CoreML

This is a Colorizer which using a Deep-CNN and runs using CoreML

Essentially by converting richzhang's pytorch colorizer to CoreML.
One can embed this in a any iOS/macOS/visionOS app and colorize old b&w images

You can look at the converter jupyter notebook

Or download the models directly

Demo app

How it works?

  • Essentialy this is a pytorch model ECCV16Colorizer that has been converted to CoreML
  1. Convert the UIImage to a MLShapedArray<Float> [1, 3, 512, 512] shape
  2. Then convert to same to Lab color space array [1, 1, 512, 512] shape
  3. Use this array's 'L' part to predict the 'ab' part of the image's Lab color Space Image
  4. We get an MLShapedArray<Float> [1, 2, 512, 512] then using the original 'L' array we can combine and get the Lab of the predicted Image
  5. Convert back to RGB space and convert the array to UIImage.

Credits

About

CoreML conversion of automatic colourization using deep neural networks. "Colorful Image Colorization." In ECCV, 2016

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 87.0%
  • Swift 7.1%
  • Python 5.9%