Repository files navigation # HAM10000 QSPICE Pipeline
A comprehensive pipeline for training machine learning models on the HAM10000 skin cancer dataset and analyzing the impact of SRAM circuit storage on model performance using QSPICE simulation.
## Project Structure
```
HAM10000/
├── src/ # Source code
│ ├── data/ # Data processing components
│ ├── models/ # Model components
│ ├── circuits/ # Circuit design and simulation
│ ├── analysis/ # Analysis and comparison tools
│ ├── config.py # Configuration management
│ └── main.py # Main pipeline entry point
├── data/ # Data storage
│ ├── raw/ # Raw HAM10000 dataset
│ └── processed/ # Processed data
├── models/ # Model storage
│ ├── pretrained/ # Pre-trained models
│ ├── adapted/ # HAM10000-adapted models
│ └── sram/ # SRAM-affected models
├── circuits/ # Circuit files
│ ├── qspice/ # QSPICE circuit files
│ └── netlists/ # Circuit netlists
├── results/ # Analysis results
│ ├── performance/ # Performance metrics
│ ├── plots/ # Generated plots
│ └── reports/ # Analysis reports
├── tests/ # Test files
├── config/ # Configuration files
│ └── pipeline_config.yaml # Main configuration
├── requirements.txt # Python dependencies
├── setup.py # Package setup
└── README.md # This file
```
## Installation
1. Install Python dependencies:
```bash
pip install -r requirements.txt
```
2. Install the package in development mode:
```bash
pip install -e .
```
## Configuration
The pipeline is configured through `config/pipeline_config.yaml`. Key configuration sections include:
- **data**: Dataset paths and preprocessing parameters
- **model**: Model architecture and training parameters
- **sram**: SRAM circuit design parameters
- **qspice**: QSPICE simulation settings
- **analysis**: Analysis and reporting configuration
## Usage
Run the complete pipeline:
```bash
python src/main.py
```
Run specific stages:
```bash
python src/main.py --stage data # Data processing only
python src/main.py --stage model # Model training only
python src/main.py --stage circuit # Circuit design only
python src/main.py --stage analysis # Analysis only
```
Use custom configuration:
```bash
python src/main.py --config path/to/custom_config.yaml
```
## Pipeline Stages
1. **Data Processing**: Load and preprocess HAM10000 dataset
2. **Model Adaptation**: Load pre-trained model and adapt for HAM10000
3. **Weight Extraction**: Extract model weights for circuit storage
4. **Circuit Design**: Design SRAM circuit in QSPICE
5. **Weight Storage**: Simulate storing weights in SRAM circuit
6. **Performance Analysis**: Compare original vs SRAM-affected model performance
7. **Circuit Optimization**: Optimize SRAM design for minimal accuracy loss
## Dependencies
- **torch**: PyTorch deep learning framework
- **torchvision**: Computer vision utilities
- **timm**: Pre-trained model library
- **pandas**: Data manipulation
- **numpy**: Numerical computing
- **matplotlib**: Plotting and visualization
- **hypothesis**: Property-based testing
- **pytest**: Testing framework
## Testing
Run tests:
```bash
pytest tests/
```
Run property-based tests:
```bash
pytest tests/ -k "property"
```
## Development Status
This project is currently in development. The basic structure and configuration system are complete. Individual pipeline components will be implemented in subsequent development phases.# HAM10000
About
This is a model being trained on cancer detection dataset
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.