Getting Started with Dhruv's Projects

Welcome! This guide will help you get started with the various projects and technologies developed by Dhruv Kataria.

Prerequisites

Before diving into specific projects, ensure you have the following tools installed:

Essential Tools

Python Environment Setup

# Create virtual environment
python -m venv dhruv_projects
source dhruv_projects/bin/activate  # On Windows: dhruv_projects\Scripts\activate

# Install common packages
pip install opencv-python mediapipe numpy pandas matplotlib

Project Categories

1. AI & Machine Learning Projects

Start with the facial recognition system if you're interested in computer vision:

# Clone the repository
git clone https://github.com/dhruvkataria/facial-recognition-system
cd facial-recognition-system

# Install dependencies
pip install -r requirements.txt

# Run the demo
python demo.py

2. Cloud Infrastructure Projects

Begin with basic Docker setup before moving to OpenStack:

# Install Docker (Ubuntu)
sudo apt update
sudo apt install docker.io docker-compose

# Add user to docker group
sudo usermod -aG docker $USER

# Test installation
docker --version
docker-compose --version

3. Web Development Projects

Set up the development environment for modern web applications:

# Install Node.js and npm
# Download from nodejs.org or use package manager

# Install Cloudflare Wrangler CLI
npm install -g @cloudflare/wrangler

# Login to Cloudflare
wrangler login

Quick Start Examples

Facial Recognition Demo

Run a simple face detection example:

import cv2
import mediapipe as mp

# Initialize MediaPipe
mp_face_detection = mp.solutions.face_detection
mp_drawing = mp.solutions.drawing_utils

# Start camera
cap = cv2.VideoCapture(0)

with mp_face_detection.FaceDetection(model_selection=0, min_detection_confidence=0.5) as face_detection:
    while cap.isOpened():
        success, image = cap.read()
        if not success:
            continue
            
        # Process image
        image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
        results = face_detection.process(image_rgb)
        
        # Draw detections
        if results.detections:
            for detection in results.detections:
                mp_drawing.draw_detection(image, detection)
                
        cv2.imshow('Face Detection', image)
        if cv2.waitKey(5) & 0xFF == 27:  # ESC key
            break
            
cap.release()
cv2.destroyAllWindows()

Simple Cloudflare Worker

Create your first serverless function:

export default {
  async fetch(request, env, ctx) {
    const url = new URL(request.url);
    
    if (url.pathname === '/hello') {
      return new Response('Hello from Dhruv\'s Worker!', {
        headers: { 'Content-Type': 'text/plain' }
      });
    }
    
    return new Response('Worker is running!');
  }
};

Development Workflow

Recommended Steps

  1. Clone Repository: Start with the project that interests you most
  2. Read Documentation: Each project has detailed README files
  3. Setup Environment: Install required dependencies
  4. Run Examples: Start with provided demo scripts
  5. Experiment: Modify parameters and observe changes
  6. Build Your Own: Use the examples as foundation for your projects

Best Practices

Common Issues and Solutions

Python Environment Issues

If you encounter import errors:

# Ensure virtual environment is activated
which python  # Should point to your venv

# Reinstall packages if needed
pip install --upgrade pip
pip install -r requirements.txt --force-reinstall

Camera Access Problems

For computer vision projects:

Docker Permission Errors

If you get permission denied errors:

# Add user to docker group
sudo usermod -aG docker $USER

# Logout and login again, or run:
newgrp docker

# Test access
docker run hello-world

Learning Resources

Documentation

Recommended Learning Path

  1. Beginners: Start with basic Python and computer vision concepts
  2. Intermediate: Explore machine learning fundamentals
  3. Advanced: Dive into custom algorithm development
  4. Expert: Contribute to open-source projects

Getting Help

If you need assistance:

Remember, every expert was once a beginner. Take your time, experiment, and don't hesitate to ask questions!