You are on page 1of 6

Smart Draw!

Doodle Recognition
Saad Ali Khan Saqib Mumtaz
Department of Department of
Computer Science And Computer Science And
Information Technology Information Technology
NED University NED University
KARACHI, PAKISTAN KARACHI, PAKISTAN
saadalikhan1996@gmail.com thesaqibmumtaz@gmail.com
Taimoor Tahir Ali Raza Khatri
Department of Department of
Computer Science And Computer Science And
Information Technology Information Technology
NED University NED University
KARACHI, PAKISTAN KARACHI, PAKISTAN
taimoor.t@gmail.com ali.raza@gmail.com
them some questions to determine their gender, and
Abstract—Smart Art is new kind of drawing tool
that allows the user to easily draw technical drawing also found a way to instruct the machine. Moreover,
while ‘on the go’. Inspired by the Doodle, a hand it is now known as AI. The child machine's structure
drawing project by Google, Smart Art takes the was composed of genetic material, and its usual
enriched capabilities of AI especially deep learning and decisions depended on the experimenter's judgment
help users in making technical and business diagrams of various words. It can be said that pattern
more professional while giving them the ease of
doodling The user can draw diagrams while in recognition is a problem and machine learning is a
meetings, in conference or in class and the application possible solution. The goal of machine learning is not
gives smart suggestions to convert the hand illustrations to make perfect guesses. Machine learning allows us
of shapes to more presentable form. In this paper, we to use models, loss functions and multiple approaches
will discuss Autonomous conversion of hand drawn
to determine which approach provides better image
technical illustrations to digital age using our smart
suggestion engine which recognizes the component of processing. Image processing also depends on the
diagram and suggest relevant professional type of image processing. This is because we have to
representation from our repository of images. Using this use multiple loss functions that perform better than
tool, a user can draw specialized and business graphs on others due to their unique properties. There are many
Smart Art board that can be used further in reports
examples of machine learning improving our
eliminating the hassle to re construct the same diagram
or illustration using a software for documentation lifestyles. Machine learning is an artificial
purpose. We have used Convolution NN for recognizing intelligence (AI) technique that gives systems the
the hand illustration and Firebase to retrieve the ability to learn and improve naturally from
suitable suggested image from repository experience without being explicitly programmed.
Machine Learning Cynosure is about developing
Keywords—CNN, insert, fast, innovative, creative
drawings, Predictive output computer programs that can approach data and use it
to obtain knowledge. The cognitive process begins
I. INTRODUCTION with investigation and detail. B. Patterns, direct
Artificial Intelligence has been a hot word for the last events, or guidelines to look for patterns in your data
few decades, but the last few years haven't worked. and use the guides you've published to draw better
Our journey began in the 50s when the father of AI conclusions. The point is to allow computers to
(Alan Turing) published his first paper. started in the automatically acquire knowledge and change steps
second half. He developed an imitation game just to accordingly without human intervention or assistance
make sure machines (computers) could really think
like humans. The game includes his three races: “Smart art” allows you to create hand-drawn shapes
male, female, and interrogator. Investigators are for technical drawings, enhanced by apps. Hand-
segregated from men and women. And he had to ask drawn shapes are easy to use when demonstrating

