commacoloring was really well received and made it to the front page of Product Hunt. We got a lot of feedback from our users (we love users!). A feature was requested to automatically color the easy parts of the image, letting the user focus in the details. We used our self-driving car engineering skills to build a self-coloring book.
The engineering
Note: you can skip that section without affecting your coloring experience, but if you are familiar with deep learning jargon, please read along.
To automate the coloring process we trained a deep neural network for pixel level semantic parsing, i.e a network that will classify (color) each pixel using information of its surroundings. Given the state of the art, we knew the right approach would be a fully convolutional neural network. We started by trying an encoder-decoder like architecture with 4 convolutions down and 4 deconvolutions up [1], with one output channel per class. This was taking too long to converge though.
We later noticed that [2] claims that retraining the encoder network is not really necessary. They used a pre-trained VGG for dense classification in low resolution and bilinear interpolation followed by Conditional Random Fields for upscaling the image back to its desired size. Also [3] stated that the job of the decoder/deconvolution network is to mainly upscale and smooth the segmented output image and it can be a smaller network. Reddit brought our attention to ReSeg [4] that uses only the convolutional layers of VGG as the encoder.
Our final solution combined ideas from [3] and [4] and used fixed VGG convolutional layers as the encoder and trained a simple deconvolutional network as the decoder. Each layer of our decoder used only 16 filters of 5x5 pixels with upscaling stride of 2. We tried faster upscaling with stride 4 but the results didn't look sharp enough.
In one of our experiments we reinitilized the VGG weights to random values and were still able to learn a successful decoder. We called this architecture Extreme Segmentation Network, since it resembles Extreme Learning Machines. Unfortunately, we were aware that the acronym would compete with Echo-State Networks' and we decided to use the original VGG filters in production. Our final network is called Suggestions Network (SugNet). Some results are shown in Figure 1 and 2.
Figure 1. Input image and self colored Suggestions example.
Figure 2. Sample outputs of the segmentation network after 400 training epochs compared to human colored images.
All our method was implemented with Keras using Tensorflow backend. The VGG image preprocessing used Theano backend. At test time, using Tensorflow only the results didn't match and we doubted our engineering skills for a while before remembering that Theano implements correlation instead of convolution. Here is how to convert convolutional wieghts from Theano to Tensorflow. Keras didn't have a proper deconvolution layer, but we started working on a PR for that.
References:
[1] Vijay Badrinarayanan, Ankur Handa and Roberto Cipolla "SegNet: A Deep Convolutional Encoder-Decoder Architecture for Robust Semantic Pixel-Wise Labelling". arXiv:1505.07293
[2] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, Alan L. Yuille "Semantic Image Segmentation with Deep Convolutional Nets and Fully Connected CRFs". arXiv:1412.7062
[3] Adam Paszke, Abhishek Chaurasia, Sangpil Kim, Eugenio Culurciello "ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation". arXiv:1606.02147.
[4] Francesco Visin, Marco Ciccone, Adriana Romero, Kyle Kastner, Kyunghyun Cho, Yoshua Bengio, Matteo Matteucci, Aaron Courville "ReSeg: A Recurrent Neural Network-based Model for Semantic Segmentation". arXiv:1511.07053.
We hope that Suggestions will inspire you to build even more fun apps with the open source commacoloring product. Let us know about all the amazing things you build with it.
my mouse is misbehaving...
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThe new features were all welcome! I'd suggest that a double click on the mouse would close the polygon (it is hard to catch the first point sometimes).
ReplyDeleteOn the NN perspective, maybe you can try the U-Net (http://arxiv.org/abs/1505.04597) as well.
It would greatly help if you can do keyboard shortcuts for brushes and brightness.
ReplyDeleteIt can save few kilometers on mouse, which will not have to run over whole screen. They should be simple and accessible with keys next to each other (maybe numeric keyboard?).
Are you guys planning to open source the codes w.r.t the net?
ReplyDeleteWhat are coma points?
ReplyDeleteWhat are coma points?
ReplyDeleteGeorge, please don't destroy the world with AI. Some of the stuff you're saying is really ignorant. I know you think it's cool and all, but it's going to end humanity before it ever really had a chance. Google/NSA/the public relations/advertising industries will completely own us. You should know better!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWhat could help on the infrastructure (as in civil engr infrastructure). Sim-city style: what could you add to road/streets/highways that would make your job easier or results better? Machine vision cues, conventions on striping, acoustics, anything... Even if applied to other vehicles, visible border marks.
ReplyDeleteIn a nutshell if you could influence civil projects to make them "friendly" (compatible) with your use cases and implementation methodologies - what would be on your wishlist or nice-to-have list. Callout game changers as needed (if UV striping or IR strip, or radio beacons, etc...)
http://www.wsp-pb.com/
Sup George
ReplyDeleteGreat project, can't wait for self driving kits under $1,000.00. Kept me posted.
ReplyDeleteanyway to contact you? i would like to be the installer of this product.
ReplyDeleteanyway to contact you? i would like to be the installer of this product.
ReplyDeleteMarcos Logo Png Information Hd Wallpaper
ReplyDeleteHi, thnaks for speed up tricks. Also check Windows 10 iso direct download link
ReplyDeleteThese lotteries are devided into three parts and from their one part which is published on 4pm called as lottery sambad 4pm result.today lotterysambad
ReplyDeleteThereafter the vehicle for money Sydney strategy normalized by them pays the merchants a decent return against the old disposed of pony.
ReplyDeleteScrap Car Removal Brantford
Thanks for the detailed info on this topic. It’s very hard to find nowadays to know about the basics but you did it so much well and I love FMWhatsApp . I would love to see more about it.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteYour post is helping me a lot. Its really nice and epic. Thanks a lot for the useful info on this topic. You did it so much well. I love to see more about. Keep sharing and updating. Also share more posts with us. Thank you. FMWhatsapp Apk
ReplyDeleteThanks for this great info. Keep check this: https://somaapp.org/tekken-3-apk-download/
ReplyDeleteThanks for sharing such a great article, I am going to download FMwhatsapp apk this can be logged into two on the same device APK of an account to find my friends to share this high-quality article!
ReplyDeleteExcellent Blog! I would like to thank for the efforts you have made in writing this pos Coloring Page
ReplyDelete