# andandandand/practical-computer-vision architecture

> Architecture diagram of the GitHub repository andandandand/practical-computer-vision, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/andandandand/practical-computer-vision
- Repository: https://github.com/andandandand/practical-computer-vision

## Overview

##### Project type and purpose
- This is an educational/tutorial repository (“Practical Computer Vision with PyTorch and FiftyOne”). It provides Jupyter notebooks, data-downloading scripts, documentation, and slide decks to teach computer-vision workflows: data ingestion, preprocessing, model training, embedding extraction, visualization, and evaluation.

##### File structure
Top-level directories:
- .devcontainer/ – VS Code Dev Container configuration
- artifacts/ – pre-downloaded datasets, embeddings, class mappings
- docs/ – step-by-step setup guides (Python install, Kaggle, wandb, etc.)
- image_scraping/ – scripts & notebooks for scraping images from Bing/Google Drive
- notebooks/ – core tutorial notebooks covering digital images, CNNs, U-Net, CLIP, diffusion, etc.
- slides/ – workshop slide decks for computer-vision series
- src/data_downloaders/ – Python modules to programmatically fetch FiftyOne datasets
- requirements.txt – pinned Python dependencies

##### README for additional insights
- The README enumerates: setup steps, tutorial notebook list, external integrations (Kaggle, wandb, HuggingFace, Google Drive), and teaching objectives (embeddings, classification, segmentation, diffusion, interpretability).
- Technology stack: Python 3.11, PyTorch, FiftyOne, Docker (Dev Container), Kaggle/Colab, wandb, HuggingFace.

##### Essential architectural elements
- Do not overcrowd: group similar notebooks into a single “Tutorial Notebooks” module, but list key sub-domains (classification, segmentation, embeddings).
- How the Dev Container ensures consistent dependencies.
- Offline artifacts folder as the central data “cache” across tutorials.
- External dependencies clearly to show users what credentials/API tokens they need (HuggingFace, wandb, Google Drive).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Environment
    subgraph "Developer Environment"
        DevContainer["VS Code Dev Container"]:::env
        PythonReq["Python 3.11 + requirements.txt"]:::env
    end

    %% Data Ingestion Layer
    subgraph "Data Ingestion Layer"
        DataModules["src/data_downloaders/"]:::code
        ImageScraping["image_scraping/"]:::code
        ExternalAPIs["Bing, Google Drive, HuggingFace, FiftyOne Zoo"]:::external
    end

    %% Artifacts Store
    Artifacts["Artifacts Store\n(artifacts/)"]:::data

    %% Processing & Tutorials
    subgraph "Processing & Tutorials"
        NotebookCore["notebooks/"]:::notebook
    end

    %% Visualization & Outputs
    subgraph "Visualization & Outputs"
        FiftyOneViz["Visualize & Cluster Embeddings with FiftyOne"]:::notebook
        TensorBoardViz["Visualizing Image Embeddings with TensorBoard"]:::notebook
        FiftyOneApp["FiftyOne App Sessions"]:::external
        TBLogs["TensorBoard Logs"]:::data
    end

    %% Documentation & Slides
    subgraph "Docs & Slides"
        Docs["docs/"]:::docs
        Slides["slides/"]:::slide
    end

    %% Connections
    DevContainer -->|instantiates| DataModules
    DevContainer -->|instantiates| ImageScraping
    DevContainer -->|instantiates| NotebookCore
    PythonReq -->|provides deps to| DataModules
    PythonReq -->|provides deps to| ImageScraping
    PythonReq -->|provides deps to| NotebookCore

    DataModules -->|fetches from| ExternalAPIs
    ImageScraping -->|fetches from| ExternalAPIs
    DataModules -->|writes to| Artifacts
    ImageScraping -->|writes to| Artifacts

    NotebookCore -->|reads from| Artifacts
    NotebookCore -->|calls PyTorch, FiftyOne, wandb| ExternalAPIs
    NotebookCore -->|produces| FiftyOneViz
    NotebookCore -->|produces| TensorBoardViz

    FiftyOneViz -->|launches| FiftyOneApp
    TensorBoardViz -->|generates| TBLogs

    Docs -->|inform| DevContainer
    Docs -->|inform| NotebookCore
    Slides -->|inform| DevContainer
    Slides -->|inform| NotebookCore

    %% Click Events
    click DevContainer "https://github.com/andandandand/practical-computer-vision/blob/main/.devcontainer/devcontainer.json"
    click PythonReq "https://github.com/andandandand/practical-computer-vision/blob/main/requirements.txt"
    click DataModules "https://github.com/andandandand/practical-computer-vision/tree/main/src/data_downloaders/"
    click ImageScraping "https://github.com/andandandand/practical-computer-vision/tree/main/image_scraping/"
    click Artifacts "https://github.com/andandandand/practical-computer-vision/tree/main/artifacts/"
    click NotebookCore "https://github.com/andandandand/practical-computer-vision/tree/main/notebooks/"
    click FiftyOneViz "https://github.com/andandandand/practical-computer-vision/blob/main/notebooks/Visualize_and_Cluster_Embeddings_with_FiftyOne.ipynb"
    click TensorBoardViz "https://github.com/andandandand/practical-computer-vision/blob/main/notebooks/Visualizing_Image_Embeddings_with_Tensorboard.ipynb"
    click Docs "https://github.com/andandandand/practical-computer-vision/tree/main/docs/"
    click Slides "https://github.com/andandandand/practical-computer-vision/tree/main/slides/"

    %% Styles
    classDef env fill:#E8DAEF,stroke:#6C3483
    classDef code fill:#D6EAF8,stroke:#2874A6
    classDef external fill:#FDEDEC,stroke:#C0392B
    classDef data fill:#E9F7EF,stroke:#239B56
    classDef notebook fill:#FEF9E7,stroke:#B7950B
    classDef docs fill:#EBF5FB,stroke:#1F618D
    classDef slide fill:#F9EBEA,stroke:#C0392B
```
