Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Month 4 — Exercises set

🟢 Easy

Computer Vision

  1. Load an image with OpenCV, convert to RGB/HSV/Grayscale.
  2. Canny edge detection + contour finding.
  3. Inference on an image with pretrained YOLOv8n model.
  4. Top-5 classification on an image with pretrained EfficientNet.
  5. OCR on a simple text image with Tesseract.

NLP

  1. Tokenization, stop words removal, lemmatization with NLTK.
  2. NER and POS tagging with spaCy.
  3. TF-IDF + Logistic Regression baseline (Spam SMS dataset).
  4. HuggingFace pipeline("sentiment-analysis") for 10 sentences.
  5. Cosine similarity matrix between 5 sentences with Sentence Transformers.

🟡 Medium

CV — Real projects

  1. Document Scanner: “Flatten” a document from phone photo (contour + perspective).
  2. Custom YOLO training: Label 100-200 images in Roboflow, fine-tune YOLOv8 (Colab GPU).
  3. OCR pipeline: Extract name, surname, numbers from a passport image.
  4. Image similarity search: Embed 1000 images with pretrained CNN, find the 10 closest to a query image.
  5. Real-time webcam YOLO: webcam → bounding box + label.

NLP — Real projects

  1. News classifier: BBC News dataset (5 categories), compare TF-IDF + LR vs BERT.
  2. Uzbek text dataset: Collect 5000+ posts from Telegram, create a classifier.
  3. Multilingual sentiment: One model for 3 languages (en/ru/uz).
  4. Custom BPE tokenizer: Train BPE on an Uzbek corpus.
  5. Zero-shot classifier: Classify 10 news items into 5 categories without giving “labels”.

🔴 Hard (Production)

1. CV — Object Counter Service

Requirements:

  • FastAPI + YOLOv8 custom trained model
  • Endpoint: image/video upload → count by class
  • Celery + Redis (async processing)
  • WebSocket real-time updates
  • Docker + docker-compose
  • Streamlit or React frontend

**Example use case:**number of cars in parking lot, people flow in a store

2. OCR — ID Card Reader

Requirements:

  • Detect ID card type (YOLO)
  • Perspective correction (OpenCV)
  • Field-by-field OCR (PaddleOCR)
  • Validation + parsing (regex)
  • Save to PostgreSQL
  • REST API + admin panel

3. NLP — Multilingual Customer Support Classifier

Requirements:

  • Classify support tickets coming in 3 languages (en/ru/uz) into 10 categories
  • Fine-tune mBERT or XLM-R
  • FastAPI + caching
  • Prediction monitoring (concept drift detection)
  • Telegram bot integration

4. CV+NLP — Visual Question Answering

Requirements:

  • BLIP or similar VLM (Vision-Language Model)
  • Image + question → answer
  • Streamlit demo
  • Mobile app integration

Mini-projects

Mini-project 1: Uzbek Plate Number Recognition

  • Collect a dataset of Uzbek license plates (100+ photos from phone)
  • Plate detection with YOLO
  • Read the number with OCR
  • FastAPI service

Mini-project 2: Receipt Scanner

  • OCR of a store receipt image
  • Extract products and prices
  • Total amount and grouping by category
  • Telegram bot

Mini-project 3: Sport Highlights Generator

  • Football game video
  • Object detection (player, ball)
  • Event detection (goal, foul)
  • Automatic highlights montage (FFmpeg)
  • Index 100+ PDF documents
  • Sentence embeddings + FAISS
  • Natural language search
  • Streamlit UI

Quiz

CV

  1. Difference between object detection and classification?
  2. What are IoU and mAP?
  3. Difference in speed and accuracy between YOLO and Faster R-CNN?
  4. What is an anchor box and how do anchor-free detectors work?
  5. When is NMS (Non-Maximum Suppression) used?
  6. Difference between Tesseract and modern OCR (EasyOCR/PaddleOCR)?
  7. What’s special about SAM (Segment Anything)?

NLP

  1. Difference between Stemming and Lemmatization?
  2. TF-IDF formula and intuition?
  3. Difference between Skip-gram and CBOW in Word2Vec?
  4. Difference between BPE and WordPiece tokenization?
  5. Difference between BERT, GPT, T5 (architecture)?
  6. What are Q, K, V in attention mechanism?
  7. How does Zero-shot classification work?

Production

  1. How do you deploy a pretrained model to production?
  2. Why is batching useful for GPU inference?
  3. Model versioning strategies?
  4. How do you reduce Docker image size for a CV service?
  5. Caching strategies for an NLP service?

✅ Month 4 final checklist

  • Classical image processing with OpenCV
  • YOLOv8 inference and fine-tuning (Colab/Kaggle)
  • OCR (at least one library: Tesseract/EasyOCR/PaddleOCR)
  • Classical NLP: TF-IDF + LR baseline
  • NER, POS with spaCy
  • HuggingFace Transformers (pipeline + Auto*)
  • Sentence embeddings (ready for RAG)
  • CV or NLP service in FastAPI
  • Capstone project on GitHub
  • LinkedIn post

Congratulations! Ready for Month 5 — LLM, RAG, and AI Agents — now you enter the LLM era!