# officialnavneetdas/vision-based-books-recommendation-system--vbbrs- architecture

> Architecture diagram of the GitHub repository officialnavneetdas/vision-based-books-recommendation-system--vbbrs-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-
- Repository: https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-

## Overview

This Streamlit application detects books in either a live webcam stream or an uploaded image. The user selects an input mode and confidence threshold; webcam frames or uploaded images are passed to the cached YOLO detector, then annotated and shown with a book count. The ONNX weights are loaded from the repository’s model file. The source excerpt shows both detection paths and their rendering; no README or other product modules were provided.

Main entry points: [`app.py`](https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py) (Book Detector), [`models/best.onnx`](https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/models/best.onnx) (ONNX Weights)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User Interface"]
  node_controls["Mode Controls<br/>[app.py]"]
  node_live_output["Live Annotation<br/>[app.py]"]
  node_image_output["Image Results<br/>[app.py]"]
end

subgraph group_detection["Detection Runtime"]
  node_frame_processor["Frame Processor<br/>[app.py]"]
  node_model_loader["Model Loader<br/>[app.py]"]
  node_onnx_weights["ONNX Weights<br/>[best.onnx]"]
  node_detector["Book Detector<br/>[app.py]"]
end

subgraph group_inputs["Input Sources"]
  node_webcam["Webcam Session<br/>[app.py]"]
  node_image_upload["Image Upload<br/>[app.py]"]
end

node_user(("User"))

node_user -->|"selects mode"| node_controls
node_controls -->|"starts session"| node_webcam
node_controls -->|"opens upload"| node_image_upload
node_model_loader -->|"loads weights"| node_onnx_weights
node_webcam -->|"dispatches frames"| node_frame_processor
node_frame_processor -->|"runs inference"| node_detector
node_image_upload -->|"runs inference"| node_detector
node_model_loader -->|"creates model"| node_detector
node_frame_processor -->|"returns annotated frame"| node_live_output
node_detector -->|"plots detections"| node_image_output

click node_controls "https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py"
click node_webcam "https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py"
click node_frame_processor "https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py"
click node_image_upload "https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py"
click node_model_loader "https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py"
click node_onnx_weights "https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/models/best.onnx"
click node_detector "https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py"
click node_live_output "https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py"
click node_image_output "https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.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_controls,node_live_output,node_image_output,node_user toneBlue
class node_frame_processor,node_model_loader,node_onnx_weights,node_detector toneAmber
class node_webcam,node_image_upload toneMint
```

## Components

### User Interface

- [Mode Controls](https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py): `app.py`
- [Live Annotation](https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py): `app.py`
- [Image Results](https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py): `app.py`

### Detection Runtime

- [Frame Processor](https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py): `app.py`
- [Model Loader](https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py): `app.py`
- [ONNX Weights](https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/models/best.onnx): `models/best.onnx`
- [Book Detector](https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py): `app.py`

### Input Sources

- [Webcam Session](https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py): `app.py`
- [Image Upload](https://github.com/officialnavneetdas/vision-based-books-recommendation-system--vbbrs-/blob/main/app.py): `app.py`

### Other components

- **User**

## Connections

- User → Mode Controls: selects mode (evidence: `app.py`)
- Mode Controls → Webcam Session: starts session (evidence: `app.py`)
- Mode Controls → Image Upload: opens upload (evidence: `app.py`)
- Model Loader → ONNX Weights: loads weights (evidence: `app.py`)
- Webcam Session → Frame Processor: dispatches frames (evidence: `app.py`)
- Frame Processor → Book Detector: runs inference (evidence: `app.py`)
- Image Upload → Book Detector: runs inference (evidence: `app.py`)
- Model Loader → Book Detector: creates model (evidence: `app.py`)
- Frame Processor → Live Annotation: returns annotated frame (evidence: `app.py`)
- Book Detector → Image Results: plots detections (evidence: `app.py`)
