Leveraging pretrained transformers for efficient segmentation and lesion detection in cone-beam computed tomography scans