One of the most widespread health issues affecting women is cervical cancer. Early detection of cervical cancer through improved screening strategies will reduce cervical cancer-related morbidity and mortality rates worldwide. Using a Pap smear image is a novel method for detecting cervical cancer. Previous studies have focused on whole Pap smear images or extracted nuclei to detect cervical cancer. In this paper, we compared three scenarios of the entire cell, cytoplasm region, or nucleus region only into seven classes of cervical cancer. After applying image augmentation to solve imbalanced data problems, automated features are extracted using three pre-trained convolutional neural networks: AlexNet, DarkNet 19, and NasNet. There are twenty-one features as a result of these scenario combinations. The most important features are split into ten features by the principal component analysis, which reduces the dimensionality. This study employs feature weighting to create an efficient computer-aided cervical cancer diagnosis system. The optimization procedure uses the new evolutionary algorithms known as Ant lion optimization (ALO) and particle swarm optimization (PSO). Finally, two types of machine learning algorithms, support vector machine classifier, and random forest classifier, have been used in this paper to perform classification jobs. With a 99.5% accuracy rate for seven classes using the PSO algorithm, the SVM classifier outperformed the RF, which had a 98.9% accuracy rate in the same region. Our outcome is superior to other studies that used seven classes because of this focus on the tissues rather than just the nucleus. This method will aid physicians in diagnosing precancerous and early-stage cervical cancer by depending on the tissues, rather than on the nucleus. The result can be enhanced using a significant amount of data.