Skip to content

About

Learning Python from scratch: fundamentals, data structures, OOP, NumPy, and the first steps into computer vision

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning Python: Journey to Robotics and Embodied AI

I'm learning Python from scratch, working toward humanoid robotics and embodied AI. This repo tracks the whole thing, from my first print("hello") up to real-time computer vision.

What's inside

The files run roughly in order, from the basics up to small projects that pull everything together:

Topic Files
Basics: print, variables, types, I/O 01-06
Control flow: conditionals and loops 07-09
NumPy: arrays, indexing, matrix ops, slicing 10, 19, 20, 25
File I/O 11
Git and GitHub workflow 12-15
OOP: classes, objects, methods 16-18, 22-24
Error handling (try/except) 22, 43
Refactoring: functions and classes 26, 31
Capstone: Robot Manager 29
Mini projects: Expense Tracker, To-Do List 35
Computer Vision: OpenCV 36-44

Key concepts learned

  • Data structures. Lists vs dictionaries, and nesting them to hold real-world data.
  • OOP. Designing with classes, methods, and per-object state, and knowing when a method fits better than a standalone function.
  • NumPy. Vectors and matrices as code: indexing, slicing, dot product, transpose. This is what machine learning sits on top of.
  • Clean code. DRY, meaningful names, comments that explain why, and reshaping working code into something better structured.
  • Error handling. Writing programs that don't crash, and that fail with a clear message when something goes wrong.
  • Git. Branching, merging, reading history (git log, git diff), and writing commit messages that make sense later.

🤖 Computer Vision (OpenCV)

This is what I've been working on most recently, and it's the part that got me hooked. An image is just a grid of numbers, and a program "sees" by working through those numbers frame by frame.

What I built:

Project What it does Concepts
Image processing Read, grayscale, crop, resize, and save real photos imread, cvtColor, slicing, imwrite
Shape and text drawing Draw boxes, lines, circles, and labels on a canvas rectangle, line, circle, putText
Color detection Isolate objects by color range using HSV masking inRange, bitwise_and, HSV tuning
Face detection Detect faces automatically with a pre-trained model Haar Cascade, detectMultiScale
Live webcam counter Real-time face detection with a live count overlay VideoCapture, frame loop
Photo booth Live webcam capture with overlay, saved on keypress frame capture, keyboard input, imwrite

Things that clicked:

  • An image is a NumPy array, so every slicing and matrix trick from earlier works on it directly.
  • Color channels, IP octets, and uint8 all come from the same place: one byte holds 0 to 255.
  • Haar Cascade is fast but easy to fool. Figuring out when a method hits its limit turned out to matter as much as knowing how to run it.
  • Real-time vision is the same processing, just run on a stream of frames instead of one photo.

The goal

This is the foundation phase of a longer plan toward embodied AI and humanoid robotics. The idea is that each piece leads somewhere: NumPy into machine learning, image-as-matrix into computer vision, OOP into ROS2 and PyTorch.

So far I've gone from zero to reading real photos, detecting faces in real time, and building a photo booth from scratch. Next up is deep-learning detection, then ROS2 and simulation.

About

Learning Python from scratch: fundamentals, data structures, OOP, NumPy, and the first steps into computer vision

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages