AbstractBackgroundIntensity‐Modulated Radiation Therapy (IMRT) has been the standard of care for many types of tumors. However, treatment planning for IMRT is a time‐consuming and labor‐intensive process.PurposeTo alleviate this tedious planning process, a novel deep learning based dose prediction algorithm (TrDosePred) was developed for head and neck cancers.MethodsThe proposed TrDosePred, which generated the dose distribution from a contoured CT image, was a U‐shape network constructed with a convolutional patch embedding and several local self‐attention based transformers. Data augmentation and ensemble approach were used for further improvement. It was trained based on the dataset from Open Knowledge‐Based Planning Challenge (OpenKBP). The performance of TrDosePred was evaluated with two mean absolute error (MAE) based scores utilized by OpenKBP challenge (i.e., Dose score and DVH score) and compared to the top three approaches of the challenge. In addition, several state‐of‐the‐art methods were implemented and compared to TrDosePred.ResultsThe TrDosePred ensemble achieved the dose score of 2.426 Gy and the DVH score of 1.592 Gy on the test dataset, ranking at 3rd and 9th respectively in the leaderboard on CodaLab as of writing. In terms of DVH metrics, on average, the relative MAE against the clinical plans was 2.25% for targets and 2.17% for organs at risk.ConclusionsA transformer‐based framework TrDosePred was developed for dose prediction. The results showed a comparable or superior performance as compared to the previous state‐of‐the‐art approaches, demonstrating the potential of transformer to boost the treatment planning procedures.