# π Darija AI Translator
## π Description
**Darija AI Translator** is a full-stack AI-powered web application that translates Moroccan Darija into English using Deep Learning models.
This project includes:
- π§Ή Cleaned and preprocessed datasets
- π€ AI training experiments (Google Colab)
- π Flask web application
- ποΈ Speech, text, and image translation modules
π **Google Colab Notebook (Training & Experiments):**
colab.research.google.com
---
## β οΈ Important Note
This project is large and includes:
- Datasets (DODa, MADAR)
- Model checkpoints
- OCR + Whisper assets
---
## ποΈ Architecture
```text
User
β
βΌ
Flask Frontend
β
βΌ
Flask Backend
β
βββ Authentication
βββ Translation Service
βββ OCR Service
βββ Speech Service
β
βΌ
AI Layer
βββ Transformer Models
βββ Whisper
βββ EasyOCR
β
βΌ
MySQL Database
```
---
## π€ AI Models
### Transformer Models
#### Latin Darija β English
```python
Helsinki-NLP/opus-mt-mul-en
```
#### Arabic Darija β English
```python
Helsinki-NLP/opus-mt-ar-en
```
### Baseline Model
```python
Custom Seq2Seq LSTM
(PyTorch)
```
---
## π Dataset
### Sources
#### MADAR Corpus
Arabic dialect parallel corpus.
#### DODa (Darija Open Dataset)
```text
86,000+ sentence pairs
Darija (Latin)
Darija (Arabic)
English
```
---
## π οΈ Tech Stack
### Backend
```text
Python
Flask
SQLAlchemy
MySQL
```
### AI & NLP
```text
PyTorch
Transformers
Hugging Face
Whisper
EasyOCR
```
### Frontend
```text
HTML5
CSS3
Bootstrap 5
JavaScript
```
---
## π Results
### Transformer
| Metric | Value |
|----------|----------|
| Training Loss | 0.0464 |
| Validation Loss | 0.0604 |
| Translation Quality | Excellent |
### LSTM
| Metric | Value |
|----------|----------|
| Training Loss | 1.68 |
| Validation Loss | 5.32 |
| Translation Quality | Limited |
---
## π― Features β¦