Skip to content

Blog

Release v0.7.3

This release makes a big step in hand detection and tracking adding many tools and plugins. Hand tracking can be used to the full extent including alignment of hand armature, more advanced and precise model of a hand for rings virtual try-on, improvement of wrist tracking for watches and bracelets VTO, and more.

HandAlignPlugin aligns node’s armature and the hand pose estimated by HandProcessor. Basically, it evaluates positions, rotations, and scales of armature bones based on detected keypoints, then iteratively applies these transforms to bones following skeletal hierarchy. Plugin supports rigs compatible with Clo3D and Marvelous Designer avatars. This is the most common standard of rigs in apparel modeling software. Controlled scene node must contain an armature among its children nodes. Bones of armature must follow Clo3D naming convention and hierarchy. Development of the plugin is not completely finished, especially thumb alignment is not as good as we would like it to be. But it can already be used in cases where precise alignment of thumb is not a hard requirement.

Detection of handedness is now more robust and less noisy, it won’t change between images of a video stream. In all alignment algorithms and plugins we account for handedness to evaluate proper rotation quaternions for left and right hands.

Within hand detection we introduce more precise detection of fingers approximating every phalanx by a cylinder. Morphological and statistical analyzes of phalanxes is performed as post-processing stage of hand pose detection. During this stage phalanx edges are detected with sub-pixel accuracy taking into account their occlusions, initial statistical approximation is iteratively refined to minimize error measure. HandProcessor outputs both pixel and metric parametrizations of phalanx cylinders. Output data is filtered using the same approach we apply to reduce temporal noise in detected keypoints, hand detection and phalanx approximation are synchronized. Estimation of phalanxes can be used as approximation of a detected hand in a scene if we render cylinders in place of phalanxes and spheres in place of their joints. Precise detection of phalanxes is crucial for virtual try-on of rings and gloves.

Approximation of phalanxes is enabled by default. In the future, we will make it optional to improve performance in cases where precise approximation isn’t needed. Phalanx detections are output by HandProcessor within HandResult object as phalanxes field. For every phalanx PhalanxDetection defines metric 3D coordinates of its center and two edge points located at the same section as the center.

3D model approximating hand’s fingers by cylinders and spheres can be build using buildGeometry() static method of HandFitPlugin. HandFitPlugin in turn fits HandGeometry into a hand pose and phalanxes estimated by HandProcessor. It evaluates positions, rotations, and scales of phalanxes based on detected keypoints, and then applies these transforms to sub-components of a hand geometry.

HandFitPlugin can be combined with HandAlignPlugin in scenarios where the former approximates finger with higher precision and later is used for coarser approximation of a palm (rest of a hand). This combination is efficient to build and control hand occluder in rings virtual try-on applications where high precision approximation of fingers is required.

RingFitPlugin is a final building block of rings virtual try-on application. This plugin fits a ring object on a pose estimated by HandProcessor. Using tracking data RingFitPlugin estimates the transformation of a ring 3D object fitting it on the selected finger. Plugin supports rings having unit inner diameter and lying in xz plane, with y axis being a center of the ring’s inner circle and x axis pointing in the ring’s head direction. Offset of a ring from the world’s origin along y axis defines how far it will be from the phalanx start. RingFitPlugin is compatible and intended to be used in combination with HandFitPlugin.

We completely reworked wrist detection algorithms. New approach is significantly faster and provide more stable and accurate results. GPGPU shaders are significantly re-factored to reduce usage of vector registers and optimize computational flow and memory access pattern.

Wrist detection has been made optional feature of hand tracking to improve performance in cases where wrist tracking is not required. Now it needs to be explicitly enabled by setting wrist parameter to true when initializing a HandProcessor.

ClothTwinPlugin is an equivalent of PoseTwinPlugin but for the newer Clo3D / Marvelous Designer armature. Engeenee SDK supports Clo3D armature as the main rig for virtual try-on applications and improvements of fitting algorithms are developed for this skeletal structure first. For a long time twin functionality was available only for legacy armatures compatible with Mixamo / Ready Player Me. Now visual effects utilising user twins are available with models rigged against more advanced types of armatures. This will simplify design of 3D models and allow to use all recent improvements that are primary developed for the newer armature types. Relative pose of a twin can be adjusted using corresponding methods of the plugin on runtime allowing smooth transitional animations

