Skip to content

πŸ‘οΈ Production-grade computer vision implementations. Real-world applications in image processing, object detection, and video analytics with GPU acceleration. πŸ“Έ

License

Notifications You must be signed in to change notification settings

BjornMelin/ml-vision-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ML Vision Lab πŸ‘οΈ

Python PyTorch TensorFlow OpenCV CUDA Projects License

Modular computer vision implementations - A collection of production-grade vision systems spanning multiple domains.

Featured Projects β€’ Installation β€’ Quick Start β€’ Contributing

πŸ“‘ Table of Contents

πŸ—‚οΈ Project Organization

graph TD
    A[ML Vision Lab] --> B[projects]
    A --> C[core]
    A --> D[docs]
    B --> E[food-classification]
    B --> F[object-detection]
    B --> G[medical-imaging]
    B --> H[satellite-analysis]
    C --> I[utils]
    C --> J[models]
    C --> K[pipelines]
    D --> L[api]
    D --> M[guides]
    D --> N[architecture]
Loading
ml-vision-lab/
β”œβ”€β”€ projects/               # Individual vision projects
β”‚   β”œβ”€β”€ food-classification/  # Food analysis system
β”‚   β”œβ”€β”€ object-detection/      # Real-time detection
β”‚   β”œβ”€β”€ medical-imaging/       # DICOM processing
β”‚   └── satellite-analysis/    # Geospatial vision
β”œβ”€β”€ core/                   # Shared vision components
β”‚   β”œβ”€β”€ utils/              # Common utilities
β”‚   β”œβ”€β”€ models/             # Base model architectures
β”‚   └── pipelines/          # Processing workflows
└── docs/                   # Project documentation

✨ Core Features

mindmap
  root((ML Vision Lab))
    Cross-Project
      Modular architecture
      Shared pipelines
      Hardware optimization
      Standardized metrics
    Project Types
      Classification
      Detection
      Medical
      Satellite
    Optimization
      GPU acceleration
      TensorRT
      Memory efficiency
    Development
      MLflow tracking
      DVC versioning
      CI/CD pipelines
Loading

Cross-Project Capabilities

  • Modular project architecture
  • Shared preprocessing pipelines
  • Hardware-optimized inference
  • Standardized evaluation metrics
  • GPU-accelerated processing
  • Production deployment examples
  • Memory-efficient inference
  • TensorRT integration

Project Types

  • Image Classification
  • Object Detection & Tracking
  • Medical Imaging Analysis
  • Satellite Imagery Processing
  • Industrial Quality Inspection

πŸ”§ Prerequisites

  • Python 3.11+
  • CUDA 12.2+
  • OpenCV 5.0+
  • PyTorch 2.3+
  • TensorFlow 2.15+
  • NVIDIA GPU (Compute Capability 6.0+)

πŸ› οΈ Tech Stack

graph TD
    A[Tech Stack] --> B[Core Libraries]
    A --> C[Project Libraries]
    B --> D[PyTorch]
    B --> E[TensorFlow]
    B --> F[OpenCV]
    B --> G[CUDA]
    C --> H[MONAI]
    C --> I[RasterIO]
    C --> J[DeepSORT]
    C --> K[MLflow]
Loading

Core Libraries

  • PyTorch - Deep learning framework
  • TensorFlow - Machine learning platform
  • OpenCV - Computer vision operations
  • CUDA - GPU acceleration
  • TensorRT - Inference optimization
  • NumPy - Numerical computing
  • Pandas - Data manipulation
  • Scikit-learn - Machine learning utilities
  • Matplotlib - Visualization
  • Plotly - Visualization
  • Pillow - Image processing

Project-Specific Libraries

  • MONAI - Medical imaging
  • RasterIO - Geospatial analysis
  • DeepSORT - Object tracking
  • Albumentations - Image augmentation
  • MLflow - Experiment tracking
  • DVC - Data version control

πŸ“¦ Installation

# Clone repository
git clone https://github.com/BjornMelin/ml-vision-lab.git
cd ml-vision-lab

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Linux/MacOS
# or
.venv\Scripts\activate  # Windows

