(RDS) Tip of the Day: Turn your whiteboard sketches to working code in seconds with Sketch2Code
Today's tip...
Introducing Sketch2Code, a web based solution that uses AI to transform a handwritten user interface design from a picture to a valid HTML markup code.
User interface design process involves a lot a creativity that starts on a whiteboard where designers share ideas. Once a design is drawn, it is usually captured within a photograph and manually translated into some working HTML wireframe to play within a web browser. This takes efforts and delays the design process. What if a design is refactored on the whiteboard and the browser reflects changes instantly? In that sense, by the end of the session there is a resulting prototype validated between the designer, developer, and customer.
Within Microsoft Cognitive Services we host Computer Vision Service. The model behind this service has been trained with millions of images and enables object detection for a wide range of types of objects. In this case, we need to build a custom model and train it with images of hand-drawn design elements like a textbox, button or combo box.
The Custom Vision Service gives us with the capability to train custom models and perform object detection for them. Once we can identify HTML objects we use the text recognition functionality present in the Computer Vision Service to extract hand-written text present in the design. By combining these two pieces of information, we can generate the HTML snippets of the different elements in the design. We then can infer the layout of the design from the position of the identified elements and generate the final HTML code accordingly.
I encourage everyone to read the full article HERE and check out the YouTube video HERE
References:
- Turn your whiteboard sketches to working code in seconds with Sketch2Code - https://azure.microsoft.com/en-us/blog/turn-your-whiteboard-sketches-to-working-code-in-seconds-with-sketch2code/
- Sketch 2 Code - https://www.ailab.microsoft.com/experiments/30c61484-d081-4072-99d6-e132d362b99d
- Sketch 2 Code on YouTube: https://www.youtube.com/watch?time_continue=1&v=V6pqqPPHyYM
- Sketch 2 Code on GitHub - https://github.com/Microsoft/ailab/tree/master/Sketch2Code