1
concepts in a meeting or giving a lecture in a class, creates guidelines for perfecting a drawing or
but lack the presentation and professional look and removing noise from a sketch. Shortage. Another
feel to document directly there. I can not do it. Not way to refine your sketch is to interpolate between
only will it be difficult to remember the shapes later, latent vectors. In this way, we can visualize how an
but you may be bad at drawing. Therefore, it takes image transforms into another photo by visualizing
extra effort to properly document your drawings the interpolation reconstruction. With that in mind,
with professional tools. learn how the model uses high settings to create
Here are some fresh ideas for bridging the gap more diverse sketches, taking into account the
between drawing a concept on paper and turning it spherically interpolated latent vectors that are later
into a full-fledged drawing. Smart Art Board allows compared to another model with low settings. I hope
you to illustrate your ideas using Sketch Canvas and that. [15] suggests that latent vectors encode the
Smart Art Engine, suggesting professional shape conceptual power of sketches. From this, we can see
images suitable for illustration. The user can then that models trained on low settings are capable of
replace the illustration with an improved version of drawing sketch analogies. For example, subtracting
the app. Suggested shapes are symbols or the encoded cat head latent vector from the full cat
professionally drawn shapes. Users can select their latent vector gives us a vector representing the frame.
own versions of drawings as well as drawings Repeat this test to remove the complete cat frame.
submitted by other artists. Smart Art is a new kind of We therefore find that this analogy allows us to
drawing tool that combines the magic of machine discover how versions organize their latent space to
learning with developer drawing to empower anyone represent different criteria of the generated
to create something visually and quickly. We used a attractiveness complex. The SBIR (Sketch Based
convolutional neural network to predict categories of Image Retrieval) algorithm can create the same
shape objects. That prediction evolves as you add image with a drop of paint or a preset
more detail. Beyond the limits of intellectual art! look. This structure was primarily built entirely on
The ability to recognize and classify hand-drawn histograms of world colors, dimensional design, or
doodles has important implications for general site contingencies. The addition of strongly colored
artificial intelligence development. For example, droplet positions modified in suggests the use of a
research in the fields of ingenuity, foresight, and shadow rubric containing waves. This has now been
pattern reputation, especially in subfields involving shown to be beneficial for a wider range of color
optical character recognition (OCR), would greatly texture image searches. The SBIR representation is
benefit from the introduction of robust classifiers for the use of edge maps to extrapolate the sketch from
overly noisy recordings. There is a possibility. As the the drawing before matching. Bimbo and Pala
motivation behind this test, let's focus on the type of discuss their method in [4], which mainly relied on
the complete doodle. For simpler reasons than in the the flexible addition of image placement to facet
actual game, this effort is due to the wide range of plans within sketches to assess similarities.
classes (345), the wide format of his doodles even Complementary and tensile deformation strength
within a single taxonomy, and the wide variety of his criteria used in the fitting are used to calculate the
doodles across multiple classes. remains extreme due similarity. Link drawings and snapshots in date to
to the confusing proximity of So let's create a multi- display subsequent images. Nevertheless, this type of
class classifier where information is an intelligent art! scheme has limited use in SBIR structures due to its
Doodle recognition and the result is the expected price
classification of delimited items. A later method [5] combines the world labeling of
II. RELATED WORK hue (e.g., RGB histograms) and shape (e.g., edge
Similar work was done to create a powerful hand- direction histograms) to decompose the side pieces
drawn forum. The sketch board should have a green into filamentary representations that encode distance,
version that respects the sketch below and can deflection, and comparison dimension connections
retrieve an equivalent drawing from memory. While increase.
many researchers have worked to create good- Similarly, Rajendran and Chang [6] recommend to
looking sketches or complete imperfect sketches, withdraw aspect designation for) from source
researchers have also turned to image retrieval drawing question and vacation spot picture and
systems that discover comparable drawings from (compare their curvature and) path (histograms for
memory. have also been working on. At Stanford shape similarity. Method utilizes multiple scales to
University, Kristine and James [2] used account for) diverse degrees of element in cartoon
convolutional neural networks (CNNs) to reconstruct question. Shih and Chen [7] extract features that
noisy or incomplete sketches. A CNN classifier includes invariant moments, histogram of area
guidelines and varieties of rework coefficients that

