Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

76 Commits

Repository files navigation

Typing SVG

PythonPyTorchTensorFlowJupyterOpenCV

A comprehensive repository spanning deep learning fundamentals, computer vision, NLP, generative AI, and multi-agent systems — built and explored by Quach Thien Phu as part of his ML engineering journey at CSULB.


Project Index

#ProjectCategoryKey ConceptsTools
01Building Your Deep Neural NetworkDeep Learning FundamentalsForward/Backprop, Weights InitNumPy, Python
02Initialization Deep LearningDeep Learning FundamentalsZero, Random, He InitNumPy
03Optimization AlgorithmsDeep Learning FundamentalsSGD, Momentum, Adam, RMSPropNumPy
04RegularizationDeep Learning FundamentalsL2, Dropout, Early StoppingNumPy
05Gradient CheckingDeep Learning FundamentalsNumerical gradient verificationNumPy
06Planar Data ClassificationNeural NetworksBinary classification, decision boundariesNumPy, Matplotlib
07Rain Prediction in AustraliaClassical MLEDA, Feature Eng, ClassificationSklearn, Pandas
08Convolutional Neural NetworkComputer VisionConv layers, Pooling, FiltersTensorFlow/Keras
09Image Segmentation (U-Net V2)Computer VisionEncoder-Decoder, Skip ConnectionsTensorFlow/Keras
10Sign Language DigitsComputer VisionMulti-class classificationTensorFlow
11MobileNet — Alpaca ClassificationTransfer LearningFine-tuning, MobileNetV2TensorFlow/Keras
12Face RecognitionComputer VisionFaceNet, Triplet Loss, EmbeddingsTensorFlow, OpenCV
13Transformer (from Scratch)NLP / Deep LearningAttention, Positional Encoding, BERTPyTorch
14LLM ChatBotGenerative AIPrompt Engineering, RAG basicsLangChain, OpenAI
15Search EngineGenerative AI / IRVector Search, EmbeddingsLangChain, FAISS
16Agentic AI HackathonAgentic AIMulti-agent orchestrationFetch.ai, uAgents
17Crew AIAgentic AIRole-based agents, task delegationCrewAI
18FellowAIAgentic AIAgent pipelinesLangGraph
19NVIDIA — Accelerated ComputingSystems / OptimizationCUDA, GPU programmingNVIDIA toolkit

Deep Learning Fundamentals

1. Building Your Deep Neural Network

Implementing a deep L-layer neural network from scratch using only NumPy.

  • Built forward propagation, backward propagation, and parameter updates without any ML framework
  • Implemented L-layer architecture with ReLU hidden layers and sigmoid output
  • Applied to cat image binary classification task
  • Key insight: Understanding the math behind gradient flow in deep networks
Input → [LINEAR → RELU] × (L-1) → LINEAR → SIGMOID → Output

2. Initialization Deep Learning

Exploring how weight initialization affects training stability and speed.

MethodProblemWhen to use
Zero InitSymmetry breaking failsNever
Random InitExploding/vanishing gradientsSmall networks
He InitOptimal for ReLU layersDeep networks

3. Optimization Algorithms

Implementing and comparing gradient descent variants from scratch.

  • Mini-batch GD — balances speed vs. accuracy
  • Momentum — dampens oscillations, accelerates convergence
  • RMSProp — adaptive learning rates per parameter
  • Adam — combines Momentum + RMSProp, the go-to optimizer

4. Regularization

Techniques to reduce overfitting in deep neural networks.

  • L2 regularization (weight decay) — penalizes large weights
  • Dropout — randomly deactivates neurons during training
  • Early stopping — monitors validation loss to stop training
  • Result: Significant reduction in overfitting on test datasets

5. Gradient Checking — Fraud Detection

Verifying backpropagation is implemented correctly using numerical gradient approximation.

  • Applies fraud detection as the domain problem
  • Computes numerical gradients via finite differences and compares with analytical gradients
  • Use case: Debugging custom loss functions and layers

6. Planar Data Classification

Training a shallow neural network to learn non-linear decision boundaries.

  • Visualized how hidden layer size affects decision boundary complexity
  • Compared logistic regression vs neural network on non-linear data
  • Key takeaway: Even 1 hidden layer can approximate complex functions

Classical ML & EDA

7. Rain Prediction in Australia

End-to-end ML pipeline to predict next-day rainfall using weather data.

  • Extensive EDA with Matplotlib and Seaborn visualizations
  • Feature engineering, handling missing values, encoding categoricals
  • Trained and compared Logistic Regression, Decision Tree, Random Forest, XGBoost
  • Evaluated with ROC-AUC, Precision-Recall curves

Computer Vision

8. Convolutional Neural Network Application

Implementing CNNs for image classification tasks.

  • Built Conv → Pool → Flatten → Dense architectures in TensorFlow/Keras
  • Explored filter visualizations to understand what each layer learns
  • Applied data augmentation to improve generalization