# Install core requirements
pip install -r requirements.txt

# Install project-specific requirements (optional)
pip install -r projects/food-classification/requirements.txt

πŸš€ Quick Start

Food Classification

from projects.food_classification import predict

result = predict("pizza.jpg")
print(f"Identified: {result.label} ({result.confidence:.1%})")

Object Detection

from projects.object_detection import VideoAnalyzer

analyzer = VideoAnalyzer(model="yolov9")
analyzer.process_stream("input.mp4", output="results.mp4")

πŸ“Š Project Matrix

Project Task Models Input Types
Food Classification Image Classification EfficientNetV2, ViT JPEG/PNG
Object Detection Real-time Tracking YOLOv9, DeepSORT Video Streams
Medical Imaging DICOM Analysis UNet3+, MONAI CT/MRI Scans
Satellite Analysis Geospatial ML ResNet50-ADE20K GeoTIFF

πŸ”§ Development Standards

flowchart TD
    A[Development] --> B[Code Quality]
    A --> C[Testing]
    A --> D[Documentation]
    B --> E[Black]
    B --> F[MyPy]
    C --> G[PyTest]
    C --> H[Coverage]
    D --> I[Docstrings]
    D --> J[Examples]
Loading

Code Quality

# Format all projects
black projects/

# Type checking
mypy projects/

# Run tests
pytest projects/ --cov

Project Structure Template

projects/new-project/
β”œβ”€β”€ app/          # Application interface
β”œβ”€β”€ engine/       # Core logic
β”œβ”€β”€ models/       # Trained weights
β”œβ”€β”€ tests/        # Unit tests
β”œβ”€β”€ README.md     # Project docs
└── requirements.txt # Local dependencies

🀝 Contributing

Adding New Projects

  1. Create project folder in projects/
  2. Follow structure template
  3. Add cross-links to:
    • Core utilities (avoid duplication)
    • Related projects
  4. Submit PR with:
    • Black-formatted code
    • Google-style docstrings
    • Unit tests (β‰₯80% coverage)

See CONTRIBUTING.md for full guidelines.

πŸ“š Documentation

Pipeline Optimization

graph LR
    A[Input] --> B[Preprocessing]
    B --> C[Inference]
    C --> D[Postprocessing]
    B --> E[GPU Pipeline]
    C --> F[TensorRT]
    D --> G[Batch Processing]
Loading
  • GPU-accelerated preprocessing
  • Batch processing optimization
  • Memory-efficient inference
  • TensorRT integration
  • Multi-GPU support
  • Mixed precision training

Models

Model Task Performance Speed (FPS)
YOLOv8 Detection mAP: 52.3 120
Mask R-CNN Segmentation mAP: 47.8 45
DeepSORT Tracking MOTA: 76.5 80

πŸ“Š Benchmarks

Performance on standard datasets:

Task Dataset Model GPU FPS Accuracy
Detection COCO YOLOv8 A100 120 mAP: 52.3
Segmentation COCO Mask R-CNN V100 45 mAP: 47.8
Tracking MOT17 DeepSORT 3090 80 MOTA: 76.5

πŸ“Œ Versioning

We use SemVer for versioning. For available versions, see the tags on this repository.

✍️ Authors

Bjorn Melin

πŸ“ Citation

@misc{melin2024mlvisionlab,
  author = {Melin, Bjorn},
  title = {ML Vision Lab: Production Computer Vision Implementations},
  year = {2024},
  publisher = {GitHub},
  url = {https://github.com/BjornMelin/ml-vision-lab}
}

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • OpenCV community
  • YOLO authors and contributors
  • Deep SORT implementation team
  • Medical imaging community (MONAI)
  • Satellite imagery processing teams
  • TensorFlow and PyTorch teams
  • NVIDIA for CUDA and TensorRT support

Architecture Overview

Made with πŸ‘οΈ and ❀️ by Bjorn Melin

About

πŸ‘οΈ Production-grade computer vision implementations. Real-world applications in image processing, object detection, and video analytics with GPU acceleration. πŸ“Έ

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages