# Can I use ARCore Image Detection and ARDK VPS together?

**URL:** <https://community.nianticspatial.com/t/can-i-use-arcore-image-detection-and-ardk-vps-together/3460>\
**Category:** I'm Stuck\
**Created:** [April 13, 2023, 1:53am UTC](https://community.nianticspatial.com/t/can-i-use-arcore-image-detection-and-ardk-vps-together/3460 "2023-04-13T01:53:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![olivia0901](https://avatars.discourse-cdn.com/v4/letter/o/57b2e6/32.png) [@olivia0901](https://community.nianticspatial.com/u/olivia0901)\
**Post date:** [April 13, 2023, 1:53am UTC](https://community.nianticspatial.com/t/can-i-use-arcore-image-detection-and-ardk-vps-together/3460/1 "2023-04-13T01:53:25Z")

</div>

- **Issue category** : Unity Example Package / Sample App aka ‘AR Voyage’ / ARDK Virtual Studio Tools / Developer Tools/ VPS

- **Device type & OS version** : Android

- **Host machine & OS version** : Windows

- **Issue Environment** : Unity Remote /On Device / Dev Portal

- **ARDK version** : 2.4.2

- **Unity version** : 2021.3.12f

Description of the issue:

I want to use VPS of Niantic Lightship and Image Detection of AR Core (maybe AR foundation?) together in one scene. Is is possible? ( I am not talking about Niantic - Image detection. )

I am asking this because when i install ar core through package manager in my unity project that already head ardk package installed, some error happened and i couldn’t build on my device. (Can’t remember which error happened because i didn’t capture the log.)  
And if it’s possible, i have second question. Is is possible to use AR Foundation Sample - Image Detection example scene in the project?  
I want to know briefly how ARDK & AR Foundation || AR Core works .

Thanks

---

<div class="post-metadata">

**Author:** ![Jesus\_Niantic](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@Jesus\_Niantic](https://community.nianticspatial.com/u/Jesus_Niantic)\
**Post date:** [April 13, 2023, 5:22pm UTC](https://community.nianticspatial.com/t/can-i-use-arcore-image-detection-and-ardk-vps-together/3460/2 "2023-04-13T17:22:50Z")

</div>

Hello Olivia,

Unfortunately, ARDK cannot be mixed with ARFoundation nor ARCore at the moment. When using ARDK, no other AR API can be in use. ARDK is built around ARCore and is a wrapper to many of its API calls and therefore cannot be used together with ARDK. ARFoundations can’t be used because it would cause conflicts with ARDK.

---

<div class="post-metadata">

**Author:** ![Merijn\_Kersten](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/merijn_kersten/32/1277_2.png) [@Merijn\_Kersten](https://community.nianticspatial.com/u/Merijn_Kersten)\
**Post date:** [April 14, 2023, 8:13pm UTC](https://community.nianticspatial.com/t/can-i-use-arcore-image-detection-and-ardk-vps-together/3460/3 "2023-04-14T20:13:19Z")

</div>

Hey @olivia0901 ,

There is this framework called NatML for Unity that i’ve been working with.  
I’m trying out a couple ways of feeding this predictor lightship data instead of the ARFoundation ones which is what it’s built on.  
I’ll let you know if i find any solution next week.

If you want to try it out yourself you’ll find it here: [Getting Started - Unity](https://docs.natml.ai/unity/prelims/getting-started)  
On natml hub you can find the predictors that are currently available: [https://hub.natml.ai/](https://hub.natml.ai/)

---

<div class="post-metadata">

**Author:** ![olivia0901](https://avatars.discourse-cdn.com/v4/letter/o/57b2e6/32.png) [@olivia0901](https://community.nianticspatial.com/u/olivia0901)\
**Post date:** [April 17, 2023, 1:10am UTC](https://community.nianticspatial.com/t/can-i-use-arcore-image-detection-and-ardk-vps-together/3460/4 "2023-04-17T01:10:36Z")

</div>

Thank you so muck Merjin!

---

<div class="post-metadata">

**Author:** ![Merijn\_Kersten](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/merijn_kersten/32/1277_2.png) [@Merijn\_Kersten](https://community.nianticspatial.com/u/Merijn_Kersten)\
**Post date:** [April 25, 2023, 11:55am UTC](https://community.nianticspatial.com/t/can-i-use-arcore-image-detection-and-ardk-vps-together/3460/5 "2023-04-25T11:55:46Z")

</div>

Hey @olivia0901 ,

It took some time to figure out but we’ve been able to pass the CPU/GPUTexture to a couple NatML predictors. Only thing that i didn’t get working yet is the depth textures.

Here is a sample of the movenet predictor being used to draw canvas elements at given joints during runtime, tested on iOS:

```auto
using System.Collections.Generic;
using NatML.Vision;
using Niantic.ARDK.Extensions;
using UnityEngine;

public class BodyTracking : MonoBehaviour
{
    public ARRenderingManager RenderingManager;
    public GameObject PoseDebugPrefab;
    public Transform TrackerParent;
    
    private MoveNetPredictor predictor;
    private List<GameObject> poseDebugs = new();
    private RenderTexture _renderTexture;

    private int _width;
    private int _height;

    private async void Awake() 
    {
        predictor = await MoveNetPredictor.Create();
        _width = Screen.width;
        _height = Screen.height;
    }

    private void Update()
    {
        // predictor initializes in async so wait for it to load
        if (predictor == null)
            return;

        // movenet is still 2D prediction but you could do ARDK depth-test at those positions to get a 3D location
        MoveNetPredictor.Pose pose = predictor.Predict(RenderingManager.CPUTexture);

        // Create canvas pose debug circles
        if (poseDebugs.Count == 0)
        {
            foreach (var position in pose)
                poseDebugs.Add(Instantiate(PoseDebugPrefab, TrackerParent));
        }

        // for each pose, vector x + y are positions, the z is the certainty/confidence
        for (var index = 0; index < pose.Count; index++)
        {
            var position = pose[index];
            poseDebugs[index].transform.position = new Vector2(_width * position.x, _height * position.y);
            poseDebugs[index].SetActive(position.z > .3f);
        }
    }
}

```

Alternatives i’ve tested are:  
**Barracuda** , which was too slow for our purposes  
**Google MediaPipe** ([GitHub - homuler/MediaPipeUnityPlugin: Unity plugin to run MediaPipe graphs](https://github.com/homuler/MediaPipeUnityPlugin)), which was perfect but we couldn’t get working in combination with Lighsthip due to conflicting Tensorflow frameworks on iOS.  
**ARKit** itself, this is not supported.  
**OpenCV** , which could be depending on my implementation but it was just too slow and performance heavy for what we were trying to do.

---

<div class="post-metadata">

**Author:** ![Maverick\_Niantic](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Maverick\_Niantic](https://community.nianticspatial.com/u/Maverick_Niantic)\
**Post date:** [March 5, 2026, 11:44pm UTC](https://community.nianticspatial.com/t/can-i-use-arcore-image-detection-and-ardk-vps-together/3460/6 "2026-03-05T23:44:52Z")

</div>

Age
