Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k 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 Answer

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...