A comprehensive collection of educational deep learning programs demonstrating fundamental concepts in computer vision, natural language processing, and sequence modeling.
The easiest way to run and visualize the labs is through the web interface:
pip install -r requirements.txt
cd web_interface
pip install -r requirements.txtcd web_interface
python app.pyNavigate to http://localhost:5000 in your web browser.
- Browse all 10 labs from the dashboard
- Click on any lab card to open its interface
- Click "Run Lab" to execute
- View real-time console output
- See generated visualizations automatically
Features:
- Interactive web dashboard with Full Labs, Lite Labs, and Documentation sections
- Real-time console output display
- Automatic visualization of results
- Run/Stop controls for each lab
- Built-in documentation viewer
- Modern dark theme with responsive design
For detailed web interface documentation, see web_interface/README.md
It's highly recommended to use a virtual environment to avoid dependency conflicts:
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
cd web_interface
pip install -r requirements.txt
cd ..
# Run web interface
cd web_interface
python app.py# Create conda environment
conda create -n dl-lab python=3.9
# Activate environment
conda activate dl-lab
# Install dependencies
pip install -r requirements.txt
cd web_interface
pip install -r requirements.txt
cd ..
# Run web interface
cd web_interface
python app.pyWhen you're done:
# For venv:
deactivate
# For conda:
conda deactivateBenefits of Virtual Environment:
- Isolated dependencies from system Python
- Prevents version conflicts with other projects
- Easy to reproduce exact environment
- Clean uninstall by simply deleting the environment
This repository contains 10 self-contained lab activities designed for academic learning. Each lab includes:
- Well-commented, production-quality code
- Clear learning objectives
- Sample datasets or data generation
- Training and evaluation pipelines
- Visualization of results
- Execution time under 5 minutes on standard hardware
Directory: labs_full/lab_01_image_processing/ | Lite: labs_lite/lab_01_image_processing/
- Histogram equalization
- Thresholding techniques
- Edge detection (Sobel, Canny)
- Data augmentation
- Morphological operations
Directory: labs_full/lab_02_cifar10_classifiers/ | Lite: labs_lite/lab_02_cifar10_classifiers/
- KNN classifier implementation
- 3-layer neural network classifier
- SVM/Softmax classifier comparison
Directory: labs_full/lab_03_batchnorm_dropout/ | Lite: labs_lite/lab_03_batchnorm_dropout/
- Effect of batch normalization on training
- Impact of dropout on overfitting
- Comparative analysis with visualizations
Directory: labs_full/lab_04_labeling_tools/ | Lite: labs_lite/lab_04_labeling_tools/
- Synthetic image generation with annotations
- Format conversions (COCO, YOLO, Pascal VOC)
- Annotation visualization
- Statistics generation
Directory: labs_full/lab_05_segmentation/ | Lite: labs_lite/lab_05_segmentation/
- UNet architecture implementation
- Comparison with simple CNN baseline
- Evaluation metrics (IoU, Dice coefficient)
- Synthetic segmentation dataset
Directory: labs_full/lab_06_object_detection/ | Lite: labs_lite/lab_06_object_detection/
- YOLO-style object detector
- Bounding box prediction and classification
- Non-Maximum Suppression (NMS)
- Detection visualization
Directory: labs_full/lab_07_image_captioning/ | Lite: labs_lite/lab_07_image_captioning/
- CNN encoder + RNN/LSTM decoder
- Comparison between Vanilla RNN and LSTM
- Caption generation
- Synthetic image-caption pairs
Directory: labs_full/lab_08_chatbot/ | Lite: labs_lite/lab_08_chatbot/
- Bi-directional LSTM for intent classification
- Comparison with unidirectional LSTM
- Response generation
- Interactive demo
Directory: labs_full/lab_09_time_series/ | Lite: labs_lite/lab_09_time_series/
- LSTM and GRU for forecasting
- Multi-step ahead prediction
- Comparison with baseline
- Evaluation metrics (MSE, MAE, RMSE, MAPE)
Directory: labs_full/lab_10_seq2seq/ | Lite: labs_lite/lab_10_seq2seq/
- Encoder-decoder architecture
- Attention mechanism
- Machine translation (synthetic language)
- Beam search decoding
If you prefer running labs directly from the command line:
- Python 3.8 or higher
- pip package manager
- (Optional) CUDA-capable GPU for faster training
- Clone or download this repository
- Install dependencies:
pip install -r requirements.txtEach lab is self-contained with an executable Python program. Navigate to the lab directory and run:
# Lab 1: Image Processing
cd labs_full/lab_01_image_processing
python image_processing.py
# Lab 2: CIFAR-10 Classifiers
cd labs_full/lab_02_cifar10_classifiers
python cifar10_classifiers.py
# Lab 3: Batch Normalization & Dropout
cd labs_full/lab_03_batchnorm_dropout
python batchnorm_dropout_study.py
# Lab 4: Labeling Tools Demo
cd labs_full/lab_04_labeling_tools
python labeling_demo.py
# Lab 5: Image Segmentation
cd labs_full/lab_05_segmentation
python segmentation_demo.py
# Lab 6: Object Detection
cd labs_full/lab_06_object_detection
python object_detection_demo.py
# Lab 7: Image Captioning
cd labs_full/lab_07_image_captioning
python image_captioning_demo.py
# Lab 8: Chatbot
cd labs_full/lab_08_chatbot
python chatbot_demo.py
# Lab 9: Time Series Forecasting
cd labs_full/lab_09_time_series
python time_series_demo.py
# Lab 10: Sequence to Sequence
cd labs_full/lab_10_seq2seq
python seq2seq_demo.pyOr run all labs sequentially:
cd labs_full
bash run_all_labs.shFor lightweight versions with faster execution:
cd labs_lite
bash run_all_labs.shNote: Each program creates an output/ directory in its lab folder with visualizations and results.
Core libraries used across labs:
- PyTorch: Deep learning framework
- TensorFlow/Keras: Alternative framework for some labs
- OpenCV: Image processing
- NumPy: Numerical computations
- Matplotlib/Seaborn: Visualization
- scikit-learn: Classical ML algorithms
- Pillow: Image handling
- pandas: Data manipulation
See requirements.txt for complete list with versions.
All labs are designed to complete within 5 minutes on standard hardware (CPU):
| Lab | Program | Execution Time | Notes |
|---|---|---|---|
| Lab 1 | image_processing.py |
< 30 seconds | Image processing operations |
| Lab 2 | cifar10_classifiers.py |
2-3 minutes | KNN, SVM, 3-layer NN training |
| Lab 3 | batchnorm_dropout_study.py |
2-3 minutes | 4 model variants comparison |
| Lab 4 | labeling_demo.py |
< 30 seconds | Synthetic data generation |
| Lab 5 | segmentation_demo.py |
3-4 minutes | UNet + baseline training |
| Lab 6 | object_detection_demo.py |
3-4 minutes | YOLO-style detector training |
| Lab 7 | image_captioning_demo.py |
3-4 minutes | RNN + LSTM training |
| Lab 8 | chatbot_demo.py |
2-3 minutes | BiLSTM + LSTM training |
| Lab 9 | time_series_demo.py |
2-3 minutes | LSTM + GRU forecasting |
| Lab 10 | seq2seq_demo.py |
3-4 minutes | Seq2Seq + Attention training |
Total time for all labs: ~25-30 minutes
With GPU: Execution times can be 2-5x faster depending on GPU model.
Lite versions: Execute 2-3x faster with reduced dataset sizes and epochs.
By completing these labs, you will:
- Understand fundamental image processing techniques
- Implement and compare different classification approaches
- Master regularization techniques in neural networks
- Learn data annotation workflows for computer vision
- Build semantic and instance segmentation models
- Implement modern object detection architectures
- Create image captioning systems with RNNs and LSTMs
- Develop conversational AI with bi-directional LSTMs
- Apply deep learning to time series problems
- Understand sequence-to-sequence architectures
dl-lab/
βββ web_interface/ # Web-based interface (recommended)
β βββ app.py # Flask application
β βββ templates/ # HTML templates
β βββ requirements.txt # Web interface dependencies
βββ labs_full/ # Full-featured lab programs
β βββ lab_XX_name/
β βββ README.md # Lab-specific instructions
β βββ program.py # Main executable
β βββ output/ # Generated results (created on run)
βββ labs_lite/ # Lightweight versions (faster execution)
β βββ lab_XX_name/
β βββ program_lite.py
β βββ output/
βββ docs/ # Additional documentation
βββ requirements.txt # Main dependencies
All programs:
- Are fully self-contained and executable
- Generate synthetic data or download datasets as needed
- Create visualizations and save results in
output/directory - Include comprehensive comments and documentation
- Print progress and results to console
- Available in both full and lite versions
Import Errors:
pip install --upgrade -r requirements.txtCUDA Out of Memory:
- Reduce batch size in the code
- Use CPU mode by setting
device = 'cpu'
Slow Execution:
- Ensure you're using GPU if available
- Reduce dataset size or number of epochs
- Check system resources
For more detailed information, see:
- Web Interface Guide - Complete web interface documentation
- Installation Guide - Detailed setup instructions
- Dataset Setup Guide - Dataset download and management
- Getting Started - Beginner's guide
- Advanced Tab Guide - Advanced features
This is an educational repository. Feel free to:
- Report issues or bugs
- Suggest improvements
- Add more examples or variations
This project is created for educational purposes. Feel free to use and modify for learning.
These labs are designed for academic learning and incorporate best practices from:
- Stanford CS231n: Convolutional Neural Networks
- Stanford CS224n: Natural Language Processing
- Fast.ai courses
- PyTorch and TensorFlow tutorials
Note: All programs are designed to be self-contained and educational. They prioritize clarity and learning over production optimization.
Last Updated: March 2026