This repository turns words to html code
- Install Conda for python which resolves all the dependencies for machine learning.
- gevent server (gevent is a coroutine -based Python networking library that uses greenlet to provide a high-level synchronous API on top of the libev or libuv event loop)
- Flask (Flask is a microframework for Python based on Werkzeug, Jinja 2)
A web page (also written as webpage) is a document that is suitable to act as a web resource on the World Wide Web. When accessed by a web browser it may be displayed as a web page on a monitor or mobile device.
The web page usually means what is visible, but the term may also refer to a computer file, usually hypertext written in HTML or a comparable markup language. Web browsers coordinate various web resource elements for the written web page, such as style sheets, scripts, and images, to present the web page. Typical web pages provide hypertext that includes a navigation bar or a sidebar menu linking to other web pages via hyperlinks, often referred to as links
- Filters to detect your hand movement
- CNN for training the model.
- Convert OPENCV responses to valid HTML output.
-
Network Used- Convolutional Neural Network
-
Flask with WSGI server
-
Microsoft event accessing model
window.event
that contains the last event that took place -
JQuery to append HTML tags.
If you face any problem, kindly raise an issue
-
Run the Flask server by running
word2web.py
, the event-stream will stream Open CV responses. -
The
window.event
will get last event reponse for which the JS function will appned the Output HTML to thelocalhost:5000
. -
Valid OpenCV keywords are:
BANNER
,TEXT
,ABOUT
,MENU
,CONTACT
,MAP
,IMG
,FOOTER
,TEAM
-
Few Exceptions:
4.1)The "IMG" tag will appear only if the "ABOUT" html tag is present in the output html. 4.2)The "MAP" tag will appear only if the "CONTACT" html tag is present in the output html. 4.3) The Response should have a valid output tag present in the template to be added to the html.
- First, you have to create a word database. The process is a bit time consuming since you have to provide images of the words you are trying to train your model on. You have to provide atleast 50 images per word.
- Repeat this for all the features you want. Refer to
data
folder in the repo. - Run
data_loader.py
for converting the images to h5 file. - If you want to train the model, run
train_words.py
- Finally, after training the model, you will get the trained file which you can use in
word2web.py
for converting your words to web code.