Unmanned aerial vehicles (UAVs) are becoming essential tools for surveying and monitoring forest ecosystems. However, most forests are found on steep slopes, where capturing individual tree characteristics might be compromised by the difference in ground sampling distance (GSD) between slopes. Thus, we tested the performance of treetop detection using two algorithms on canopy height models (CHMs) obtained with a commercial UAV (Mavic 2 Pro) using the terrain awareness function (TAF). The area surveyed was on a steep slope covered predominantly by fir (Abies mariesii) trees, where the UAV was flown following (TAF) and not following the terrain (NTAF). Results showed that when the TAF was used, fir trees were clearly delimited, with lower branches clearly visible in the orthomosaic, regardless of the slope position. As a result, the dense point clouds (DPCs) were denser and more homogenously distributed along the slope when using TAF than when using NTAF. Two algorithms were applied for treetop detection: (connected components), and (morphological operators). (connected components) showed a 5% improvement in treetop detection accuracy when using TAF (86.55%), in comparison to NTAF (81.55%), at the minimum matching error of 1 m. In contrast, when using (morphological operators), treetop detection accuracy reached 76.23% when using TAF and 62.06% when using NTAF. Thus, for treetop detection alone, NTAF can be sufficient when using sophisticated algorithms. However, NTAF showed a higher number of repeated points, leading to an overestimation of detected treetop.