# sanikapatil2007/mosquito_wingbeat_final_model- architecture

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

- Interactive diagram: https://gitdiagram.com/sanikapatil2007/mosquito_wingbeat_final_model-
- Repository: https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-

## Overview

This repository provides audio-based mosquito detection followed by species classification. The documented-in-code command-line workflow accepts an audio file, preprocesses it into a normalized mel spectrogram, runs the mosquito detector, and classifies species only when a mosquito is detected. The tree also contains TensorFlow Lite model artifacts under raspberry_pi/models, but no sampled Raspberry Pi runtime code shows how they are used; those artifacts are therefore shown without inferred connections.

Main entry points: [`predict.py`](https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/predict.py) (Prediction CLI), [`mosquito_detector.keras`](https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/mosquito_detector.keras) (Mosquito detector), [`species_classifier.keras`](https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/species_classifier.keras) (Species classifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inference["Audio inference"]
  node_cli["Prediction CLI<br/>[predict.py]"]
  node_preprocessing["Audio preprocessing<br/>[predict.py]"]
end

subgraph group_models["Keras models"]
  node_detector["Mosquito detector"]
  node_classifier["Species classifier"]
end

subgraph group_pi_artifacts["Pi model artifacts"]
  node_pi_detector["Pi detector model"]
  node_pi_classifier["Pi species model"]
end

node_user(("Audio-file user"))

node_user -->|"provides audio"| node_cli
node_cli -->|"prepares input"| node_preprocessing
node_cli -->|"runs detection"| node_detector
node_cli -->|"classifies positive"| node_classifier

click node_cli "https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/predict.py"
click node_preprocessing "https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/predict.py"
click node_detector "https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/mosquito_detector.keras"
click node_classifier "https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/species_classifier.keras"
click node_pi_detector "https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/raspberry_pi/models/mosquito_detector.tflite"
click node_pi_classifier "https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/raspberry_pi/models/species_classifier.tflite"

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_cli,node_preprocessing,node_user toneBlue
class node_detector,node_classifier toneAmber
class node_pi_detector,node_pi_classifier toneMint
```

## Components

### Audio inference

- [Prediction CLI](https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/predict.py): `predict.py`
- [Audio preprocessing](https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/predict.py): `predict.py`

### Keras models

- [Mosquito detector](https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/mosquito_detector.keras): `mosquito_detector.keras`
- [Species classifier](https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/species_classifier.keras): `species_classifier.keras`

### Pi model artifacts

- [Pi detector model](https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/raspberry_pi/models/mosquito_detector.tflite): `raspberry_pi/models/mosquito_detector.tflite`
- [Pi species model](https://github.com/sanikapatil2007/mosquito_wingbeat_final_model-/blob/main/raspberry_pi/models/species_classifier.tflite): `raspberry_pi/models/species_classifier.tflite`

### Other components

- **Audio-file user**

## Connections

- Audio-file user → Prediction CLI: provides audio (evidence: `predict.py`)
- Prediction CLI → Audio preprocessing: prepares input (evidence: `predict.py`)
- Prediction CLI → Mosquito detector: runs detection (evidence: `predict.py`)
- Prediction CLI → Species classifier: classifies positive (evidence: `predict.py`)
