๐ฝ๏ธ ์๋์ด ๋์ ์์ ์ด๋ฏธ์ง ์ธ์ ์๋น์ค (Link you) LinQu
| Type | URL | Status |
|---|---|---|
| Production | nutricare.koreacentral.cloudapp.azure.com | ๐ข Active |
Note: ์๋น์ค ๋ฌธ์ ๋ฐ์ ์ ์ด์๋ฅผ ์์ฑํด์ฃผ์ธ์.
- ๊น๊ธฐ๋ @GideokKim
- ์ดํฌ์ฃผ @YiHeeJu
- ์ค์์ @Yoonsoyoung02
- ๋ฐํ์ด @yoplnaa
- ๊น๋ฏผ์ @BrianK64
Azure Custom Vision๊ณผ Azure Database for MySQL Flexible Server, Gradio๋ฅผ ํ์ฉํ ์๋์ด ๋์ ์์ ์ด๋ฏธ์ง ์ธ์ ์๋น์ค์ ๋๋ค.
- ์ค์๊ฐ ์์ ์ด๋ฏธ์ง ์ธ์ ๋ฐ ๋ถ๋ฅ
- ๊ฐ์ธ๋ณ ์์ ์ญ์ทจ ๊ธฐ๋ก ๊ด๋ฆฌ
- ๋ง์ถคํ ์์ ์ ๋ณด ์ ๊ณต
- ์ผ์ผ/์ฃผ๊ฐ ์์ ์ญ์ทจ ๋ถ์
- ๐ฅ๏ธ Gradio (Python UI Library)
- ๐ Matplotlib (Data Visualization)
- ๐ธ OpenCV (Image Processing)
- ๐ง Azure Custom Vision (ML Model)
- ๐ฎ CNN Architecture
- ๐ฏ ResNet50 (Deep Learning Model)
- ๐จ Stable-diffusion (Image Generation)
- โ๏ธ Azure VM (Cloud Computing)
- ๐๏ธ Azure Database for MySQL Flexible Server
- ๐ GitHub Actions (Continuous Deployment)
- ๐ GitHub Secrets (Secret Management)
- ๐ Python 3.9+
- ๐ Jupyter Notebook
- ๐ Git (Version Control)
- ๐ Gitmoji (Commit Convention)
food_classifier/
โโโ custom_vision/ # Azure Custom Vision
โโโ docs/ # ๋ฌธ์
โโโ experiments/ # ์คํ ๊ฒฐ๊ณผ
โโโ food_classifier/
โ โโโ src/
โ โ โโโ service_ui/ # Gradio UI ์ปดํฌ๋ํธ
โ โ โ โโโ clients/ # ์ธ๋ถ ์๋น์ค ํต์
โ โ โ โ โโโ ml_client.py # Azure Custom Vision ํต์
โ โ โ โ โโโ db_client.py # Azure Database for MySQL DB Flexible Server ํต์
โ โ โ โโโ components/ # UI ์ปดํฌ๋ํธ
โ โ โ โ โโโ interfaces/ # ์ธํฐํ์ด์ค ์ ์
โ โ โ โ โโโ utils/ # UI ์ ํธ๋ฆฌํฐ
โ โ โ โโโ app.py # ๋ฉ์ธ UI ์ ํ๋ฆฌ์ผ์ด์
โโโ requirements.txt # ํ๋ก์ ํธ ์์กด์ฑ
์ด ์น์
์ service_ui ๋ชจ๋์ ํตํด ์ฌ์ฉ์์ ์์คํ
๊ฐ์ ์ํธ์์ฉ์ ๋ ๊ฐ์ง ์ฃผ์ ํ๋ฆ์ผ๋ก ์ค๋ช
ํฉ๋๋ค. ์ฒซ ๋ฒ์งธ ํ๋ฆ์ ๊ณ ๊ฐ ์ ๋ณด์ ์ต๊ทผ ์์ ์ฑ๋ถ ์ญ์ทจ ์ ๋ณด๋ฅผ ์กฐํํ๋ ๊ณผ์ ์ด๋ฉฐ, ๋ ๋ฒ์งธ ํ๋ฆ์ ์ด๋ฏธ์ง๋ฅผ ์ฒ๋ฆฌํ์ฌ ์์ ์ ๋ณด๋ฅผ ์ ๊ณตํ๋ ๊ณผ์ ์
๋๋ค.
์ด ๋ค์ด์ด๊ทธ๋จ์ ์ฌ์ฉ์๊ฐ Gradio UI๋ฅผ ํตํด ๊ณ ๊ฐ ์ฝ๋์ ๋ณดํธ์ ์ฝ๋๋ฅผ ์ ๋ ฅํ์ฌ ๋ฐ์ดํฐ๋ฒ ์ด์ค์์ ๊ณ ๊ฐ ์ ๋ณด์ ์ต๊ทผ 5์ผ์น ์์ ์ฑ๋ถ ์ญ์ทจ ์ ๋ณด๋ฅผ ์กฐํํ๋ ๊ณผ์ ์ ์ค๋ช ํฉ๋๋ค. ์กฐํ๋ ์ ๋ณด๋ ์ฌ์ฉ์์๊ฒ ํ์๋ฉ๋๋ค.
%%{
init: {
'theme': 'base',
'themeVariables': {
'primaryColor': '#1E90FF',
'primaryTextColor': '#FFFFFF',
'primaryBorderColor': '#4682B4',
'lineColor': '#32CD32',
'secondaryColor': '#FFD700',
'tertiaryColor': '#F0F8FF'
}
}
}%%
sequenceDiagram
title Customer Information and Nutrition Retrieval
actor User
participant UI as ๐ฑ Gradio UI
participant VM as โ๏ธ Azure VM
participant DB as ๐๏ธ Azure MySQL
User->>UI: Access Interface
UI->>User: Request Codes
Note over User,UI: Customer Code &<br/>Guardian Code
User->>UI: Enter Both Codes
UI->>VM: Send Codes
Note over VM: Combine Codes
VM->>DB: Query Customer Info and Recent Nutrition
Note over DB: Flexible Server
DB->>VM: Return Customer Info and Recent Nutrition
VM->>UI: Display Customer Info and Recent Nutrition
UI->>User: Show Customer Info and Recent Nutrition
์ด ๋ค์ด์ด๊ทธ๋จ์ ์ฌ์ฉ์๊ฐ ์์ ์ด๋ฏธ์ง๋ฅผ ์ ์ถํ๋ฉด ์์ ์ ๋ณด๋ฅผ ๋ถ์ํ๊ณ ํ์ํ๋ ๊ณผ์ ์ ์ค๋ช ํฉ๋๋ค. ์ฌ์ฉ์๋ ์นด๋ฉ๋ผ๋ก ์ดฌ์ํ๊ฑฐ๋ ๊ฐค๋ฌ๋ฆฌ์์ ์ด๋ฏธ์ง๋ฅผ ์ ํํ ์ ์์ผ๋ฉฐ, Custom Vision์ด ์์์ ์๋ณํฉ๋๋ค. ๋ถ์๋ ๊ฒฐ๊ณผ๋ ์ผ์ผ ๊ถ์ฅ ์์์ ๋๋น ์ญ์ทจ๋์ ๋ง๋ ๊ทธ๋ํ๋ก ์๊ฐํํ๊ณ , ์ค๋ ์ญ์ทจํ ์์ ๊ธฐ๋ก์ ํจ๊ป ํ์ํฉ๋๋ค.
%%{
init: {
'theme': 'base',
'themeVariables': {
'primaryColor': '#1E90FF',
'primaryTextColor': '#FFFFFF',
'primaryBorderColor': '#4682B4',
'lineColor': '#32CD32',
'secondaryColor': '#FFD700',
'tertiaryColor': '#F0F8FF'
}
}
}%%
sequenceDiagram
title Image Processing and Nutrition Information
actor User
participant UI as ๐ฑ Gradio UI
participant VM as โ๏ธ Azure VM
participant ML as ๐ง Custom Vision
participant DB as ๐๏ธ Azure MySQL
UI->>User: Show Image Input Options
Note over User,UI: Camera or<br/>Gallery Upload
alt Camera
User->>UI: Capture Photo
else Gallery
User->>UI: Upload Image
end
UI->>VM: Send Image
VM->>ML: Request Prediction
Note over ML: Process image<br/>Classify food
ML->>VM: Return Food Name & Confidence
Note over ML,VM: Food classification<br/>with confidence score
VM->>DB: Record Food Consumption with Timestamp
Note over DB: Log food id and<br/>consumption time
VM->>DB: Query Nutrition Info using Food Name
Note over DB: Flexible Server
DB->>VM: Return Nutrition Data
VM->>UI: Format Result
UI->>User: Show Nutrition Info & Confidence
ํ๋ก์ ํธ ๊ธฐ์ฌ ๋ฐฉ๋ฒ์ CONTRIBUTING.md๋ฅผ ์ฐธ๊ณ ํด์ฃผ์ธ์.
๋ฌธ์ ๊ฐ ์์ผ์๋ค๋ฉด ์ด์๋ฅผ ์์ฑํด์ฃผ์ธ์.