Skip to content

Commit 83f1944

Browse files
authored
Merge branch 'main' into feature/rkatakol/ibvs_reverse_proxy
2 parents a51eb00 + 0361a66 commit 83f1944

File tree

86 files changed

+1781
-54693
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1781
-54693
lines changed

.github/CODEOWNERS

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ README.md @xwu2intel
1414
/manufacturing-ai-suite/weld-porosity/ @ajagadi1 @sugnanprabhu @rrajore @xwu2intel
1515

1616
# metro-ai
17-
/metro-ai-suite/ @rrajore @vagheshp @ArokiEdgard @xwu2intel
18-
/metro-ai-suite/image-based-video-search/ @rrajore @vagheshp @ArokiEdgard @rohitkatakol @xwu2intel
17+
/metro-ai-suite/ @rrajore @vagheshp @ArokiEdgard @xwu2intel @ajagadi1
18+
/metro-ai-suite/image-based-video-search/ @rrajore @vagheshp @ArokiEdgard @rohitkatakol @xwu2intel @ajagadi1
1919
/metro-ai-suite/interactive-digital-avatar/ @senhui2intel @Junyu-B @wzq112358 @myqi @xwu2intel
2020

21-
/metro-ai-suite/metro-vision-ai-app-recipe/loitering-detection/ @vagheshp @tjanczak @xwu2intel
21+
/metro-ai-suite/metro-vision-ai-app-recipe/loitering-detection/ @vagheshp @tjanczak @xwu2intel @ajagadi1 @rrajore
2222
/metro-ai-suite/metro-vision-ai-app-recipe/smart-intersection/ @saratpoluri @sarthakdeva-intel @xwu2intel
23-
/metro-ai-suite/metro-vision-ai-app-recipe/smart-parking/ @vagheshp @tjanczak @xwu2intel
23+
/metro-ai-suite/metro-vision-ai-app-recipe/smart-parking/ @vagheshp @tjanczak @xwu2intel @ajagadi1 @rrajore
2424

2525
/metro-ai-suite/sensor-fusion-for-traffic-management/ @lijiunderstand @chaofanchen-intel @thegreatchaos @xwu2intel
2626
/metro-ai-suite/smart-nvr/ @bharagha @yogeshmpandey @bhardwaj-nakul @xwu2intel
@@ -52,18 +52,18 @@ README.md @xwu2intel
5252

5353

5454
# documentation content - metro-ai
55-
/metro-ai-suite/README.md @rrajore @vagheshp @ArokiEdgard @xwu2intel @open-edge-platform/open-edge-platform-docs-write
56-
/metro-ai-suite/image-based-video-search/docs/ @rrajore @vagheshp @ArokiEdgard @rohitkatakol @xwu2intel @open-edge-platform/open-edge-platform-docs-write
57-
/metro-ai-suite/image-based-video-search/README.md @rrajore @vagheshp @ArokiEdgard @rohitkatakol @xwu2intel @open-edge-platform/open-edge-platform-docs-write
55+
/metro-ai-suite/README.md @rrajore @vagheshp @ArokiEdgard @xwu2intel @ajagadi1 @open-edge-platform/open-edge-platform-docs-write
56+
/metro-ai-suite/image-based-video-search/docs/ @rrajore @vagheshp @ArokiEdgard @rohitkatakol @xwu2intel @ajagadi1 @open-edge-platform/open-edge-platform-docs-write
57+
/metro-ai-suite/image-based-video-search/README.md @rrajore @vagheshp @ArokiEdgard @rohitkatakol @xwu2intel @ajagadi1 @open-edge-platform/open-edge-platform-docs-write
5858
/metro-ai-suite/interactive-digital-avatar/docs/ @senhui2intel @Junyu-B @wzq112358 @myqi @xwu2intel @open-edge-platform/open-edge-platform-docs-write
5959
/metro-ai-suite/interactive-digital-avatar/README.md @senhui2intel @Junyu-B @wzq112358 @myqi @xwu2intel @open-edge-platform/open-edge-platform-docs-write
6060

61-
/metro-ai-suite/metro-vision-ai-app-recipe/loitering-detection/docs/ @vagheshp @tjanczak @xwu2intel @open-edge-platform/open-edge-platform-docs-write
62-
/metro-ai-suite/metro-vision-ai-app-recipe/loitering-detection/README.md @vagheshp @tjanczak @xwu2intel @open-edge-platform/open-edge-platform-docs-write
63-
/metro-ai-suite/metro-vision-ai-app-recipe/smart-intersection/docs/ @saratpoluri @sarthakdeva-intel @xwu2intel @open-edge-platform/open-edge-platform-docs-write
64-
/metro-ai-suite/metro-vision-ai-app-recipe/smart-intersection/README.md @saratpoluri @sarthakdeva-intel @xwu2intel @open-edge-platform/open-edge-platform-docs-write
65-
/metro-ai-suite/metro-vision-ai-app-recipe/smart-parking/docs/ @vagheshp @tjanczak @xwu2intel @open-edge-platform/open-edge-platform-docs-write
66-
/metro-ai-suite/metro-vision-ai-app-recipe/smart-parking/README.md @vagheshp @tjanczak @xwu2intel @open-edge-platform/open-edge-platform-docs-write
61+
/metro-ai-suite/metro-vision-ai-app-recipe/loitering-detection/docs/ @vagheshp @tjanczak @xwu2intel @ajagadi1 @rrajore @open-edge-platform/open-edge-platform-docs-write
62+
/metro-ai-suite/metro-vision-ai-app-recipe/loitering-detection/README.md @vagheshp @tjanczak @xwu2intel @ajagadi1 @rrajore @open-edge-platform/open-edge-platform-docs-write
63+
/metro-ai-suite/metro-vision-ai-app-recipe/smart-intersection/docs/ @saratpoluri @sarthakdeva-intel @xwu2intel @ajagadi1 @rrajore @open-edge-platform/open-edge-platform-docs-write
64+
/metro-ai-suite/metro-vision-ai-app-recipe/smart-intersection/README.md @saratpoluri @sarthakdeva-intel @xwu2intel @ajagadi1 @rrajore @open-edge-platform/open-edge-platform-docs-write
65+
/metro-ai-suite/metro-vision-ai-app-recipe/smart-parking/docs/ @vagheshp @tjanczak @xwu2intel @ajagadi1 @rrajore @open-edge-platform/open-edge-platform-docs-write
66+
/metro-ai-suite/metro-vision-ai-app-recipe/smart-parking/README.md @vagheshp @tjanczak @xwu2intel @ajagadi1 @rrajore @open-edge-platform/open-edge-platform-docs-write
6767

6868
/metro-ai-suite/sensor-fusion-for-traffic-management/docs/ @lijiunderstand @chaofanchen-intel @thegreatchaos @xwu2intel @open-edge-platform/open-edge-platform-docs-write
6969
/metro-ai-suite/sensor-fusion-for-traffic-management/README.md @lijiunderstand @chaofanchen-intel @thegreatchaos @xwu2intel @open-edge-platform/open-edge-platform-docs-write

education-ai-suite/smart-classroom/README.md

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ The goal is to transform raw classroom recordings into concise, structured summa
1414
### 💻 System Requirements
1515

1616
- **OS:** Windows 11
17-
- **Processor:** Intel® Meteor Lake (with integrated GPU support)
17+
- **Processor:** Intel® Core Ultra Series 1 (with integrated GPU support)
1818
- **Memory:** 32 GB RAM (minimum recommended)
1919
- **Storage:** At least 50 GB free (for models and logs)
20-
- **GPU/Accelerator:** Intel® iGPU (Meteor Lake, Arc GPU, or higher) for summarization acceleration
20+
- **GPU/Accelerator:** Intel® iGPU (Intel® Core Ultra Series 1, Arc GPU, or higher) for summarization acceleration
2121
- **Python:** 3.12 or above
2222
- **Node.js:** v18+ (for frontend)
2323
---
@@ -29,7 +29,7 @@ The goal is to transform raw classroom recordings into concise, structured summa
2929
- Runs on **CPU** (Whisper is CPU-centric)
3030
- **FunASR (Paraformer)**
3131
- Recommended for **Chinese transcription** (`paraformer-zh`)
32-
- ✅ Supports transcription of audio files up to 45 minutes
32+
- ✅ Supports transcription of audio files up to 45 minutes in mp3 and wav formats
3333

3434
#### 🧠 Summarization (LLMs)
3535
- **Qwen Models (OpenVINO / IPEX)**
@@ -50,20 +50,54 @@ The goal is to transform raw classroom recordings into concise, structured summa
5050

5151
**a. Install [FFmpeg](https://ffmpeg.org/download.html)** (required for audio processing):
5252

53-
* On **Windows**:
53+
- On **Windows**:
5454
Download from [https://ffmpeg.org/download.html](https://ffmpeg.org/download.html), and add the `ffmpeg/bin` folder to your system `PATH`.
55+
---
56+
57+
**Run your shell with admin privileges before starting the application**
5558

56-
**b. Install Python dependencies:**
59+
**b. Clone Repository:**
5760

5861
```bash
62+
git clone --no-checkout https://github.com/open-edge-platform/edge-ai-suites.git
63+
cd edge-ai-suites
64+
git sparse-checkout init --cone
65+
git sparse-checkout set education-ai-suite
66+
git checkout
67+
cd education-ai-suite
68+
```
69+
---
70+
71+
**c. Install Python dependencies**
72+
73+
It’s recommended to create a **dedicated Python virtual environment** for the base dependencies.
74+
75+
```bash
76+
python -m venv smartclassroom
77+
# On Windows:
78+
smartclassroom\Scripts\activate
79+
80+
python.exe -m pip install --upgrade pip
81+
pip install --pre --upgrade ipex-llm[xpu_2.6] --extra-index-url https://download.pytorch.org/whl/xpu
5982
pip install --upgrade -r requirements.txt
6083
```
84+
---
6185

62-
**c. [Optional] Install IPEX-LLM to use IPEX-based LLM model for summarization:**
86+
87+
**d. [Optional] Create Python Venv for Ipex Based Summarizer**
88+
If you plan to use IPEX, create a separate virtual environment.
6389

6490
```bash
91+
python -m venv smartclassroom_ipex
92+
# On Windows:
93+
smartclassroom_ipex\Scripts\activate
94+
95+
python.exe -m pip install --upgrade pip
96+
pip install --upgrade -r requirements.txt
6597
pip install --pre --upgrade ipex-llm[xpu_2.6] --extra-index-url https://download.pytorch.org/whl/xpu
6698
```
99+
> 💡 *Use `smartclassroom` if you don’t need IPEX. Use `smartclassroom_ipex` if you want IPEX summarization.*
100+
67101
---
68102
### ⚙️ 2. Default Configuration
69103

@@ -92,7 +126,7 @@ asr:
92126
name: paraformer-zh
93127
```
94128

95-
* (Optional) If you want to use IPEX-based summarization, make sure IPEX-LLM is installed and set:
129+
* (Optional) If you want to use IPEX-based summarization, make sure IPEX-LLM is installed, env for ipex is activated and set following in `config`:
96130

97131
```bash
98132
summarizer:
@@ -104,14 +138,17 @@ summarizer:
104138
---
105139

106140
### ✅ 3. **Run the Application**
141+
Activate the environment before running the application:
107142

108-
Bring Up Backend:
143+
```bash
144+
smartclassroom\Scripts\activate # or smartclassroom_ipex
145+
```
146+
Run the backend:
109147
```bash
110148
python main.py
111149
```
112-
**To monitor power usage, run your shell with admin privileges before starting the application.**
113150

114-
Bring Up Frontend:
151+
- Bring Up Frontend:
115152
```bash
116153
cd ui
117154
npm install

education-ai-suite/smart-classroom/components/asr/funasr/paraformer.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
from components.asr.base_asr import BaseASR
2+
from utils import ensure_model
3+
from utils.model_download_helper import get_or_download_model_dir
24
from funasr import AutoModel
35

6+
import os
47
import logging
58
logger = logging.getLogger(__name__)
69

@@ -10,17 +13,31 @@
1013
"paraformer-online": "iic/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online",
1114
}
1215

16+
# use same vad and punc model for different ASR models
17+
VAD_MODEL = "iic/speech_fsmn_vad_zh-cn-16k-common-pytorch"
18+
PUNC_MODEL = "iic/punc_ct-transformer_zh-cn-common-vocab272727-pytorch"
19+
1320
class Paraformer(BaseASR):
1421
def __init__(self, model_name, device="cpu", revision="v2.0.4"):
1522
if model_name not in FUNASR_MODEL_MAP:
1623
raise ValueError(f"Invalid ASR model name {model_name}. Supported models are: {list(FUNASR_MODEL_MAP.keys())}")
1724

1825
model_name = FUNASR_MODEL_MAP[model_name]
19-
# use same vad and punc model for different ASR models
26+
model_dir = ensure_model.get_asr_model_path()
27+
model_dir = get_or_download_model_dir(model=model_name, revision=revision, local_dir=model_dir)
28+
29+
model_dir_parent = os.path.dirname(model_dir)
30+
# download vad model if not exist
31+
vad_model_dir = os.path.join(model_dir_parent, VAD_MODEL)
32+
vad_model_dir = get_or_download_model_dir(model=VAD_MODEL, revision="v2.0.4", local_dir=vad_model_dir)
33+
# download punc model if not exist
34+
punc_model_dir = os.path.join(model_dir_parent, PUNC_MODEL)
35+
punc_model_dir = get_or_download_model_dir(model=PUNC_MODEL, revision="v2.0.4", local_dir=punc_model_dir)
36+
2037
self.model_name = model_name
21-
self.model = AutoModel(model=model_name, model_revision=revision,
22-
vad_model="fsmn-vad", vad_model_revision="v2.0.4",
23-
punc_model="iic/punc_ct-transformer_zh-cn-common-vocab272727-pytorch", punc_model_revision="v2.0.4",
38+
self.model = AutoModel(model=model_dir, model_revision=revision,
39+
vad_model=vad_model_dir, vad_model_revision="v2.0.4",
40+
punc_model=punc_model_dir, punc_model_revision="v2.0.4",
2441
# spk_model="cam++", spk_model_revision="v2.0.2",
2542
device=device, disable_update=True
2643
)

education-ai-suite/smart-classroom/components/llm/ipex/summarizer.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
import threading
55
from utils.locks import audio_pipeline_lock
66
from utils.config_loader import config
7+
from utils import ensure_model
78
import logging
9+
import os
810
logger = logging.getLogger(__name__)
911

1012
from transformers import TextIteratorStreamer
@@ -50,14 +52,21 @@ def __init__(self, model_name, device="xpu", temperature=0.7):
5052
logger.info("Loading model in full precision mode.")
5153
load_in_low_bit = None
5254

55+
model_dir = ensure_model.get_model_path()
56+
local_files_only=False
57+
if os.path.exists(model_dir):
58+
local_files_only=True
59+
5360
self.model = AutoModelForCausalLM.from_pretrained(
5461
model_name,
5562
# load_in_4bit=True,
5663
load_in_low_bit=load_in_low_bit,
5764
optimize_model=True,
5865
trust_remote_code=True,
5966
use_cache=use_cache,
60-
model_hub=model_hub
67+
model_hub=model_hub,
68+
cache_dir=model_dir,
69+
local_files_only=local_files_only
6170
)
6271
self.device = device
6372
self.model = self.model.to(self.device)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.. toctree::
2+
3+
user-guide/index
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Get Started
2+
3+
This guide walks you through installing dependencies, configuring defaults, and running the application.
4+
5+
## Step 1: Install Dependencies
6+
7+
To install dependencies, do the following:
8+
9+
**a. Install [FFmpeg](https://ffmpeg.org/download.html)** (required for audio processing):
10+
11+
- On **Windows**:
12+
Download from [https://ffmpeg.org/download.html](https://ffmpeg.org/download.html), and add the `ffmpeg/bin` folder to your system `PATH`.
13+
14+
**Run your shell with admin privileges before starting the application**
15+
16+
**b. Clone Repository:**
17+
18+
```bash
19+
git clone --no-checkout https://github.com/open-edge-platform/edge-ai-suites.git
20+
cd edge-ai-suites
21+
git sparse-checkout init --cone
22+
git sparse-checkout set education-ai-suite
23+
git checkout
24+
cd education-ai-suite
25+
```
26+
27+
**c. Install Python dependencies**
28+
29+
It’s recommended to create a **dedicated Python virtual environment** for the base dependencies.
30+
31+
```bash
32+
python -m venv smartclassroom
33+
# On Windows:
34+
smartclassroom\Scripts\activate
35+
36+
python.exe -m pip install --upgrade pip
37+
pip install --pre --upgrade ipex-llm[xpu_2.6] --extra-index-url https://download.pytorch.org/whl/xpu
38+
pip install --upgrade -r requirements.txt
39+
```
40+
41+
42+
**d. [Optional] Create Python Venv for Ipex Based Summarizer**
43+
If you plan to use IPEX, create a separate virtual environment.
44+
45+
```bash
46+
python -m venv smartclassroom_ipex
47+
# On Windows:
48+
smartclassroom_ipex\Scripts\activate
49+
50+
python.exe -m pip install --upgrade pip
51+
pip install --upgrade -r requirements.txt
52+
pip install --pre --upgrade ipex-llm[xpu_2.6] --extra-index-url https://download.pytorch.org/whl/xpu
53+
```
54+
> 💡 *Use `smartclassroom` if you don’t need IPEX. Use `smartclassroom_ipex` if you want IPEX summarization.*
55+
56+
## Step 2: Configure Defaults
57+
58+
The default setup uses Whisper for transcription and OpenVINO Qwen models for summarization. You can customize these in the configuration file.
59+
60+
```bash
61+
asr:
62+
provider: openvino # Supported: openvino, openai, funasr
63+
name: whisper-tiny # Options: whisper-tiny, whisper-small, paraformer-zh etc.
64+
device: CPU # Whisper currently supports only CPU
65+
temperature: 0.0
66+
67+
summarizer:
68+
provider: openvino # Options: openvino or ipex
69+
name: Qwen/Qwen2-7B-Instruct # Examples: Qwen/Qwen1.5-7B-Chat, Qwen/Qwen2-7B-Instruct, Qwen/Qwen2.5-7B-Instruct
70+
device: GPU # Options: GPU or CPU
71+
weight_format: int8 # Supported: fp16, fp32, int4, int8
72+
max_new_tokens: 1024 # Maximum tokens to generate in summaries
73+
```
74+
### 💡 Tips:
75+
* For Chinese audio transcription, switch to funASR with Paraformer:
76+
77+
```bash
78+
asr:
79+
provider: funasr
80+
name: paraformer-zh
81+
```
82+
83+
* (Optional) If you are using IPEX-based summarization, make sure IPEX-LLM is installed, env for ipex is activated and set following in `config`:
84+
85+
```bash
86+
summarizer:
87+
provider: ipex
88+
```
89+
90+
**Important: After updating the configuration, reload the application for changes to take effect.**
91+
92+
## Step 3: Run the Application
93+
94+
Activate the environment before running the application:
95+
96+
```bash
97+
smartclassroom\Scripts\activate # or smartclassroom_ipex
98+
```
99+
Run the backend:
100+
```bash
101+
python main.py
102+
```
103+
104+
- Bring Up Frontend:
105+
```bash
106+
cd ui
107+
npm install
108+
npm run dev -- --host 0.0.0.0 --port 5173
109+
```
110+
111+
## Check Logs
112+
113+
Once the backend starts, you can see the following logs:
114+
115+
```bash
116+
pipeline initialized
117+
[INFO] __main__: App started, Starting Server...
118+
INFO: Started server process [21616]
119+
@@ -92,5 +166,6 @@ INFO: Application startup complete.
120+
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
121+
```
122+
123+
This means your pipeline server is up and ready to accept requests.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Smart Classroom
2+
============================================
3+
The Smart Classroom project is a modular, extensible framework designed to process and summarize educational content using advanced AI models. It supports transcription, summarization, and future capabilities like video understanding and real-time analysis.
4+
5+
The main features are as follows:
6+
7+
- **Audio transcription** with ASR models (e.g., Whisper, Paraformer)
8+
- **Summarization** using powerful LLMs (e.g., Qwen, LLaMA)
9+
- **Plug-and-play architecture** for integrating new ASR and LLM models
10+
- **API-first design** ready for frontend integration
11+
- **Extensible roadmap** for real-time streaming, diarization, translation, and video analysis
12+
13+
.. toctree::
14+
:hidden:
15+
16+
system-requirements
17+
get-started
18+
release-notes
19+

0 commit comments

Comments
 (0)