https://github.com/muhammadshavaiz/hand-sketch-recognition--inceptionv3
The Hand Drawn Sketch Classification project uses PyTorch to classify hand-drawn sketches. It evaluates model Inception_v3, with Inception_v3 achieving the highest accuracy of 57%. The repository features scripts for dataset management, model training, and evaluation.
https://github.com/muhammadshavaiz/hand-sketch-recognition--inceptionv3
inception-v3 matplotlib numpy pandas python pytorch
Last synced: about 1 month ago
JSON representation
The Hand Drawn Sketch Classification project uses PyTorch to classify hand-drawn sketches. It evaluates model Inception_v3, with Inception_v3 achieving the highest accuracy of 57%. The repository features scripts for dataset management, model training, and evaluation.
- Host: GitHub
- URL: https://github.com/muhammadshavaiz/hand-sketch-recognition--inceptionv3
- Owner: MuhammadShavaiz
- Created: 2024-05-01T17:42:11.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-15T19:28:56.000Z (6 months ago)
- Last Synced: 2025-01-11T03:44:49.968Z (about 1 month ago)
- Topics: inception-v3, matplotlib, numpy, pandas, python, pytorch
- Language: Python
- Homepage:
- Size: 63.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Hand-Drawn Sketch Classification
### Overview
This project tackles the challenge of recognizing hand-drawn sketches. Various models were explored, including ResNet18, ResNet50, and Inception_v3, with Inception_v3 proving to be the most effective, achieving a validation accuracy of 57%.
### Pipeline
The pipeline is constructed using PyTorch and encompasses:
- **Dataset Handling:** A custom dataset class for loading images and labels from a CSV file.
- **Model Training:** Fine-tuning of Inception_v3 with batch processing.
- **Evaluation:** A script to assess model performance and generate predictions.### File Descriptions
- `dataset.py`: Manages dataset loading and iterator creation.
- `model.py`: Loads and modifies Inception_v3, including parameter counting methods.
- `train.py`: Trains the model for 30 epochs, logs progress, and saves checkpoints.
- `evaluate.py`: Evaluates the dataset using the best model and outputs predictions in CSV format.### Usage
#### Training
To train the model, ensure your dataset is organized as follows:
```
BaseDir
├── images
│ ├── 1.png
│ ├── 2.png
└── labels.csv
```Run the training script with the command:
```bash
python3 train.py
```This script trains the model for 30 epochs, logging progress and saving checkpoints along the way.
#### Evaluation
To evaluate the model:
1. Download and extract the project.
2. Organize the dataset as described above.
3. Run the evaluation script with the command:```bash
python3 evaluate.py pathToDataset
```This generates an `evaluation.csv` file with predictions for each image in the dataset.
### Contact
For any questions, please reach out to:
- Muhammad Shavaiz Butt - [[email protected]](mailto:[email protected])
- Hasib Aslam - [[email protected]](mailto:[email protected])