Skip to content

Aalaa4444/Garbage_Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Garbage_Classification

  1. In our Model we preparing dataset for Garbage classification , divided it into training and validation sets.
  2. We use ImageDataGenerator for data augmentation to enhance our model's ability to generalize.
  3. Then we try different model as base model (MobileNet , Xception) for feature extraction, and we add a global average pooling layer to reduce the spatial dimensions.
    Features that we extracted from the pre-trained model are for both training and testing datasets.
  4. Then we perform feature selection using a genetic algorithm.
    • We initialize a population of binary encoded feature vectors, this feature vector representing the presence or absence of features.
    • Our Fitness function is evaluated using a support vector machine (SVM) classifier on the selected features.
    • we select parents based on their fitness. We randomly select two indices for each member of the population, compare their fitness, and select the one with higher fitness as a parent.
    • After that we perform a single-point crossover method between two parents that we selected to create two children.
    • We randomly select a crossover point and combine the genetic information of the two parents before and after that point.
    • And then apply mutation, and finally generate a new populations iteratively.
  5. After Selecting best features that suit our data we apply SVM to get final results.