Refactored the `clip_boxes` function for clarity by renaming arguments from `boxes_xyxy` and `frame_resolution_wh` to `xyxy` and `resolution_wh`, respectively. These change makes the function arguments more intuitive and improves code readability. The processing of detections in `supervision/annotators/core.py` has been updated to include clipping of detection boxes to the image bounds before processing. This prevents errors and ensures detections beyond the image dimensions are handled correctly. Adjustments were also made in the test cases and in `polygon_zone.py` to match the updated `clip_boxes` function. |
||
|---|---|---|
| .. | ||
| annotators | ||
| assets | ||
| classification | ||
| dataset | ||
| detection | ||
| draw | ||
| geometry | ||
| metrics | ||
| tracker | ||
| utils | ||
| __init__.py | ||