How to fix Error 404 Resource not Found in Custom Vision API

Pranith Saravanan 5 Reputation points
2023-08-11T17:44:52.8+00:00

I am trying to train an Azure Custom Vision model by following the instructions on this Learn page: Quickstart: Create an image classification project with the Custom Vision client library or REST API using Java.

When I finally try to run the Gradle build, I am getting the below error

Exception in thread "main" com.microsoft.azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException: Status code 404, {"error":{"code":"404","message": "Resource not found"}}

I am getting this error specifically in the following line:

Project project=createProject(trainClient);

The createProject function which I have taken from the Learn page I linked earlier is:

public static Project createProject(CustomVisionTrainingClient trainClient)
{    
	Trainings trainer=trainClient.trainings();    
	System.out.println("Creating Project");    
	Project project=trainer.createProject().withName("Moon-Phases-Trainer").execute();    
	return project;
}

The line that is causing an issue in specific in the function is

Project project=trainer.createProject().withName("Moon-Phases-Trainer").execute();

Please let me what is causing this error and how to resolve it.

Thank you

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.
249 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,895 questions
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.