Towards Temporal Understanding in AI through fMRI Learning Stage Classification.
Full project documention can be found on: https://teddywarner.org/Projects/LearnedSpectrum/
- Python 3.8+
- CUDA-capable GPU (recommended)
- Git
- Clone the repository:
git clone https://github.com/Twarner491/learnedSpectrum.git
cd learnedSpectrum
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
- Install the package in editable mode with all dependencies:
pip install -e .
- Create necessary directories and download datasets (automated):
python scripts/download.py
This script will:
- Create required directory structure
- Download OpenFMRI datasets:
- Extract datasets to the correct locations
- Clean up temporary files
The resulting directory structure will be:
data/
├── raw/
│ ├── ds000002/
│ ├── ds000011/
│ ├── ds000017/
│ └── ds000052/
├── processed/
└── cleaned/
Options:
# Force redownload of datasets (if needed)
python scripts/download.py --force
- Start Jupyter:
jupyter notebook
-
Navigate to
notebooks/learnedSpectrum.ipynb
-
Execute cells sequentially
- (Optional) Set up Weights & Biases:
wandb login
- View training progress:
- Real-time metrics at wandb.ai
- Local visualizations in
visualizations/
- Training logs in
models/checkpoints/
- CUDA/GPU Issues:
# Check GPU availability
import torch
print(f"CUDA available: {torch.cuda.is_available()}")
print(f"GPU device: {torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'None'}")
-
Memory Issues:
- Reduce
BATCH_SIZE
in config - Enable gradient accumulation
- Use mixed precision training
- Reduce
-
Data Loading Issues:
- Verify dataset structure
- Check preprocessing logs in
data/processed/logs/
- Ensure sufficient disk space
Copyright © 2024 Teddy Warner
This work may be reproduced, modified, distributed, performed, and displayed for any purpose, but must acknowledge Teddy Warner. Copyright is retained and must be preserved. The work is provided as is; no warranty is provided, and users accept all liability.