In Intelligent Reflecting Surface (IRS)-assisted communication systems, accurate user localization, particularly Angle-Of-Arrival (AoA) and range estimation are challenging due to the computational complexity and limited resolution of traditional Multiple Signal Classification (MUSIC) algorithms. This paper introduces a hybrid IRS framework that combines machine learning with a modified MUSIC algorithm to achieve high-precision localization and enhanced security. The system integrates two Convolutional Neural Networks (CNNs): RefineNet, which refines AoA and range estimates from MUSIC pseudo-spectra, and ElementNet, which optimizes the number and placement of active IRS elements to balance accuracy with resource efficiency. Notably, ElementNet shows that only eight active elements are sufficient to obtain 90% of the best achievable localization accuracy, highlighting the efficiency of the proposed design. Validation on the DeepMIMO dataset demonstrates superior range accuracy and AoA precision. This work sheds light on the secure and high-precision localization for diverse wireless applications.