Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.


MindAR is a web augmented reality library. Highlighted features include:

⭐ Support Image tracking and Face tracking. For Location or Fiducial-Markers Tracking, checkout AR.js

⭐ Written in pure javascript, end-to-end from the underlying computer vision engine to frontend

⭐ Utilize gpu (through webgl) and web worker for performance

⭐ Developer friendly. Easy to setup. With AFRAME extension, you can create an app with only 10 lines of codes

Fund Raising

MindAR is the only actively maintained web AR SDK which offer comparable features to commercial alternatives. This library is currently maintained by me as an individual developer. To raise fund for continuous development and to provide timely supports and responses to issues, here is a list of related projects/ services that you can support.

Unity WebAR Foundation

WebAR Foundation is a unity package that allows Unity developer to build WebGL-platform AR applications. It acts as a Unity Plugin that wraps around popular Web SDK.

If you are a Unity developer, check it out!

Web AR Development Course

I'm offering a WebAR development course in Udemy. It's a very comprehensive guide to Web AR development, not limited to MindAR.

Check it out if you are interested:

MindAR Studio

MindAR Studio allows you to build Face Tracking AR without coding. You can build AR effects through a drag-n-drop editor and export static webpages for self-host. Free to use!

Check it out if you are interested!


Pictarize is a hosted platform for creating and publishing Image Tracking AR applications. Free to use!

Check it out if you are interested!


Official Documentation:

Demo - Try it yourself

Image Tracking - Basic Example

Demo video:

Try it yourself:

Image Tracking - Multiple Targets Example

Try it yourself:

Image Tracking - Interactive Example

Demo video:

Try it yourself:

Face Tracking - Virtual Try-On Example

Try it yourself:

Face Tracking - Face Mesh Effect

Try it yourself:

More examples

More examples can be found here:

Quick Start

Learn how to build the Basic example above in 5 minutes with a plain text editor!

Quick Start Guide:

To give you a quick idea, this is the complete source code for the Basic example. It's static HTML page, you can host it anywhere.

    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <script src=""></script>
    <script src=""></script>
    <script src=""></script>
    <a-scene mindar-image="imageTargetSrc:;" color-space="sRGB" renderer="colorManagement: true, physicallyCorrectLights" vr-mode-ui="enabled: false" device-orientation-permission-ui="enabled: false">
        <img id="card" src="" />
        <a-asset-item id="avatarModel" src=""></a-asset-item>

      <a-camera position="0 0 0" look-controls="enabled: false"></a-camera>
      <a-entity mindar-image-target="targetIndex: 0">
        <a-plane src="#card" position="0 0 0" height="0.552" width="1" rotation="0 0 0"></a-plane>
        <a-gltf-model rotation="0 0 0 " position="0 0 0.1" scale="0.005 0.005 0.005" src="#avatarModel" animation="property: position; to: 0 0.1 0.1; dur: 1000; easing: easeInOutQuad; loop: true; dir: alternate">

Target Images Compiler

You can compile your own target images right on the browser using this friendly Compiler tools. If you don't know what it is, go through the Quick Start guide


  1. Supports more augmented reality features, like Hand Tracking, Body Tracking and Plane Tracking

  2. Research on different state-of-the-arts algorithms to improve tracking accuracy and performance

  3. More educational references.


I personally don't come from a strong computer vision background, and I'm having a hard time improving the tracking accuracy. I could really use some help from computer vision expert. Please reach out and discuss.

Also welcome javascript experts to help with the non-engine part, like improving the APIs and so.

If you are graphics designer or 3D artists and can contribute to the visual. Even if you just use MindAR to develop some cool applications, please show us!

Whatever you can think of. It's an opensource web AR framework for everyone!

Development Guide

Directories explained

  1. /src folder contains majority of the source code
  2. /examples folder contains examples to test out during development

To create a production build

run > npm run build. the build will be generated in dist folder

For development

To develop threeJS version, run > npm run watch. This will observe the file changes in src folder and continuously build the artefacts in dist-dev.

To develop AFRAME version, you will need to run >npm run build-dev everytime you make changes. The --watch parameter currently failed to automatically generate mindar-XXX-aframe.js.

All the examples in the examples folder is configured to use this development build, so you can open those examples in browser to start debugging or development.

The examples should run in desktop browser and they are just html files, so it's easy to start development. However, because it requires camera access, so you need a webcam. Also, you need to run the html file with some localhost web server. Simply opening the files won't work.

For example, you can install this chrome plugin to start a local server:

You most likely would want to test on mobile device as well. In that case, it's better if you could setup your development environment to be able to share your localhost webserver to your mobile devices. If you have difficulties doing that, perhaps behind a firewall, then you could use something like ngrok ( to tunnel the request. But this is not an ideal solution, because the development build of MindAR is not small (>10Mb), and tunneling with free version of ngrok could be slow.

webgl backend

This library utilize tensorflowjs ( for webgl backend. Yes, tensorflow is a machine learning library, but we didn't use it for machine learning! :) Tensorflowjs has a very solid webgl engine which allows us to write general purpose GPU application (in this case, our AR application).

The core detection and tracking algorithm is written with custom operations in tensorflowjs. They are like shaders program. It might looks intimidating at first, but it's actually not that difficult to understand.


The computer vision idea is borrowed from artoolkit (i.e. Unfortunately, the library doesn't seems to be maintained anymore.

Face Tracking is based on mediapipe face mesh model (i.e.