CustomVisionPredictionClient reporting incorrect BoundingBox dimensions

Bob Crowley 0 Reputation points

I am using Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction 2.0.0 package to perform custom vision predictions. It succeeds, except the detected bounding boxes are reporting WAY too small, like fractions of a pixel in size. When I do a quick test of my model on it appears to work as intended but in my application I get bad results.User's image

 var predictionResultTask = customClient.DetectImageUrlAsync(VisionConfiguration.PredictionProject, VisionConfiguration.ObjDetectionModelName, imgUrl);

 var resultTask = imgClient.AnalyzeAsync(imageContent: imgUri, visualFeatures: VisualFeatures.Read | VisualFeatures.Tags);

 await Task.WhenAll(predictionResultTask, resultTask);

 var ocrResult = resultTask.Result.Value;
 var predictionResult = predictionResultTask.Result; // <-- this is the result I'm looking at

User's image

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.
197 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bob Crowley 0 Reputation points

    Those values are a percentage of the original image size so there is no actual problem. I'll leave this question here in case someone is as dumb as me.

    0 comments No comments