Convolutional Visual Prompts applied at the input and latent level to improve classification accuracy
This project applies convolutional visual prompts at the input and latent levels in a ResNet18 model. Initially trained on ImageNet, the model is fine-tuned and tested on CIFAR-10, including its corrupted version (CIFAR-10-C). The aim is to explore and optimize the use of visual prompts for enhanced model performance without having to retrain the model.
- Fine-Tuning ResNet18 on CIFAR-10: Adapting the ImageNet-trained ResNet18 to CIFAR-10 data.
- Data Preparation - CIFAR-10-C: Loading corrupted CIFAR-10 data from a drive.
- Model Evaluation: Testing the model on CIFAR-10 and CIFAR-10-C without prompts.
- Convolutional Prompting at Latent Level: Implementing a single random prompt at the latent level.
- Input Level Prompt Optimization (simpleoptimize): Optimizing input level prompts based on the referenced paper.
- Latent Level Prompt Optimization (latentoptimize): Enhancing latent level prompts.