Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

microsoft cognitive - How to fix Azure Custom Vision Error "We are looking into it"? After creating a project

I got the following error:

image

The Error message doesn't really tell me anything, but I also don't see my usage which is a problem. Has anybody encountered this?

Edit:

Here is how I create my Project (If it doesnt' exist). I basically just copied everything from the documentation.

And after the project is created and I go to the website the error shows up.

public partial class Validation : Page
{
    private const string endpoint = "https://dcd-prediction.cognitiveservices.azure.com/";the portal
    private string trainingKey = ConfigurationManager.AppSettings["trainingKey"];
    private string predictionKey = ConfigurationManager.AppSettings["predictionkey"];

    private List<Tag> tags = new List<Tag>();

    private static MemoryStream testImage;
    private Iteration iteration;
    private string publishedModelName;

    private Guid ProjectID = Guid.Parse(ConfigurationManager.AppSettings["projectKey"]);

    Project project = null;
    CustomVisionTrainingClient TrainingApi = null;
    CustomVisionPredictionClient predictionApi = null;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.User.IsInRole("Admin"))
            Response.Redirect("/");

        TrainingApi = AuthenticateTraining(endpoint, trainingKey);

        project = GetProject(TrainingApi);
        UpdateTags(TrainingApi, project);
        if (TrainingApi is null || predictionApi is null || project is null)
        {
            alert("");
        }

    }


    private Project GetProject(CustomVisionTrainingClient trainingApi)
    {
        try
        {
            return trainingApi.GetProject(ProjectID);
        }
        catch
        {
            return trainingApi.CreateProject("DCD");
        }
    }

    private CustomVisionTrainingClient AuthenticateTraining(string endpoint, string trainingKey)
    {
        // Create the Api, passing in the training key
        CustomVisionTrainingClient trainingApi = new CustomVisionTrainingClient(new Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.ApiKeyServiceClientCredentials(trainingKey))
        {
            Endpoint = endpoint
        };
        return trainingApi;
    }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...