Skip to main content
    listerineh.dev
    • About
    • Experience
    • Projects
    • Skills
    • Blog
    • Talks
    • Contact
    • Why
    • About
    • Experience
    • Projects
    • Skills
    • Blog
    • Talks
    • Contact
    • Why

    © 2026 Sebastian Alvarez

    All projects

    Hand Tracking

    Real-time hand tracking with MediaPipe and OpenCV: 21 landmarks per hand and a square box around it, ready to crop for gesture recognition.
    Source Code
    Hand Tracking
    Role
    AI Developer
    Timeline
    February 2022
    Status
    Completed

    In numbers

    Landmarks per hand, wrist to fingertips
    2121
    Training images needed: the model comes pretrained
    00

    About the Project

    Hand Tracking follows hands on a live webcam feed. MediaPipe Hands finds each hand anywhere in the frame and returns 21 landmarks, from the wrist to each fingertip, which the script draws as a skeleton over the image.

    From those landmarks it builds a box around the hand: the outer edges of the five fingers, the wrist as the bottom, and a margin on every side. The box is then squared by padding its shorter side, so the hand keeps its proportions, and it is drawn only when it sits fully inside the frame. A square, centered crop is exactly what an image classifier expects as input.

    I wrote it in February 2022, the same month as my sign-language app, which needed the hand inside a fixed box on screen. This takes the opposite approach: find the hand wherever it is, with no training data of my own.

    Technologies
    1. AI

      • MediaPipe
      • OpenCV
    2. API & backend

      • Python

    Relevance

    Real-time perception with a pretrained model, and the geometry that turns its landmarks into a clean input for the next model.

    How it works

    The path a request takes, step by step.

    1. 01 · AppCameraOpenCV reads the live feed
    2. 02 · AI modelMediaPipe Hands21 landmarks per hand
    3. 03 · ServiceBoxOuter edges of the fingers and the wrist
    4. 04 · ResultSquare cropPadded on its short side, drawn when it fits

    Decisions

    The choices that shaped it, and what each one cost.

    1. 01

      Square the box around the hand

      Why
      Image classifiers take square inputs; padding the shorter side keeps the hand in proportion instead of stretching it.
      What it cost
      A long, narrow hand brings more background into the crop.
    2. 02

      Use a pretrained landmark model

      Why
      MediaPipe finds the hand anywhere in the frame with no training data of my own.
      What it cost
      Accuracy and speed are whatever the model gives; there is nothing to tune.

    Next project

    CodeSentry SwarmThree AI agents on Google Cloud that review a pull request, prove the bug with a failing test in a sandbox, and propose a fix. Deterministic code decides, and a person merges.Next project
    listerineh.dev

    Full-stack engineer building AI agents, cloud platforms and web products. Based in Quito, working remotely.

    Open to new projects

    Work

    • Projects
    • Experience
    • Skills
    • Blog
    • Talks

    About me

    • About
    • Why Listerineh?
    • Contact

    Connect

    • GitHub
    • LinkedIn
    • Instagram
    • Email

    © 2026 Sebastian Alvarez · All rights reserved.

    • Privacy Policy
    • Terms of Use
    • Unsubscribe from the newsletter
    • Component Library