When using Platform deployment, intermittently, returned predictions contain false positives

Hi,

I am using the Platform Deployment of a model that I have created.

(Model is custom trained based on Yolo26s-seg 8.4.163)

Intermittently, I have found that the Endpoint returns a false positive prediction.

When I check the submitted image, the positive class is not there.

I then checked the monitoring page for the Endpoint to check latest results of the saved images of what was submitted to the Endpoint for prediction.

None of images showed that a prediction was found. (correct)

Investigation:

  1. When I use the platform to to manually “drop” the image into the Endpoint to run the prediction, correctly, no prediction is found.
  2. I have used same configuration (Confidence, IOU and Image size) in both cases.
  3. When I rerun the prediction via the Endpoint, I get a false positive again.

Questions:

Should I expect the same results when using the Endpoint and manually dropping images?

Should I expect that the predictions in the saved images submitted to Endpoint be the same as the results returned from the Endpoint?

Thanks,

Steve

Hello.

Can you provide the code you used to run the prediction?


 var client = new RestClient("https://predict-6ab663062f703b3a47ad0790-dproatj77a-km.a.run.app");
 var request = new RestRequest("", Method.Post);
 request.AddHeader("Accept", "application/json");
 request.AddHeader("Content-Type", "multipart/form-data");
 request.AddHeader("authorization", "################");
 request.AddHeader("Content-Type", "multipart/form-data");
 request.AddFile("file", FileName, "image/png");
 request.AddParameter("conf", "0.15");
 request.AddParameter("iou", "0.70");
 request.AddParameter("imgsz", "640");
                   
 var response = await client.ExecuteAsync(request);
 GetPrediction1 myDeserializedClass = JsonConvert.DeserializeObject<GetPrediction1>(response.Content);

As I am new to Yolo, I have a question please.

With regards to the parameter ‘imgsz’ does the actual image that I supply to the Endpoint have to be 640, or does the Endpoint resize it?

This is because I have found a difference in the confidence values when I submit the image via the endpoint vs when I “drop the image” on the endpoint.

Maybe, when I “drop” the image on the endpoint, the image is first resized?

But, this does not explain when I get a positive prediction, but the monitoring page of the endpoint shows the image without a prediction found.

Thanks for the code, Steve. Your image does not have to be 640 × 640. imgsz=640 sets the inference input size; the model’s preprocessing handles images of other dimensions. There is one important difference between your two tests: the deployment’s browser Predict tab resizes an image before uploading it, while your C# request uploads the original file. That can change confidence scores, particularly for a detection near your conf=0.15 threshold. The Platform inference documentation describes that browser-side resize. For a closer comparison, send the exact same resized image through both routes to the same deployment with the same settings, then compare their raw JSON responses.

The Monitoring gallery is not a record of every response: it captures examples on a best-effort basis, at most one per second. So a gallery image with no overlay does not, by itself, establish that it corresponds to the request that returned a positive result. If you can match a particular monitored example to a particular API response and they disagree, that warrants investigation. The Monitoring documentation explains the capture limits.

One thing to check in your snippet: the documented endpoint path ends in /predict, whereas the URL shown does not. Please confirm the actual URL being called, remove the duplicate Content-Type header and let RestSharp set the multipart boundary, and log the HTTP status and raw response.Content before deserializing it. If the discrepancy persists, please share a reproducible image, both raw responses, the request times, and the Ultralytics version reported in the responses—with your API key removed—after checking on the latest available version.