The presence of motion during the relatively long PET acquisitions is a very common problem, especially with awake animals, infants and patients with neurological disorders. External motion can be detected based on the optical tracking of markers placed on the skin of the patient, but it needs additional hardware and a somehow complex integration with the PET data. The possibility of motion detection directly from the acquired PET data would overcome these limitations. In this work, we propose the use of the centroid of lines of response to identify long motion free frames (more than 2.5 seconds). In these frames we identify in real-time the location of 18F markers placed on the head of the rat with the radiotracer labeled with 18F. We evaluated the performance of the proposed method in a preclinical PET/CT scanner with an awake rat injected with 600 μCi and four 18F sources attached in its head. After solid rigid motion compensation, we reconstruct an image that use 70% events of the acquisition, and the resolution is comparable with the motion-free frames.