Query-based Mask Generation