Autonomous drone racing competitions serve as a testing ground for enhancing the perceptual, planning, and control aspects of micro unmanned aerial vehicles (MAVs). This study thoroughly outlines the strategy, methodology, and technical development of a lightweight collision avoidance module for small drones, employed during our participation in the IMAV 2022 Nanocopter AI Challenge held at TU Delft, The Nether-lands. Tailored for nano-sized drones, this competition presented challenges related to agile maneuvers, obstacle avoidance, and navigation in a dynamic indoor arena. We provide detailed insights into our obstacle avoidance algorithm, employing an AI computer vision approach and showcasing its robust performance in dynamic environments. The accuracy of the proposed strategy was verified through simulation testing, highlighting the effectiveness of our approach in a simulated Webots environment across diverse parameter settings. The shared insights aim to contribute significantly to the ongoing evolution of autonomous drone navigation. Moreover, the simulation of our proposed strategy can be seen on the YouTube video link: https://youtu.be/HVZPAfyf57M.