I need to know how can I use the confidence array (which for some reason has negative values on it) and the boundingBox to produce a segmentation mask/contour. I wrote an Android app that uses Chaquopy and Flutter (and its YOLO plug-in) to run a YOLOv8 segmentation model. It outputs the following: className confidence (the confidence on the object detection and classification) boundingBox (the boundingBox of the object in left-right-top-bottom format) mask (a 160x160 array which I believe is the confidence matrix; however, it has negative values, e.g. -0.656, which I find really weird). I am able to send these values to a Python script via Chaquopy for processing along with the original image. However, I am lost as to what to do next. How can I take these data and make a mask and a contour similar to what results[0].masks.xy outputs when using the ultralytics library in pure Python. Continue reading...