# milwinantany/detecting-abandoned-bags-using-yolo architecture

> Architecture diagram of the GitHub repository milwinantany/detecting-abandoned-bags-using-yolo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/milwinantany/detecting-abandoned-bags-using-yolo
- Repository: https://github.com/milwinantany/detecting-abandoned-bags-using-yolo

## Overview

This repository contains two partially separate computer-vision applications: a Tkinter luggage detector and a Flask crack-detection web app. In the desktop workflow, an operator chooses image or camera input, YOLO detects objects, and the camera path triggers alerts after a frame-count threshold. In the web workflow, users register or log in, then start camera prediction; detected cracks produce an image, sound, email, and SMS. README claims broader unattended-bag tracking and CCTV integrations, but the sampled code does not show those behaviors; training is a separate entry point. Connections reflect only the sampled source and README.

Main entry points: [`Main.py`](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py) (Frame Threshold), [`app.py`](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py) (Detection Threshold)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop Luggage Detector"]
  node_tkui["Tkinter UI<br/>[Main.py]"]
  node_imageinput["Image Input<br/>[Main.py]"]
  node_livecamera["Live Camera<br/>[Main.py]"]
  node_luggagemodel["Luggage YOLO<br/>[Main.py]"]
  node_threshold["Frame Threshold<br/>[Main.py]"]
  node_alertimage["Alert Image<br/>[Main.py]"]
end

subgraph group_web["Web Crack Detection"]
  node_flaskapp["Flask Routes<br/>[app.py]"]
  node_accounts["Account Access<br/>[app.py]"]
  node_userstore[("Registration Store<br/>[app.py]")]
  node_webcamera["Web Camera<br/>[app.py]"]
  node_crackmodel["Crack YOLO<br/>[app.py]"]
  node_crackthreshold["Detection Threshold<br/>[app.py]"]
  node_crackimage["Alert Image<br/>[app.py]"]
end

subgraph group_training["Model Training"]
  node_trainingentry["YOLO Training<br/>[NewTra.py]"]
end

subgraph group_services["Alert Services"]
  node_emailservice["Email Service"]
  node_smsservice["SMS Service"]
  node_sound["Audio Alert<br/>[Main.py]"]
  node_websound["Audio Alert<br/>[app.py]"]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_tkui
node_tkui -->|"selects"| node_imageinput
node_tkui -->|"starts"| node_livecamera
node_imageinput -->|"runs inference"| node_luggagemodel
node_livecamera -->|"runs inference"| node_luggagemodel
node_livecamera -->|"counts luggage frames"| node_threshold
node_threshold -->|"writes image"| node_alertimage
node_threshold -->|"plays"| node_sound
node_threshold -->|"sends email"| node_emailservice
node_threshold -->|"sends SMS"| node_smsservice
node_operator -->|"uses"| node_flaskapp
node_flaskapp -->|"routes requests"| node_accounts
node_accounts -->|"reads and writes"| node_userstore
node_flaskapp -->|"starts prediction"| node_webcamera
node_webcamera -->|"runs inference"| node_crackmodel
node_webcamera -->|"counts crack detections"| node_crackthreshold
node_crackthreshold -->|"writes image"| node_crackimage
node_crackthreshold -->|"plays"| node_websound
node_crackthreshold -->|"sends email"| node_emailservice
node_crackthreshold -->|"sends SMS"| node_smsservice

click node_tkui "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py"
click node_imageinput "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py"
click node_livecamera "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py"
click node_luggagemodel "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py"
click node_threshold "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py"
click node_alertimage "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py"
click node_flaskapp "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py"
click node_accounts "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py"
click node_userstore "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py"
click node_webcamera "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py"
click node_crackmodel "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py"
click node_crackthreshold "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py"
click node_crackimage "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py"
click node_trainingentry "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/NewTra.py"
click node_sound "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py"
click node_websound "https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/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_tkui,node_imageinput,node_livecamera,node_luggagemodel,node_threshold,node_alertimage toneBlue
class node_flaskapp,node_accounts,node_userstore,node_webcamera,node_crackmodel,node_crackthreshold,node_crackimage toneAmber
class node_trainingentry toneMint
class node_emailservice,node_smsservice,node_sound,node_websound toneRose
class node_operator toneIndigo
```

## Components

### Desktop Luggage Detector

- [Tkinter UI](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py): `Main.py`
- [Image Input](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py): `Main.py`
- [Live Camera](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py): `Main.py`
- [Luggage YOLO](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py): `Main.py`
- [Frame Threshold](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py): `Main.py`
- [Alert Image](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py): `Main.py`

### Web Crack Detection

- [Flask Routes](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py): `app.py`
- [Account Access](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py): `app.py`
- [Registration Store](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py): `app.py`
- [Web Camera](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py): `app.py`
- [Crack YOLO](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py): `app.py`
- [Detection Threshold](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py): `app.py`
- [Alert Image](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py): `app.py`

### Model Training

- [YOLO Training](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/NewTra.py): `NewTra.py`

### Alert Services

- **Email Service**
- **SMS Service**
- [Audio Alert](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/Main.py): `Main.py`
- [Audio Alert](https://github.com/milwinantany/detecting-abandoned-bags-using-yolo/blob/main/app.py): `app.py`

### Other components

- **Operator**

## Connections

- Operator → Tkinter UI: uses (evidence: `Main.py`)
- Tkinter UI → Image Input: selects (evidence: `Main.py`)
- Tkinter UI → Live Camera: starts (evidence: `Main.py`)
- Image Input → Luggage YOLO: runs inference (evidence: `Main.py`)
- Live Camera → Luggage YOLO: runs inference (evidence: `Main.py`)
- Live Camera → Frame Threshold: counts luggage frames (evidence: `Main.py`)
- Frame Threshold → Alert Image: writes image (evidence: `Main.py`)
- Frame Threshold → Audio Alert: plays (evidence: `Main.py`)
- Frame Threshold → Email Service: sends email (evidence: `Main.py`)
- Frame Threshold → SMS Service: sends SMS (evidence: `Main.py`)
- Operator → Flask Routes: uses (evidence: `app.py`)
- Flask Routes → Account Access: routes requests (evidence: `app.py`)
- Account Access → Registration Store: reads and writes (evidence: `app.py`)
- Flask Routes → Web Camera: starts prediction (evidence: `app.py`)
- Web Camera → Crack YOLO: runs inference (evidence: `app.py`)
- Web Camera → Detection Threshold: counts crack detections (evidence: `app.py`)
- Detection Threshold → Alert Image: writes image (evidence: `app.py`)
- Detection Threshold → Audio Alert: plays (evidence: `app.py`)
- Detection Threshold → Email Service: sends email (evidence: `app.py`)
- Detection Threshold → SMS Service: sends SMS (evidence: `app.py`)
