Thank you for using the Microsoft Q&A forum.
I tried to repro your use case from my end. First created and trained a custom Product recognition model, based on the tutorial provided in the question. It was successful.
Regarding your next question about the CURL command, I followed the ProductRecognition_Create form and the ProductRecognition_Get form of the API testing Console to find out that, it is required to send a PUT request followed by a GET request in CURL, reason being that the PUT request creates a new run for the model, and the GET request retrieves the results of that run. When you send a PUT request, you specify the name of the run, and the API creates a new run with that name. Then, when you send a GET request, you specify the same run name, and the API returns the results of that run.
It seems, you were receiving a 404 error because you were only sending a GET request, but you had not created a run for the model yet. By sending a PUT request first to create a new run, and then sending a GET request to retrieve the results of that run, you should be able to successfully test your custom product recognition model.
The runname in the 1st CURL with PUT can be anything random, which you want the runname to be. Then use the same "run name" that you gave in the GET request as well.
Here's the repro
PUT
curl.exe -v -X PUT -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTIONKEY
" -H "Content-Type: application/json" "YOUR_ENDPOINT
/computervision/productrecognition/prdrecog1/runs/run22?api-version=2023-04-01-preview" -d "{ 'url':'https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/media/shelf/rectification.png' }"
Here I gave run22 as the "run name" param value. you can give anything. "prdrecog1" is my model name.
GET
curl.exe -v -X GET -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTIONKEY" -H "Content-Type: application/json" "YOUR_ENDPOINT/computervision/productrecognition/prdrecog1/runs/run22?api-version=2023-04-01-preview"
Here I used same run22 as the "run name" param value, that I gave in PUT.
GET Output:
I hope this helps. Thank you.
Please don't forget to click Accept Answer
and Yes
for was this answer helpful.