# spmallick/learnopencv architecture

> Architecture diagram of the GitHub repository spmallick/learnopencv, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/spmallick/learnopencv
- Repository: https://github.com/spmallick/learnopencv

## Overview

LearnOpenCV is a repository of independent computer-vision and AI article examples, not one integrated application. Its user-to-result workflows therefore begin separately: for example, stereo inputs are evaluated or trained into disparity predictions, while document images are transformed into scans and images or videos are processed by detection demos. The graph highlights sampled workflows and representative 3D code. Edges are limited to excerpted calls or SOURCE INDEX references; unsampled projects are not treated as connected merely because they share the repository.

Main entry points: [`ADAS-Stereo-Vision/utilities/foward_pass.py`](https://github.com/spmallick/learnopencv/blob/master/ADAS-Stereo-Vision/utilities/foward_pass.py) (Forward pass), [`ADAS-Stereo-Vision/main.py`](https://github.com/spmallick/learnopencv/blob/master/ADAS-Stereo-Vision/main.py) (Train or evaluate), [`Integrating-Gradio-with-OpenCV-DNN/app.py`](https://github.com/spmallick/learnopencv/blob/master/Integrating-Gradio-with-OpenCV-DNN/app.py) (Image/video demo), [`ADAS-Stereo-Vision/module/sttr.py`](https://github.com/spmallick/learnopencv/blob/master/ADAS-Stereo-Vision/module/sttr.py) (STTR model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_stereo["Stereo Vision"]
  node_stereo_cli["Train or evaluate<br/>[main.py]"]
  node_sttr["STTR model<br/>[sttr.py]"]
  node_stereo_layers["Feature and regression layers"]
  node_stereo_pass["Forward pass<br/>[foward_pass.py]"]
  node_stereo_misc["Tensor utilities<br/>[misc.py]"]
  node_stereo_loss["Disparity losses<br/>[loss.py]"]
  node_stereo_data["Stereo datasets"]
end

subgraph group_detection["Detection Demos"]
  node_detection_ui["Image/video demo<br/>[app.py]"]
  node_mobilenet["MobileNet detector<br/>[mbnet.py]"]
  node_yolo["YOLOv3 detector<br/>[yolov3.py]"]
  node_retinanet_ui["RetinaNet inference<br/>[app.py]"]
  node_lidar_demo["LiDAR demo<br/>[demo_front.py]"]
  node_lidar_train["LiDAR training<br/>[train.py]"]
end

subgraph group_scanning["Document Scanning"]
  node_semantic_scan["Semantic scan app<br/>[app.py]"]
  node_classic_scan["Classical scan app<br/>[app.py]"]
end

subgraph group_reconstruction["3D Reconstruction"]
  node_slam_runner["Visual odometry runner<br/>[main.py]"]
  node_gsplat_api["Gaussian splatting<br/>[rendering.py]"]
end

node_engineer(("Engineer or learner"))

node_engineer -->|"runs"| node_stereo_cli
node_stereo_cli -->|"builds"| node_sttr
node_stereo_cli -->|"trains or evaluates"| node_stereo_pass
node_stereo_pass -->|"runs model"| node_sttr
node_stereo_pass -->|"uses tensor type"| node_stereo_misc
node_stereo_pass -->|"computes loss"| node_stereo_loss
node_sttr -->|"uses model layers"| node_stereo_layers
node_engineer -->|"uploads media"| node_detection_ui
node_detection_ui -->|"dispatches to"| node_mobilenet
node_detection_ui -->|"dispatches to"| node_yolo
node_engineer -.->|"submits media"| node_retinanet_ui
node_engineer -.->|"provides document"| node_semantic_scan
node_engineer -.->|"provides document"| node_classic_scan
node_engineer -->|"provides video"| node_slam_runner
node_engineer -.->|"uses library"| node_gsplat_api
node_engineer -.->|"runs demo"| node_lidar_demo
node_engineer -.->|"trains model"| node_lidar_train

click node_stereo_cli "https://github.com/spmallick/learnopencv/blob/master/ADAS-Stereo-Vision/main.py"
click node_sttr "https://github.com/spmallick/learnopencv/blob/master/ADAS-Stereo-Vision/module/sttr.py"
click node_stereo_layers "https://github.com/spmallick/learnopencv/tree/master/ADAS-Stereo-Vision/module"
click node_stereo_pass "https://github.com/spmallick/learnopencv/blob/master/ADAS-Stereo-Vision/utilities/foward_pass.py"
click node_stereo_misc "https://github.com/spmallick/learnopencv/blob/master/ADAS-Stereo-Vision/utilities/misc.py"
click node_stereo_loss "https://github.com/spmallick/learnopencv/blob/master/ADAS-Stereo-Vision/module/loss.py"
click node_stereo_data "https://github.com/spmallick/learnopencv/tree/master/ADAS-Stereo-Vision/dataset"
click node_detection_ui "https://github.com/spmallick/learnopencv/blob/master/Integrating-Gradio-with-OpenCV-DNN/app.py"
click node_mobilenet "https://github.com/spmallick/learnopencv/blob/master/Integrating-Gradio-with-OpenCV-DNN/mbnet.py"
click node_yolo "https://github.com/spmallick/learnopencv/blob/master/Integrating-Gradio-with-OpenCV-DNN/yolov3.py"
click node_retinanet_ui "https://github.com/spmallick/learnopencv/blob/master/finetuning-retinanet/app.py"
click node_semantic_scan "https://github.com/spmallick/learnopencv/blob/master/Document-Scanner-Custom-Semantic-Segmentation-using-PyTorch-DeepLabV3/app.py"
click node_classic_scan "https://github.com/spmallick/learnopencv/blob/master/Automatic-Document-Scanner/app.py"
click node_slam_runner "https://github.com/spmallick/learnopencv/blob/master/Monocular%20SLAM%20for%20Robotics%20implementation%20in%20python/main.py"
click node_gsplat_api "https://github.com/spmallick/learnopencv/blob/master/3D-Gaussian-Splatting-Code/gsplat/gsplat/rendering.py"
click node_lidar_demo "https://github.com/spmallick/learnopencv/blob/master/3D-LiDAR-Object-Detection/sfa/demo_front.py"
click node_lidar_train "https://github.com/spmallick/learnopencv/blob/master/3D-LiDAR-Object-Detection/sfa/train.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_stereo_cli,node_sttr,node_stereo_layers,node_stereo_pass,node_stereo_misc,node_stereo_loss,node_stereo_data toneBlue
class node_detection_ui,node_mobilenet,node_yolo,node_retinanet_ui,node_lidar_demo,node_lidar_train toneAmber
class node_semantic_scan,node_classic_scan toneMint
class node_slam_runner,node_gsplat_api toneRose
class node_engineer toneIndigo
```

## Components

### Stereo Vision

- [Train or evaluate](https://github.com/spmallick/learnopencv/blob/master/ADAS-Stereo-Vision/main.py): `ADAS-Stereo-Vision/main.py`
- [STTR model](https://github.com/spmallick/learnopencv/blob/master/ADAS-Stereo-Vision/module/sttr.py): `ADAS-Stereo-Vision/module/sttr.py`
- [Feature and regression layers](https://github.com/spmallick/learnopencv/tree/master/ADAS-Stereo-Vision/module): `ADAS-Stereo-Vision/module`
- [Forward pass](https://github.com/spmallick/learnopencv/blob/master/ADAS-Stereo-Vision/utilities/foward_pass.py): `ADAS-Stereo-Vision/utilities/foward_pass.py`
- [Tensor utilities](https://github.com/spmallick/learnopencv/blob/master/ADAS-Stereo-Vision/utilities/misc.py): `ADAS-Stereo-Vision/utilities/misc.py`
- [Disparity losses](https://github.com/spmallick/learnopencv/blob/master/ADAS-Stereo-Vision/module/loss.py): `ADAS-Stereo-Vision/module/loss.py`
- [Stereo datasets](https://github.com/spmallick/learnopencv/tree/master/ADAS-Stereo-Vision/dataset): `ADAS-Stereo-Vision/dataset`

### Detection Demos

- [Image/video demo](https://github.com/spmallick/learnopencv/blob/master/Integrating-Gradio-with-OpenCV-DNN/app.py): `Integrating-Gradio-with-OpenCV-DNN/app.py`
- [MobileNet detector](https://github.com/spmallick/learnopencv/blob/master/Integrating-Gradio-with-OpenCV-DNN/mbnet.py): `Integrating-Gradio-with-OpenCV-DNN/mbnet.py`
- [YOLOv3 detector](https://github.com/spmallick/learnopencv/blob/master/Integrating-Gradio-with-OpenCV-DNN/yolov3.py): `Integrating-Gradio-with-OpenCV-DNN/yolov3.py`
- [RetinaNet inference](https://github.com/spmallick/learnopencv/blob/master/finetuning-retinanet/app.py): `finetuning-retinanet/app.py`
- [LiDAR demo](https://github.com/spmallick/learnopencv/blob/master/3D-LiDAR-Object-Detection/sfa/demo_front.py): `3D-LiDAR-Object-Detection/sfa/demo_front.py`
- [LiDAR training](https://github.com/spmallick/learnopencv/blob/master/3D-LiDAR-Object-Detection/sfa/train.py): `3D-LiDAR-Object-Detection/sfa/train.py`

### Document Scanning

- [Semantic scan app](https://github.com/spmallick/learnopencv/blob/master/Document-Scanner-Custom-Semantic-Segmentation-using-PyTorch-DeepLabV3/app.py): `Document-Scanner-Custom-Semantic-Segmentation-using-PyTorch-DeepLabV3/app.py`
- [Classical scan app](https://github.com/spmallick/learnopencv/blob/master/Automatic-Document-Scanner/app.py): `Automatic-Document-Scanner/app.py`

### 3D Reconstruction

- [Visual odometry runner](https://github.com/spmallick/learnopencv/blob/master/Monocular%20SLAM%20for%20Robotics%20implementation%20in%20python/main.py): `Monocular SLAM for Robotics implementation in python/main.py`
- [Gaussian splatting](https://github.com/spmallick/learnopencv/blob/master/3D-Gaussian-Splatting-Code/gsplat/gsplat/rendering.py): `3D-Gaussian-Splatting-Code/gsplat/gsplat/rendering.py`

### Other components

- **Engineer or learner**

## Connections

- Engineer or learner → Train or evaluate: runs (evidence: `ADAS-Stereo-Vision/main.py`)
- Train or evaluate → STTR model: builds (evidence: `ADAS-Stereo-Vision/main.py`)
- Train or evaluate → Forward pass: trains or evaluates (evidence: `ADAS-Stereo-Vision/main.py`)
- Forward pass → STTR model: runs model (evidence: `ADAS-Stereo-Vision/utilities/foward_pass.py`)
- Forward pass → Tensor utilities: uses tensor type (evidence: `ADAS-Stereo-Vision/utilities/foward_pass.py`)
- Forward pass → Disparity losses: computes loss (evidence: `ADAS-Stereo-Vision/utilities/foward_pass.py`)
- STTR model → Feature and regression layers: uses model layers (evidence: `ADAS-Stereo-Vision/module/sttr.py`)
- Engineer or learner → Image/video demo: uploads media (evidence: `Integrating-Gradio-with-OpenCV-DNN/app.py`)
- Image/video demo → MobileNet detector: dispatches to (evidence: `Integrating-Gradio-with-OpenCV-DNN/app.py`)
- Image/video demo → YOLOv3 detector: dispatches to (evidence: `Integrating-Gradio-with-OpenCV-DNN/app.py`)
- Engineer or learner → RetinaNet inference: submits media
- Engineer or learner → Semantic scan app: provides document
- Engineer or learner → Classical scan app: provides document
- Engineer or learner → Visual odometry runner: provides video (evidence: `Monocular SLAM for Robotics implementation in python/main.py`)
- Engineer or learner → Gaussian splatting: uses library
- Engineer or learner → LiDAR demo: runs demo
- Engineer or learner → LiDAR training: trains model
