The accurate classification of osteoporosis is a crucial requirement in the medical field for identifying patients with skeletal disorders associated with aging. Achieving improved accuracy and reduced computational complexity in classification algorithms is essential. To address this, our research proposes a novel classification method utilizing the Hybrid Gradient Particle Swarm (HSG) Optimization-based Deep Belief Network, integrating the Particle Swarm Optimization (PSO) algorithm into the Gradient Descent (GD) algorithm. The osteoporosis classification process comprises five key steps: Preprocessing, Active Shape Model-based Segmentation, Geometric Estimation employing the proposed template search method, Feature Extraction for extracting medical and image-level features, and Osteoporosis Classification using the HSG-based Deep Belief Network. The proposed template search method efficiently and automatically updates the geometric points of the femur segment. Experimental validation using a real-time database demonstrates the effectiveness of the proposed method in terms of accuracy, sensitivity, and specificity. The results indicate an accuracy of 0.9724, affirming the efficacy of the proposed algorithm in making precise decisions regarding osteoporosis classification.