This small request adds some bug fixes to the inference and patching support that was expanded on previously.
When refactoring the auto-patching for object detection, a mistake was made in refactoring the logic for converting label boxes from image coordinates to patch coordinates; values that were supposed to be the patch centre in image coordinates were instead just half the patch's width and height. This resulted in converted labels being recorded as far outside the bounds of a patch (ex. a bottom right corners in the thousands for a 448 x 448 patch). This was fixed and some of the helper function's redundant arguments were removed.
Performing inference with object detection had a lingering dependence on the exact batch size from before the great Dataset refactoring, causing a crash when the last inference batch ended up being smaller than the defined batch size. Since the crash happened when performing a resize, replacing batch size references with -1 fixed this.
Object detection inference would hang when a debugging session used an overlap IOU threshold of 1 for the YOLO prediction filtering. Good old floating point precision meant that a prediction would sometimes have a IOU with itself of slightly less than 1, preventing the existing logic from removing that box from further consideration. Doing that removal explicitly fixed this.
While fixing the previously broken patching inference for semantic segmentation, rows and columns were mixed up in one place, resulting in a crash when trying to stitch rows back together. The respective loops were fixed and variables were renamed to make their contents clearer.
Inference and training w/ auto-patching for semantic segmentation and object detection have been tested and work again, and the rest of the tests still pass.
This small request adds some bug fixes to the inference and patching support that was expanded on previously.
Inference and training w/ auto-patching for semantic segmentation and object detection have been tested and work again, and the rest of the tests still pass.