Add functions for untiling detections and correcting annotation coordinates
This pull request introduces two new functions:
untile_detections in src/utilities/detection_reassembly.py: This function takes a list of detections made on tiles and squashes them into a single list while correcting their locations on the main image. It considers horizontal and vertical overlap ratios between tiles for accurate positioning.
correct_annotation_coords in src/utilities/tiling.py: This function corrects annotation coordinates based on whether they are specified relative to a tile or the entire untiled image. It supports both bounding boxes and keypoints.
These functions are essential for reassembling detections made on tiled images and ensuring they accurately represent objects in the full image.
Correct_annotation_coords is a generalization of correct_bounding_box and correct_keypoint, and so those functions were replaced with calls to correct_annotation_coords.
Feature: Untiling
Add functions for untiling detections and correcting annotation coordinates
This pull request introduces two new functions:
untile_detections
insrc/utilities/detection_reassembly.py
: This function takes a list of detections made on tiles and squashes them into a single list while correcting their locations on the main image. It considers horizontal and vertical overlap ratios between tiles for accurate positioning.correct_annotation_coords
insrc/utilities/tiling.py
: This function corrects annotation coordinates based on whether they are specified relative to a tile or the entire untiled image. It supports both bounding boxes and keypoints.These functions are essential for reassembling detections made on tiled images and ensuring they accurately represent objects in the full image. Correct_annotation_coords is a generalization of
correct_bounding_box
andcorrect_keypoint
, and so those functions were replaced with calls to correct_annotation_coords.