9. Image Segmentation — U-Net V2

Semantic segmentation using the U-Net architecture.

  • Encoder path: progressively downsamples with conv + maxpool
  • Decoder path: upsamples with transposed convolutions
  • Skip connections: preserve spatial information lost during downsampling
  • Applied to biomedical image segmentation
Input Image
↓
[Encoder: Conv → MaxPool] × 4 ← Captures "what"
↓
Bottleneck
↓
[Decoder: UpConv + Skip] × 4 ← Recovers "where"
↓
Segmentation Mask

10. TensorFlow Sign Language Digits

Multi-class classification of sign language digit images (0–9).

  • Built CNN in TensorFlow from raw image data
  • Preprocessing pipeline: normalization, one-hot encoding
  • Achieved strong accuracy on 10-class gesture recognition

11. MobileNet — Alpaca Classification

Transfer learning with MobileNetV2 for custom image classification.

  • Loaded pre-trained MobileNetV2 weights (trained on ImageNet)
  • Froze base layers, added custom classification head
  • Fine-tuned top layers on the alpaca dataset
  • Key insight: Transfer learning achieves high accuracy with minimal data

12. Face Recognition

Building a face recognition system using deep embeddings.

  • Implemented FaceNet architecture producing 128-dim face embeddings
  • Triplet Loss: trains model to minimize distance between same-identity pairs
  • One-shot learning: recognizes faces from a single reference image
  • Real-time inference with OpenCV face detection

NLP & Sequence Models

13. Transformer (from Scratch)

Full Transformer architecture implementation in PyTorch.

# Core components implemented:
├── Multi-HeadSelf-Attention
├── PositionalEncoding
├── Feed-ForwardNetworks
├── LayerNormalization
├── Encoder&Decoderstacks
└── Maskedattentionforautoregressivedecoding
  • Built encoder-decoder Transformer following "Attention Is All You Need"
  • Explored BERT-style pre-training concepts
  • Foundation for understanding GPT, BERT, T5, and modern LLMs

Generative AI

14. LLM ChatBot

Conversational AI chatbot powered by large language models.

  • Integrated OpenAI API for response generation
  • Built with LangChain for conversation memory and chain orchestration
  • Prompt engineering for consistent persona and context retention
  • Deployed as an interactive interface

15. Search Engine

Semantic search engine using vector embeddings.

  • Generates dense embeddings for documents using sentence transformers
  • Indexes with FAISS for fast approximate nearest-neighbor search
  • Returns semantically relevant results (not just keyword matches)
  • Stack: LangChain + FAISS + OpenAI Embeddings

Agentic AI

16. Agentic AI Hackathon

Multi-agent system built at a hackathon using Fetch.ai's uAgents framework.

  • Designed specialized agents with distinct roles and communication protocols
  • Agents coordinate to complete complex multi-step tasks autonomously
  • Explored decentralized agent architecture

17. Crew AI

Role-based multi-agent collaboration using CrewAI framework.

  • Defined AI agents with specific roles (researcher, writer, analyst)
  • Orchestrated task delegation between agents
  • Built end-to-end pipelines with autonomous decision-making

18. FellowAI

Advanced agent pipelines using LangGraph for stateful workflows.

  • Built directed acyclic graph (DAG) agent workflows
  • Implemented conditional routing and human-in-the-loop checkpoints
  • Explored state management across long-running agentic tasks

19. NVIDIA — Accelerated Computing

GPU-accelerated ML using NVIDIA CUDA and optimized libraries.

  • Explored CUDA programming fundamentals for parallel computation
  • Applied cuDNN-accelerated deep learning operations
  • Performance benchmarking: GPU vs CPU training times

Learning Roadmap

Phase 1 — Foundations Phase 2 — Vision & NLP Phase 3 — Modern AI
──────────────────── ─────────────────────── ──────────────────────
[x] Neural nets from scratch [x] CNNs & image segmentation [x] Transformers & LLMs
[x] Optimization algorithms [x] Transfer learning [x] RAG & vector search
[x] Regularization [x] Face recognition [x] Agentic frameworks
[x] Gradient checking [x] Sign language detection [x] Multi-agent systems
[x] Classical ML + EDA [x] Object classification [ ] CGEV thesis (ongoing)

How to Run

# Clone the repository
git clone https://github.com/quachphu/Machine-Learning-Project.git
cd Machine-Learning-Project
# Install dependencies
pip install -r requirements.txt
# Launch any notebook
jupyter notebook <ProjectFolder>/<notebook>.ipynb

Common dependencies:

pip install numpy pandas matplotlib seaborn scikit-learn
pip install tensorflow keras torch torchvision
pip install langchain openai faiss-cpu opencv-python
pip install crewai fetch-uagents langgraph

Connect

LinkedInGitHubPortfolio

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages