This script performs image classification using Convolutional Neural Networks (CNN). It predicts the images in the ./input dataset and moves them to output directories classified by their predicted classes.
The following libraries are required to run the script:
- tqdm
- torch
- torchvision
- PIL
You can install the required libraries by running the following command:
pip install -r ./environ/requirements.txtPlease place the input images you want to classify in the ./input.
To run the script, use the following command:
python cnn_eval.py
It will utilize the available GPU if present; otherwise, it will use the CPU.
The resulting images, classified into their respective classes, will be saved in the ./output/<class_name>