DelayPlugin is a factory function adding delay to any other plugin. In delayed plugin update() method is called with detection results from one of the previous iterations of a tracking engine. This way we achieve effect of object following its controller with some delay. Delay may be used in combination with various twin plugins to achieve less artificial behaviour of twins that will repeat user movements without absolute synchronization in time and thus look more natural.

VideoMergePlugin is a simple ShaderPlugin that merges input video stream with the background texture. Merge is done by linear interpolation and interpolation weight (alpha) is a tunable input parameter that can be changed on runtime for smooth transition between real and virtual backgrounds.

BgReplacePlugin and VideoMergePlugin are extended with setMirror(boolean) method that allows to mirror virtual background for example when Renderer is in mirror mode. One needs to manually pass proper mirror parameter from a renderer to attached plugins.

This release addresses feature gap between babylon.js and three.js renderers. The list of updates and features ported to three.js renderer:

  • OccluderMaterial similar to the one used in babylon.js renderers.
  • Utility classes and generics for HandResult.
  • Armature utilities to make code base cleaner.
  • HandAlignPlugin.
  • HandFitPlugin
  • Code is refactored to use typed imports reducing size of the bundle.
  • Version of three.js is updated to the latest at the moment.

RefractionMaterial utilizes real-time ray tracing to calculate refractions of light inside volume of a mesh. It can be used for realistic rendering of diamonds and other gems. Material parameters allow to fine-tune ray tracing mechanics and optimize for quality-performance trade offs. Environment texture is used as a spherical source of light refracting inside the mesh, one can use dynamic texture to reflect surrounding objects of the scene. Other post-processing techniques can be applied on top of initial render to achieve even better quality of gems visualization. Currently RefractionMaterial is available only in three.js renderer; we are planning to implement babylon.js version in the future.

We’ve disabled rescaling of limbs by default. Previously to perfectly fit arms and legs into detected keypoints we rescaled them to align their lengths the way that end of a bone matches the detected joint coordinate. While such approach indeed provides perfect alignment of limb armature, as a side effect arms and legs may scale unnaturally. For example upper arm may become thinner than lower arm that is very noticeable near an elbow. Disabling limbs rescaling makes relative proportions of body parts more natural. Previous limbs rescaling behaviour may be enabled back setting scaleLimbs property of PoseTuneParams.

Additionally, drifting scale error within hand alignment algorithms has been resolved making alignment of hand rig more precise.

  • We’ve added in-place operations to the internal linear algebra library. Their usage in certain algorithms allows to improve performance and use less memory.
  • Trackers use more advanced image pre-processing to increase quality of detection.
  • We’ve compressed binaries of all neural networks, that improves loading and initialization times of virtual try-on applications.
  • Internal dependency on numeric packaged replaced with svd-js.
  • Optimization of imports to reduce bundle size.
  • @geenee/bodyrenderers-three uses the latest version of Three.js.
  • Code of all SDK examples is updated, deprecated plugins are replaced.
  • UI of SDK examples is updated according to the new default style.
  • ShaderProgram supports more types of uniforms, namely integer uniforms are now supported.
  • ResponsiveCanvas is extended with setter and getter for mirror mode that allows to change it on runtime.
  • New ImageCapture video grabber allows to use static images as video sources. It can be used for debug or fine-tune purposes applying virtual try-on or AR effect on a still target.
  • We are replacing Webpack with Vite. Vite.js provides much faster bundling times and much easier to configure. All SDK examples are ported to vite.js.

Release v0.7.1

New HandAlignPlugin is a universal plugin aligning node’s armature and the hand pose estimated by HandProcessor. Plugin supports rigs compatible with Clo3D and Marvelous Designer avatars. This is the most common standard of rigs in cloth/apparel modeling software. At the moment the plugin is in “Work in Progress” state, we are optimizing alignment algorithms to provide more natural fitting of 3D models.

