Help understanding why I'm getting "IterationNotFound" from Custom Vision Object detection.

Sean Mendicino 1 Reputation point
2022-08-01T22:10:47.84+00:00

Hello, I am using the Custom Vision resource for a Unity project involving Object Detection. When I send the UnityWebRequest the Debug Log reports that the value of the downloadHandler.text is:

{"code":"NotFoundIteration","message":"Invalid iteration"}
UnityEngine.Debug:Log (object)
APIscript/<OnResponse>d__6:MoveNext () (at Assets/Scripts/APIscript.cs:65)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)

Can someone please explain what is going on here? What should I be looking at to diagnose the problem? Do I need to set a request header to specify the Iteration ID? How would I do that? SetRequestHeader("Iteration-ID","ID");?

Azure AI Custom Vision
Azure AI Custom Vision
An Azure artificial intelligence service and end-to-end platform for applying computer vision to specific domains.
209 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 41,861 Reputation points Microsoft Employee
    2022-08-02T12:18:28.3+00:00

    @Sean Mendicino I have not used unity before but from custom vision perspective the iteration id is part of the prediction URL that you can copy from the custom vision portal. The API does not expect a header with the iteration id. The header values that are required are Prediction-Key and Content-Type. The details of the endpoint are also available from the predictions tab of your project after you publish an iteration, and a prediction URL is generated.

    For example: The below screen from my custom vision project displays the prediction endpoint with the iteration id or name as part of URL and the only headers required are Prediction-Key and Content-Type. I think in your case setting the endpoint might be incorrect or an iteration is not published yet for the API to find it.

    227271-image.png

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    0 comments No comments