# dyingangell/cheating-detection-yolo architecture

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

- Interactive diagram: https://gitdiagram.com/dyingangell/cheating-detection-yolo
- Repository: https://github.com/dyingangell/cheating-detection-yolo

## Overview

This repository is a multi-camera exam-proctoring system. Its principal workflow sends camera or replayed-video frames through Redis to an inference worker, which decodes frames and invokes the pose-based engine; results support live monitoring and operator warning review. The graph also preserves documented evidence processing and model-comparison capabilities. Some downstream wiring is described only in the README, so those edges cite it; unsampled implementation details are not inferred.

Main entry points: [`src/newArch.py`](https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/newArch.py) (Proctoring engine), [`src/main.py`](https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/main.py) (Shared frame buffer), [`tools/producer.py`](https://github.com/dyingangell/cheating-detection-yolo/blob/master/tools/producer.py) (Frame producer), [`tools/camerasEmulation.py`](https://github.com/dyingangell/cheating-detection-yolo/blob/master/tools/camerasEmulation.py) (Camera emulation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Frame ingestion"]
  node_camera_emulation["Camera emulation"]
  node_producer["Frame producer<br/>[producer.py]"]
  node_redis["Redis queues"]
  node_worker["Worker and decoder<br/>[worker.py]"]
end

subgraph group_analysis["Pose and warnings"]
  node_engine["Proctoring engine<br/>[newArch.py]"]
  node_shared_memory[("Shared frame buffer<br/>[main.py]")]
end

subgraph group_review["Monitoring and review"]
  node_streamlit["Streamlit dashboard<br/>[streamlit_app.py]"]
  node_desktop["Desktop viewer<br/>[desktop_viewer.py]"]
  node_warnings["Warning review<br/>[warnings_window.py]"]
  node_post_processor["Post-processing view<br/>[post_processor.py]"]
end

subgraph group_support["Evidence and models"]
  node_visualiser["Evidence visualiser<br/>[visualiser.py]"]
  node_training["Model training<br/>[train.py]"]
  node_faster_rcnn["Faster R-CNN comparison"]
end

node_camera_sources(("Cameras and videos"))

node_camera_sources -->|"replays videos"| node_camera_emulation
node_camera_sources -->|"provides streams"| node_producer
node_camera_emulation -.->|"feeds streams"| node_producer
node_producer -->|"pushes frames"| node_redis
node_redis -->|"supplies batches"| node_worker
node_worker -->|"processes batches"| node_engine
node_engine -->|"uses frame buffer"| node_shared_memory
node_engine -->|"provides results"| node_streamlit
node_engine -->|"provides results"| node_desktop
node_engine -->|"provides results"| node_post_processor
node_engine -->|"emits warnings"| node_redis
node_redis -->|"delivers warnings"| node_warnings
node_redis -->|"supplies display data"| node_desktop
node_redis -->|"supplies frames"| node_streamlit
node_shared_memory -->|"stores frames"| node_post_processor
node_shared_memory -->|"stores frames"| node_visualiser
node_engine -->|"supports evidence review"| node_visualiser
node_training -.->|"trains pose models"| node_engine
node_faster_rcnn -->|"compares models"| node_engine

click node_camera_emulation "https://github.com/dyingangell/cheating-detection-yolo/blob/master/tools/camerasEmulation.py"
click node_producer "https://github.com/dyingangell/cheating-detection-yolo/blob/master/tools/producer.py"
click node_worker "https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/worker.py"
click node_engine "https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/newArch.py"
click node_shared_memory "https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/main.py"
click node_streamlit "https://github.com/dyingangell/cheating-detection-yolo/blob/master/apps/streamlit_app.py"
click node_desktop "https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/desktop_viewer.py"
click node_warnings "https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/warnings_window.py"
click node_post_processor "https://github.com/dyingangell/cheating-detection-yolo/blob/master/tools/post_processor.py"
click node_visualiser "https://github.com/dyingangell/cheating-detection-yolo/blob/master/tools/visualiser.py"
click node_training "https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/train.py"
click node_faster_rcnn "https://github.com/dyingangell/cheating-detection-yolo/blob/master/experiments/second_main_faster-rcnn.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_camera_emulation,node_producer,node_redis,node_worker toneBlue
class node_engine,node_shared_memory toneAmber
class node_streamlit,node_desktop,node_warnings,node_post_processor toneMint
class node_visualiser,node_training,node_faster_rcnn toneRose
class node_camera_sources toneIndigo
```

## Components

### Frame ingestion

- [Camera emulation](https://github.com/dyingangell/cheating-detection-yolo/blob/master/tools/camerasEmulation.py): `tools/camerasEmulation.py`
- [Frame producer](https://github.com/dyingangell/cheating-detection-yolo/blob/master/tools/producer.py): `tools/producer.py`
- **Redis queues**
- [Worker and decoder](https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/worker.py): `src/worker.py`

### Pose and warnings

- [Proctoring engine](https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/newArch.py): `src/newArch.py`
- [Shared frame buffer](https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/main.py): `src/main.py`

### Monitoring and review

- [Streamlit dashboard](https://github.com/dyingangell/cheating-detection-yolo/blob/master/apps/streamlit_app.py): `apps/streamlit_app.py`
- [Desktop viewer](https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/desktop_viewer.py): `src/desktop_viewer.py`
- [Warning review](https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/warnings_window.py): `src/warnings_window.py`
- [Post-processing view](https://github.com/dyingangell/cheating-detection-yolo/blob/master/tools/post_processor.py): `tools/post_processor.py`

### Evidence and models

- [Evidence visualiser](https://github.com/dyingangell/cheating-detection-yolo/blob/master/tools/visualiser.py): `tools/visualiser.py`
- [Model training](https://github.com/dyingangell/cheating-detection-yolo/blob/master/src/train.py): `src/train.py`
- [Faster R-CNN comparison](https://github.com/dyingangell/cheating-detection-yolo/blob/master/experiments/second_main_faster-rcnn.py): `experiments/second_main_faster-rcnn.py`

### Other components

- **Cameras and videos**

## Connections

- Cameras and videos → Camera emulation: replays videos (evidence: `README`)
- Cameras and videos → Frame producer: provides streams (evidence: `README`)
- Camera emulation → Frame producer: feeds streams
- Frame producer → Redis queues: pushes frames (evidence: `tools/producer.py`)
- Redis queues → Worker and decoder: supplies batches (evidence: `src/worker.py`)
- Worker and decoder → Proctoring engine: processes batches (evidence: `src/worker.py`)
- Proctoring engine → Shared frame buffer: uses frame buffer (evidence: `src/newArch.py`)
- Proctoring engine → Streamlit dashboard: provides results (evidence: `README`)
- Proctoring engine → Desktop viewer: provides results (evidence: `README`)
- Proctoring engine → Post-processing view: provides results (evidence: `README`)
- Proctoring engine → Redis queues: emits warnings (evidence: `README`)
- Redis queues → Warning review: delivers warnings (evidence: `src/warnings_window.py`)
- Redis queues → Desktop viewer: supplies display data (evidence: `src/desktop_viewer.py`)
- Redis queues → Streamlit dashboard: supplies frames (evidence: `apps/streamlit_app.py`)
- Shared frame buffer → Post-processing view: stores frames (evidence: `tools/post_processor.py`)
- Shared frame buffer → Evidence visualiser: stores frames (evidence: `tools/visualiser.py`)
- Proctoring engine → Evidence visualiser: supports evidence review (evidence: `README`)
- Model training → Proctoring engine: trains pose models
- Faster R-CNN comparison → Proctoring engine: compares models (evidence: `README`)