We introduce the new shader plugin replacing background region of an image BgReplacePlugin. Evaluated segmentation mask defines image foreground that stays untouched. Foreground-background classification is based on two thresholds defining uncertainty interval. Probability above foreground threshold classifies pixel as foreground, below background threshold as background. FG pixels are kept untouched, BG pixels are replaced with corresponding pixels from the background texture. For pixels within uncertainty region weighted interpolation between image and background textures takes place. Weight is evaluated by scaling uncertainty interval and probability to [0..1]. BgReplacePlugin has universal API, it allocates and provides access to a texture which content will be used as background substitution, this texture can be loaded from any source like canvas, image, or video.

OccluderPlugin was in deprecated state for a while and has been removed in this release. Please, use OccluderMaterial or OccluderMaskPlugin directly to transform scene meshes into occluders, this is a more flexible and universal approach to control rendering of 3D objects in a scene.

Related PoseOutfitPlugin has also been removed. It was making child meshes of the attached scene node an occluders based on their names. The same logic can be implemented externally. One can use PoseAlignPlugin to align node’s rig with the detected pose and manually make required children meshes an occluders using OccluderMaterial or OccluderMaskMaterial provided by OccluderMaskPlugin.

Common utility methods used within armature alignment algorithms are moved to PoseUtils namespace within @geenee/bodyrenderers-babylon package to be available for all plugins fitting rigs into detected poses. This allows to share implementation and reuse the same API across plugins providing more robust code base.

Other notable minor changes are:

  • Performance optimization of partial body patching.
  • Changes in body pose alignment are adopted in PoseTwingPlugin.
  • @geenee/bodyrenderers-babylon uses the latest version of Babylon.js.

Release v0.7.0

Segmentation masks associated with tracked objects (face, head, body) now have the same BodyMask type and added to an object as mask field when segmentation is enabled for a processor/engine. Unification of mask type within tracked objects structure allows plugins that use segmentation mask to be compatible with any types of tracking. Most of mask plugins are now compatible with the SegmentationResult union type, so they can be used within face, body and hand based virtual try-ons.

Pipeline of segmentation masks processing was completely restructured to provide the best performance and more flexibility when using masks in rendering or video processing. All plugins processing or utilizing a mask now rely on the fact that it should be pre-uploaded to a texture. MaskUploadPlugin uploads segmentation mask to an image texture that can be reused by plugins next in the rendering pipeline. Uploaded mask is added to the corresponding tracked Pose, Face, or Mask as maskTex field of type BodyMaskTexture.

Next plugins update or use the current mask texture associated with a tracked object. This allows to apply chains of plugins post-processing the segmentation mask. For example, before doing background blur we can apply erosion operation on the mask to remove a couple of pixels on foreground boarders and smooth operator to remove sharp edges. This is a quite powerful approach allowing to combine atomic operations on a segmentation mask and fine-tune it for a particular use case or type of virtual try-on. We introduce a set of plugins that process a mask.

We introduce a set of plugins for mask post-processing:

  • MaskSmoothPlugin performs blurring of a segmentation mask to smooth sharp edges or propagate masked region outwards and inwards.
  • MaskDilationPlugin performs the dilation operation on a segmentation mask adding pixels to the boundaries of masked objects.
  • MaskErosionPlugin performs the erosion operation on a segmentation mask removing pixels on the boundaries of masked objects.
  • MaskMorphPlugin performs a morphological operation on a segmentation mask combining dilation and erosion in one plugin.

Following the principle of plugin chaining, now plugins update and have access to the same segmentation mask associated with a tracked object. This makes high resolution versions of plugins obsolete. BodyPatchHDPlugin, BodypartPatchHDPlugin, and OccluderMaskHDPlugin are removed from the Engeenee SDK as redundant. BodyPatchPlugin, BodypartPatchPlugin, and OccluderMaskPlugin become compatible with segmentation masks of any resolution uploaded to a texture.

While mask plugins automatically reconfigure themselves to the resolution of a segmentation mask their constructors have mask size parameter. It is recommended, though not required, to set it to the size that mask will have at the stage where the plugin will be attached to a renderer. This will allow to avoid unnecessary reconfiguration on runtime after renderer is initialized.

