Main Pipeline
Follow this pipeline to run through the whole framework.
- main_pipeline.main()[source]
Main function to run the complete pipeline for image processing, feature extraction, model training, and saving results.
This function orchestrates the following tasks: 1. Setup logging for monitoring the pipeline. 2. Load real images from a specified directory and preprocess them. 3. Generate fake images using a pre-trained Stable Diffusion model. 4. Prepare the dataset by combining real and fake image paths and labels. 5. Perform feature extraction using the CLIP model. 6. Save the extracted features and labels for reuse. 7. Split the dataset into training and testing sets. 8. Train models (SVM, XGBoost, Neural Network) with hyperparameter optimization using Optuna. 9. Save the trained models and evaluation metrics.
The final pipeline ensures that the models and metrics are stored in a specified output directory for future use and evaluation.
- Returns:
None
Example
main() # Runs the entire image processing and model training pipeline.