BackgroundIn radiotherapy, real‐time tumor tracking can verify tumor position during beam delivery, guide the radiation beam to target the tumor, and reduce the chance of a geometric miss. Markerless kV x‐ray image‐based tumor tracking is challenging due to the low tumor visibility caused by tumor‐obscuring structures. Developing a new method to enhance tumor visibility for real‐time tumor tracking is essential.PurposeTo introduce a novel method for markerless kV image‐based tracking of lung tumors via deep learning‐based target decomposition.MethodsWe utilized a conditional Generative Adversarial Network (cGAN), known as Pix2Pix, to build a patient‐specific model and generate the synthetic decomposed target image (sDTI) to enhance tumor visibility on the real‐time kV projection images acquired by the onboard kV imager equipped on modern linear accelerators. We used 4DCT simulation images to generate the digitally reconstructed radiograph (DRR) and DTI image pairs for model training. We augmented the training dataset by randomly shifting the 4DCT in the superior‐inferior, anterior‐posterior, and left‐right directions during the DRR and DTI generation process. We performed real‐time 2D tumor tracking via template matching between the DTI generated from the CT simulation and the sDTI generated from the real‐time kV projection images. We validated the proposed method using nine patients’ datasets with implanted beacons near the tumor.ResultsThe sDTI can effectively improve the image contrast around the lung tumors on the kV projection images for the nine patients. With the beacon motion as ground truth, the tracking errors were on average 0.8 ± 0.7 mm in the superior‐inferior (SI) direction and 0.9 ± 0.8 mm in the in‐plane left‐right (IPLR) direction. The percentage of successful tracking, defined as a tracking error less than 2 mm in the SI direction, is 92.2% on the 4312 tested images. The patient‐specific model took approximately 12 h to train. During testing, it took approximately 35 ms to generate one sDTI, and 13 ms to perform the tumor tracking using template matching.ConclusionsOur method offers the potential solution for nearly real‐time markerless lung tumor tracking. It achieved a high level of accuracy and an impressive tracking rate. Further development of 3D lung tumor tracking is warranted.