Training-Free Open-Ended Object Detection and Segmentation via Attention as Prompts