Liver cancer is a leading cause of cancer-related deaths, often diagnosed at advanced stages due to reliance on traditional imaging methods. Existing computer-aided diagnosis systems struggle with noise, anatomical complexity, and ineffective feature integration, leading to inaccuracies in lesion segmentation and classification. By effectively addressing these challenges, the model aims to enhance early detection and assist clinicians in making informed decisions. Ultimately, this research seeks to contribute to more efficient and accurate liver cancer diagnosis. This paper presents a novel model for liver cancer classification, called SegNet-based Liver Cancer Classification via SqueezeNet (SgN-LCC-SqN). The model effectively executes liver cancer segmentation and classification through four key steps: preprocessing, segmentation, feature extraction, and classification. During preprocessing, Quadratic Mean Estimated Wiener Filtering (QMEWF) is utilized to minimize image noise. Segmentation divides the image into segments using Enhanced Feature Pyramid SegNet (EFP-SgN), which is essential for precise diagnosis. Feature extraction encompasses color features, Local Directional Pattern Variance, and Correlation Filtering-Local Gradient Increasing Pattern (CF-LGIP) features. The extracted features are then processed through an ensemble model, Deep Convolutional, Recurrent, Long Short Term Memory with SqueezeNet (DCR-LSTM-SqN), which includes Deep Convolutional Neural Network (DCNN), Recurrent Neural Network (RNN), Long Short-Term Memory (LSTM), and Modified Loss Function in SqueezeNet (MLF-SqN) classifiers, sequentially analyzing the feature sets through DCNN, RNN, and LSTM before classification by MLF-SqN. The performance of the suggested DCR-LSTM-SqN model is evaluated over conventional methods for positive, negative and other metrics. The DCR-LSTM-SqN model consistently demonstrates superior accuracy, ranging from 0.947 to 0.984, across all training data percentages. Thus, the proposed model effectively segments liver lesions and classifies cancerous areas, demonstrating its potential as a valuable resource for clinicians to enhance the efficiency and accuracy of liver cancer diagnosis.