2
are robust to geometric deformation, in an effort to k-means, DBSCAN, and works with the Python
describe representative gadgets in the venture of numerical and scientific libraries NumPy and SciPy
trademark segmentation and retrieval. [8] Designed to work together. design.
Employ angular-spatial distribution of pixels in the SciPy is a free, open-source Python library for
abstract sketch to extract capabilities using the scientific and engineering computing. SciPy is built
Fourier transform. The extracted features are on top of the NumPy Array object and is part of the
rotational and scale invariant and strong against NumPy stack, which includes tools like Matplotlib,
translation. [9] this suggest an actual-time SBIR Pandas, SciPy, and an ever-growing set of libraries
machine that locates picks the usage of a sketched for scientific computing. Keras is a high-level neural
depiction of object shape divide the photo into a network API written in Python and running in
regular grid and compute descriptors (either EHD Tensor-Flow. Designed with a focus on enabling
[10] or the Structure Tensor [11]) from each cellular rapid experimentation. Being able to get results from
— concatenating the ones to shape an international ideas with the least delay possible is the key to good
sketch feature. As we later display, this offers research. That's why we use Keras in our project.
lemmatizes the invariance to modifications in Keras makes prototyping easy and fast (due to its
function, scale or orientation compared to our method ease of use, modularity, and extensibility). It supports
And some of different descriptors [12] within a bowl both convolutional and recurrent networks, and a
device. A scalable method to SBIR became supplied combination of the two that runs seamlessly on CPUs
very lately in mind finder [13] through spatial and GPUs. Tensorflow is an open-source artificial
gridding of edge portions (edgels) distinguished intelligence library that uses data flow diagrams to
within the picture. The approach is productive, create models. This allows you to create large neural
however as with [14] presentations restrained energy networks with many layers. Tensorflow is primarily
to interpretation accepting portrayals to round contain used for classification, recognition, understanding,
a similar vicinity as the gadgets they delineate. discovery, prediction, and creation. A Smart Art
Doodle model known for recognizing and quickly
learning local features in images. First, we perform
III. METHODOLOGY some preprocessing of the data for this purpose. Let
Prescriptive Analytics envisions using the results of us first discuss the dataset we use in our project and
machine learning and deep learning to predict future how we perform different processing over it to
events (Predictive Analytics) and go beyond the achieve the best results, for training we use 70% of
limits of human interaction to initiate proactive the total dataset and the dataset consist of 4 classes
decision-making. A smart art app that lets you safely for each class we have 300 shapes for training, the
paint on canvas exactly how you want it. Choose a batch size we required for our model is 32 while the
route based on current data (taking shape into no. of epochs is 4. We divide image rows and
account and optimizing the route). It implements columns by 128, for our 4 classes we use 1 channel.
convolutional neural networks (CNNs) and uses We need to convert our image data into float and
libraries such as NumPy, Matplotlib, Sklearn, SciPy, after that we need to divide it by 255 (for image to
Keras and Tensorflow. beginning. Let's take a closer feature vector). The labels for our classes are as
look at the NumPy library. This is a general purpose follows. For (class 0) it is 0:300, for (class 1) it is
array processing package. Provides high-performance 300:600, for (class 2) it is 600:900 and for (class 3) it
multidimensional array objects and tools for is 900:1200. Firstly, we use 2D convolution over our
manipulating those arrays. Basic package for Python dataset and then we apply activation function. By
scientific computing. NumPy packages are used to following the CNN Architecture, we apply flatten to
perform various operations. A nd array (NumPy bring all levels of a multi-layered image down to one
array) is a multidimensional array used to store plane. And finally we feed the result through dense
values of the same data type. These arrays are layer and all in it we have a dropout rate of 0.5 then
indexed like sequences and start at zero. Next, we compile all results. In order to stop the training
Python's matplotlib library. Use it to draw charts, phase of data we need to add a callback function such
histograms, bar graphs, and everything used in that it would stop the training and don’t get it over fit.
training to check accuracy and performance. Then We visualize our data according to the loss and the
move on to cufflinks and plots, which provide accuracy level we get in training and finally we do
interactivity to plots. increase. The Sklearn (Scikit- plot and print the confusion matrix. Then we are
learn) library provides various classification, Saving and loading model and weights then we
regression and clustering algorithms such as support serialize into JSON file format, then serialize
vector machines, random forests, gradient boosting, Weights into HDF5 file format then load and create
model then finally loads weights into new file format

3
(HDF5 format) models. As first we apply our
algorithm on the sample datasets.

Figure 4.1

Figure 4.2
Figure 4.11 Figure 4.12

Figure 4.3

Figure 4.4

Figure 4.5 Figure 4.6

IV. RESULT
In first phase we test our model on four shapes that
includes circle, square, rectangle and triangle and all
evaluation was based on dataset of 200 images for
each object among which we get the highest accuracy
Figure 4.7 Figure 4.8 over triangle which was 1 and overall accuracy for all
four object was 0.68. 80% of the images were taken
for training and 20% were taken for testing.
In second phase, we test our model on another 4
shapes named arrow, diamond, rectangle and circle.
And this time we achieve highest accuracy over
circle which is 0.8 and the overall accuracy of our
model was 0.81. Which is higher than the previous
result which was 0.68 as shown in table 5.1 and 5.2

Table 5.1

Then we apply on our own datasets which we make.


Figure 4.9 Figure 4.10

4
Table 5.2 https://github.com/thesaqibmumtaz/Smart_Art.git
VIII. REFERENCES
[1] Xingyuan Zhang, Yaping Huang, Qi Zou,
V. CONCLUSION AND FUTURE WORK Yanting Pei, Runsheng Zhang, Song Wang. (8,
In this A.I tool, the features we have added are January,2019) A Hybrid Convolutional Neural
important for every technical person. But this is not Network for Sketch Recognition
all stop over here. It can be further more enhanced in [2] Kristine Guo., James WoMa, & Eric Xu, Quick,
future. We can move it toward electronic side also by Draw! Doodle Recognition
enhancement of circuit equipment's. We can make (November 2016).
this application a simulation tool as well in future. [3] Saya Fujino, Taichi Hatanaka, Naoki Mori,
Which will perform simulation for every type of Keinosuke Matsumoto, Evolutionary Deep Learning
connection related to electronic, electrical fields as based on Deep Convolutional Neural Network for
well. We can also extend it up by moving this app Anime Storyboard Recognition (22 May 2018).
Towards business side as well. By which we can [4] del Bimbo, A., Pala, P., 1997. Visual image
retrieval by elasticmatching of user sketches, in:
PAMI, pp. 121-132.
[5] ain, A. K., Vailaya, A., 1996. Image retrieval
using color andshape. in: Pattern Recognition, pp.
1233-1244.
[6] Rajendran, R., Chang, S., 2000. Image retrieval
with sketchesand compositions. In: ICME. pp. 717-
720.
[7] Shih, J.-L., Chen, L.-H., 2001. A new system for
trademark segmentation and retrieval. in: Image
Vision Computing, pp. 1011-1018.
[8] Chalechale, A., Naghdy, G., Mertins, A., 2005.
have business charts, business ow charts, and all Sketch-based image matching using angular
needs of a business person for expressing his point of partitioning. in: IEEE Trans. Systems,
view clearly. Man, and Cybernetics, pp. 28-41.
Not only doing above mentioned things we can make [9] Eitz, M., Hildebrand, K., Boubekeur, T., Alexa,
our neural network better and stronger by converting M., 2009. A descriptor for large scale image retrieval
it to DCNN (deep convolution neural network). By based on sketched featurelines. In: SBIM. pp. 29-38.
applying different methods, we can also enhance our [10] Shih, J.-L., Chen, L.-H., 2001. A new system for
model's accuracy level. trademark segmentation and retrieval. in: Image
VI. ACKNOWLEDGEMENT Vision Computing, pp. 1011-1018.
I would like to express my special thanks of gratitude [11] Eitz, M., Hildebrand, K., Boubekeur, T., Alexa,
to my advisor and co- advisor (Dr. MUHAMMAD M., 2009. A descriptor for large scale image retrieval
UMER and MOONA KANWAL) who gave us this based on sketched feature lines. In: SBIM. pp. 29-38.
golden opportunity to do this wonderful project [12] Shechtman, E., Irani, M., June 2007. Matching
(SMART ART), which also helped us in doing a lot local self-similarities across images and videos. In:
CVPR.
of Research and we came to know about so many
[13] Wang, C., Cao, Y., Zhang, L., 2011.Mindfinder:
new things We are really thankful to them. We are A sketch based image search engine based on edge
over helmed in all humbleness and gratefulness to index. In: Proc. Comp. Vision
acknowledge our depth to all those who have helped and Pattern Recognition.
us to put these ideas, well above the level of [14] Eitz, M., Hildebrand, K., Boubekeur, T., Alexa,
simplicity and into something concrete. Any attempt M., 2009. A descriptor for large scale image retrieval
at any level can 't be satisfactorily completed without based on sketched feature lines. In: SBIM. pp. 29-38.
the support and guidance of MY parents and friends. [15] T. White. Sampling Generative Networks.
Secondly, we would like to thank our parents and ArXiv e-prints, Sept. 2016.
friends who helped us a lot in finalizing this project [16] Krizhevsky, I. Sutskever, and G. E. Hinton,
within the limited time frame who helped us a lot in “Imagenet classification with deep convolutional
guiding us from time to time in making this project. neural networks,” in Advances in neural information
processing systems (NIPS), 2012, pp. 1097–1105.
VII. CODE

5
[17] R. Girshick, J. Donahue, T. Darrell, and J.
Malik, “Rich feature hierarchies for accurate object
detection and semantic segmentation,” in
Proceedings of the IEEE Conference on Computer
Vision and Pattern Recognition (CVPR), 2014.
[18] J. Donahue, Y. Jia, O. Vinyals, J. Hoffman, N.
Zhang, E. Tzeng, and T. Darrell, “Decaf: A deep
convolutional activation feature for generic visual
recognition,” CoRR, vol.abs/1310.1531, 2013.

You might also like