IMPORTANT --> Ensure you update the paths in the script to reflect your directory structure accurately! More on this in the "Setup" heading
This project uses the pretrained AlexNet model to classify images from the ImageNet val set (50k images). The script loads images, processes them, runs them through the model, and compares the predictions to the correct labels.
- Python 3.8+
- PyTorch
- Torchvision
- Pillow
-
Clone the repository
- git clone https://github.com/yourusername/AlexNet_Testing.git
- cd AlexNet_Testing
-
Install requirements
- pip install -r requirements.txt
-
Download ImageNet Class Index
- Download the "ImageNet_Class_Map.json" file and place it in the root directory of this project.
-
Prepare ImageNet Validation Set
- Ensure that your ImageNet validation set images are placed in a directory and update the "imageFolderPath" variable in the script with this path.
-
Prepare Bounding Box Annotations
- Ensure that your correct labels (in XML format) are placed in a directory and update the "Bounding_Box_Annotation_Folder_Path" variable in the script with this path.
python3 AlexNetEval.py