More information can be found here.

Mask upscaling was updated for the new pipeline and now works as other mask plugins updating mask texture embedded into tracked objects by mask uploader. BodyMaskHDPlugin was renamed to MaskUpscalePlugin.

Performance and accuracy of MaskUpscalePlugin was significantly improved. Additionally, now it’s possible to choose number of x2 upscale levels and thus resolution of output mask that can help to fine-tune between performance and accuracy.

Temporal filtering of segmentation masks provides for more stable results with less noise and smoother changes of a mask over time. Yet temporal filter doesn’t introduce any delay and reacts to changes immediately. The main goal of temporal filtering is to resolve ambiguity in regions that are hard to robustly classify as foreground. It’s available for all processors that output segmentation masks, namely PoseProcessor, FaceProcessor, and MaskProcessor. We’ve developed blazingly fast implementation that has minimal impact on performance and at the same time significantly increases accuracy. Temporal mask filtering can be enabled by providing { smooth: true } as mask parameter of processor settings when calling Engine’s init().

In this release we introduce resizable neural networks for body segmentation. Resolution of evaluated segmentation masks can be adjusted, for a particular use case one can choose between speed and accuracy. A lower resolution mask can be evaluated much faster, while higher resolution provides higher density of mask pixels for a region of interest. Smart upscaling of segmentation masks allows to achieve good segmentation results even when mask size is reduced.

Another important improvement is that trackers adjust size of segmentation mask according to aspect ratio of input video. When mask is evaluated for the whole image, size of required padding is significantly reduced. This improves both, accuracy of segmentation and density of mask pixels ratio to image pixels.

For face tracking it’s possible to choose the size of the segmentation mask by setting maskSize parameter. There are two modes of selecting region of segmentation in face tracker, first is to do segmentation for the whole image that is useful for selfie-like use cases, second - for an extended bounding box of the detected face, this option may work better when face tracking is used in full-body experiences on AR mirrors. One may choose between modes setting maskExt processor parameter.

  • BgBlurPlugin blurs background region of an image.
  • BodyPatchPlugin patches (inpaints / erases) foreground region of an image.
  • BodypartPatchPlugin conditionally patches (inpaints / erases) foreground regions of an image that are closer to virtual added objects than to the body.

All plugins that classify pixels as foreground or background are parametrized by foreground threshold.

  • Performance of BodypartPatchPlugin has been significantly improved.
  • Adjustable radius of patching in BodyPatchPlugin and BodypartPatchPlugin.
  • ShaderProgram supports changing uniforms on runtime using setUniform(). Previously it might be done only in constructor of process().
  • Support of vector uniforms.
  • ShaderProgram may output a grayscale image.
  • Rename BlurMaskPlugin -> BgBlurPlugin.
  • Optimization of WASM modules initialization.

Welcome

Hello and welcome to the Engeenee SDK!

At Geenee, we’re on a mission to make AR more accessible and easier to create than ever before. In-line with that vision, Engeenee, our full-body & face tracking SDK, is available free of charge for developers and creators building non-commercial WebAR projects.

Geenee remains the only WebAR technology to power full-body tracking directly from a web browser. Geenee AR body tracking is accessible on any connected device and there is no need to download an app in order to experience. Popular applications for body tracking include virtual try-on, gesture-controlled UI, and digital dance partners that mimic your body movements.

Our WebAR SDK is highly flexible and can be used with any rendering engine or UI framework. Additionally, it’s extensible and includes a number of useful plugins providing out-of-the-box solutions for many use cases. Simple but powerful, our SDK enables the creation of immersive WebAR experiences within minutes.

Previously, the SDK was only available to agency & brand partners for commercial use, and had to be accessed manually. Now the SDK is available for everyone. Anyone interested in creating a project can sign up for a free Geenee AR account, generate a token, and instantly start creating.

Access tokens are generated on a per-project basis and you can manage all of your projects in one place, directly from the Geenee WebAR Builder dashboard. Once you have your token, you can check out our documentation page here to get started.

This video shows how to access the SDK and start building.