Giter Club home page Giter Club logo

aframe-text-drawing-and-recognition's Introduction

Text Drawing and Recognition in A-Frame

Screenshot

Description / Rationale

This is an exploratory project, which demonstrates the drawing and text recognition possibilities in web VR environment. Drawing part represents the reduced and slightly adapted version of Marlon Lückert's "Whiteboard VR". Text recognition part is made available through Microsoft’s TrOCR model, hosted on HuggingFace. Recognized text is turned into image through another AI model hosted on HuggingFace.

Instructions

To enable drawing component:

  1. Attach it to the head of your html file, for example:
<script src="texture-painter-component.js"></script>
  1. Attach attribute of "texture-painter" to a desired primitive, for example to plane:
<a-plane texture-painter position="0 1.5 -4" rotation="0 0 0" width="5" height="4"></a-plane>

If necessary define the attribute parameters (color: color; background: color; size: numeric; eraseAll: boolean), for example: texture-painter="color: green; background: red; size: 15" 3. Make sure to make primitive, where drawing will take place, is clickable if used with VR or withouth if it is mobile or desktop. In other words apply a class name and use cursor and raycaster:

VR:

<a-plane texture-painter class="clickable" position="0 1.5 -4" rotation="0 0 0" width="5" height="4"></a-plane>
<a-entity class="controller" laser-controls="hand: left" raycaster="objects: .clickable;" line="color: #000000"></a-entity>
<a-entity class="controller" laser-controls="hand: right" raycaster="objects: .clickable;" line="color: #000000"></a-entity>

Mobile/Desktop:

<a-plane texture-painter position="0 1.5 -4" rotation="0 0 0" width="5" height="4"></a-plane>
<a-entity cursor="rayOrigin: mouse" raycaster="objects: .clickable;"></a-entity>

Text recoginition and image generation based on text are enabled through API endpoints. See how everything works in the provided example.

Tech Stack

The project is powered by AFrame and HuggingFace hosted API endpoints.

Demo

To see the application at work: Demo application

aframe-text-drawing-and-recognition's People

Contributors

akbartus avatar

Watchers

 avatar

Forkers

ornalabs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.