1 of 36

AugPy:�Augmenting the Reality with Python

October, 2019

Srikar Mutnuri

XR Developer, TCS Interactive

@itsmutnuri

2 of 36

Central Idea

Augmented Reality is Computer Vision at its core

3 of 36

Outline

  • Augmented Reality (AR)
  • Where does Python help?
  • Demo
  • Future of AugPy?

4 of 36

Augmented Reality

5 of 36

AR: Defining Characteristics

  • Blending of the real with the imaginary
  • Interacting real-time with virtual content
  • Virtual objects are either fixed or have predictable movements

Source: Azuma, R.T (1997), A Survey of Augmented Reality Presence, 6(4), 355 - 385

Pokémon Go (Source: Niantic)

6 of 36

Doing proper AR in real world is chaotic…

Lots of varying parameters to handle:

  • Camera angle/perspective
  • Rotation
  • Scale
  • Lightning
  • Blur from motion or focusing
  • General image noise

Source: Blogpost by Andreas Jakl

7 of 36

The Marker Faced…

AR can be of two types:

Marker-less

(Source: Google ARCore docs)

Marker-based

(Source: Vuforia)

8 of 36

So what makes AR possible?

while(condition):

update tracking + environment data,

poll input for object placement/interactions

update placed virtual objects

9 of 36

Update understanding

AR requires tracking to really work well. Involves:

                  • Positional tracking: (x, y, z) coordinates
                  • Rotational tracking: roll, pitch & yaw - (r, p, y)

Known as Pose Estimation in XR speak.

A common coordinate system is important!

10 of 36

Update understanding

Shouldn’t there be some reference points to do all this?

YES!

Keypoints are the key here:

distinctive locations in images - corners, blobs or T-junctions.

Together, they describe features of the environment.

Properties:

  • Reliability a feature should be reliable always.
  • Invariance – same point in different views.

11 of 36

Update understanding

Some SLAM algorithms used to identify the key-points to track a feature reliably:

  • BRISK – Binary Robust Invariant Scalable Keypoints
  • SIFT – Scale Invariant Feature Transform
  • SURF – Speeded up robust features

12 of 36

Update understanding

FAST Algorithm, the basis of BRISK

For BRISK:

Keypoint detection:

At least 9 pixels should be brighter or darker than p

13 of 36

Update understanding

FAST Algorithm, the basis of BRISK

For BRISK:

Keypoint detection:

At least 9 pixels should be brighter or darker than p

Keypoint description:

Create binary string with 512 bits, with comparison results

(already handled for us by OpenCV)

14 of 36

Update understanding

Reference Image

15 of 36

Update understanding

Processing…

16 of 36

Update understanding

Tracking Points, aka Trackables

17 of 36

Another view

LIDAR point cloud (source: LizardTech )

18 of 36

Update understanding

  • Error correction is an important step in maintaining the pose.
  • Removal of outliers helps in pose refinement
  • Use remaining keypoints to calculate the pose

Source: Bruce Thomas, COMP4010, University of South Australia

19 of 36

So what makes AR possible?

while(condition):

update tracking + environment data,

poll input for object placement/interactions

perform error correction

update placed virtual objects

20 of 36

Current AR libraries…

Many libraries exist for Augmented Reality:

  • ARCore (Google)
  • ARKit (Apple)
  • ARFoundation (Unity)
  • Vuforia (PTC/Qualcomm)
  • 6D.ai
  • Wikitude
  • ViewAR
  • AR.js

21 of 36

And so are the problems!

An interesting paper reference:

Perceptual issues in augmented reality revisited” by E. Kruijff, J. E. Swan II, and S. Feiner, IEEE International Symposium on Mixed and Augmented Reality, Oct 2010.

22 of 36

A ray of hope…

The recent release of ARKit by Apple is a step closer towards solving these problems

Hon’ble mention: 6D.ai

Image Source: Apple Developers

23 of 36

Problems

Some important ones:

  • Position Estimation – Process data from sensors (Inertial Measurement Unit, IMUs)
  • Object Segmentation – Classify/Identify each object in the field of view
  • Depth Estimation – estimate the depth data from camera image

24 of 36

Solution?

This is where Python can be helpful!

25 of 36

Pose Estimation

Image Source: Microsoft.

Sensors throw lots of data.

Process it well to understand the position better!

26 of 36

Object Segmentation

Image source: Niantic

Segregate objects to interact individually

27 of 36

Depth Estimation

Source: Google AI Blog

Understand depth from a given image

28 of 36

Demo

29 of 36

Future of AugPy?

30 of 36

Up next?

We have some basics in place, need to build an ecosystem

31 of 36

To-Do

  • Render complex models in AR (pymesh, etc.)
  • Marker-less AR
  • De-noising sensor data – HMD/Mobile
  • Better environmental understanding
  • Others?

32 of 36

Extensions

ML on Edge – make lightweight models

Deploy to AR headsets (HoloLens)

Federated Learning

???

33 of 36

Some references

34 of 36

References:

35 of 36

References:

36 of 36

Thank you

Contributions/Suggestions welcome!

Feel free to reach out: @itsmutnuri