Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionException: Assertion failure. Values are not equal. Expected: 3 == 4 #21

Open
AhmadFadlallah opened this issue Nov 29, 2020 · 7 comments

Comments

@AhmadFadlallah
Copy link

AhmadFadlallah commented Nov 29, 2020

Hello, thanks for providing the community with such an awesome work.
After following every step in the documentation, and try to run the project, I get the following error:

AssertionException: Assertion failure. Values are not equal.
Expected: 3 == 4
UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) (at <480508088aee40cab70818ff164a29d5>:0)
UnityEngine.Assertions.Assert.AreEqual[T] (T expected, T actual, System.String message, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <480508088aee40cab70818ff164a29d5>:0)
UnityEngine.Assertions.Assert.AreEqual[T] (T expected, T actual, System.String message) (at <480508088aee40cab70818ff164a29d5>:0)
UnityEngine.Assertions.Assert.AreEqual (System.Int32 expected, System.Int32 actual) (at <480508088aee40cab70818ff164a29d5>:0)
Unity.Barracuda.PrecompiledComputeOps.Conv2D (Unity.Barracuda.Tensor X, Unity.Barracuda.Tensor K, Unity.Barracuda.Tensor B, System.Int32[] stride, System.Int32[] pad, Unity.Barracuda.Layer+FusedActivation fusedActivation) (at Library/PackageCache/[email protected]/Barracuda/Runtime/Core/Backends/BarracudaPrecompiledCompute.cs:625)
Unity.Barracuda.StatsOps.Unity.Barracuda.IOps.Conv2D (Unity.Barracuda.Tensor X, Unity.Barracuda.Tensor K, Unity.Barracuda.Tensor B, System.Int32[] stride, System.Int32[] pad, Unity.Barracuda.Layer+FusedActivation fusedActivation) (at Library/PackageCache/[email protected]/Barracuda/Runtime/Core/Backends/StatsOps.cs:69)
Unity.Barracuda.GenericWorker+d__29.MoveNext () (at Library/PackageCache/[email protected]/Barracuda/Runtime/Core/Backends/GenericWorker.cs:211)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <480508088aee40cab70818ff164a29d5>:0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
VNectBarracudaRunner:UpdateVNectModel() (at Assets/Scripts/VNectBarracudaRunner.cs:242)
VNectBarracudaRunner:Update() (at Assets/Scripts/VNectBarracudaRunner.cs:173)

@alezuky
Copy link

alezuky commented Dec 1, 2020

Hi my friend. I think we just got a solution for this problem. Try to see the last comment at this issue: #15

@godspeed1208
Copy link

Hi did you figure out how to fix this? i saw that #15 post but don't understand anything as i'm totally new to this and don't even know where those things or files are . my avatar is not moving but the video is working, thanks in advance

@Tsunehiko511
Copy link

VNectBarracudaRunner.csファイルの

    private IEnumerator WaitLoad()
    {
        inputs[inputName_1] = new Tensor(InitImg, 3);
        inputs[inputName_2] = new Tensor(InitImg, 3);
        inputs[inputName_3] = new Tensor(InitImg, 3);

    private void UpdateVNectModel()
    {
        input = new Tensor(videoCapture.MainTexture, 3);
        if (inputs[inputName_1] == null)
        {
            inputs[inputName_1] = input;
            inputs[inputName_2] = new Tensor(videoCapture.MainTexture, 3);
            inputs[inputName_3] = new Tensor(videoCapture.MainTexture, 3);
        }
        else

@bjr3ady
Copy link

bjr3ady commented Apr 13, 2021

VNectBarracudaRunner.csファイルの

    private IEnumerator WaitLoad()
    {
        inputs[inputName_1] = new Tensor(InitImg, 3);
        inputs[inputName_2] = new Tensor(InitImg, 3);
        inputs[inputName_3] = new Tensor(InitImg, 3);
    private void UpdateVNectModel()
    {
        input = new Tensor(videoCapture.MainTexture, 3);
        if (inputs[inputName_1] == null)
        {
            inputs[inputName_1] = input;
            inputs[inputName_2] = new Tensor(videoCapture.MainTexture, 3);
            inputs[inputName_3] = new Tensor(videoCapture.MainTexture, 3);
        }
        else

Tried this but no luck for me on MacOS 11.2.3 with Intel Iris Plus 640.

@ghost
Copy link

ghost commented Sep 13, 2021

any updates about how to sort it out on mac ? the same the avatar is not animated

@godspeed1208
Copy link

godspeed1208 commented Sep 13, 2021 via email

@ryanscottmurphy
Copy link

If you've tried the above fix and you're still failing to run on MacOS you may find a warning that says that it's switching from an unsupported Graphics format.

Change VideoCapture.cs Line 114 from:
MainTexture = new RenderTexture(bgWidth, bgHeight, 0, RenderTextureFormat.RGB565, RenderTextureReadWrite.sRGB)
to
MainTexture = new RenderTexture(bgWidth, bgHeight, 0, GraphicsFormat.B8G8R8A8_UNorm)
You may also need to add the following using statement:
using UnityEngine.Experimental.Rendering;

You may want to experiment with other GraphicsFormat's when initializing the RenderTexture depending on what's supported on your platform, but this worked enough for my needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants