PPT ๋ด์ฉ ์ ๋ฆฌ (JetBot AI ํ๋ก์ ํธ)
01 ํ๋ก์ ํธ ๊ฐ์ (Project Overview)
- JetBot ์๊ฐ:
- NVIDIA Jetson Nano ๊ธฐ๋ฐ์ ์ ๋ ดํ๊ณ ๊ต์ก์ ์ธ ์คํ์์ค AI ๋ก๋ด ํ๋ซํผ.
- ํน์ง: ํฉ๋ฆฌ์ ๊ฐ๊ฒฉ ($250 ๋ฏธ๋ง), ๊ต์ก์ ๊ฐ์น (๊ธฐ๋ณธ ๋ก๋ด ๊ณตํ ~ ๊ณ ๊ธ AI), ์ฌ์ด ์ค์ (์น ๋ธ๋ผ์ฐ์ ํ๋ก๊ทธ๋๋ฐ, Docker), ์ฌ๋ฏธ (AI, ์ด๋ฏธ์ง ์ฒ๋ฆฌ, ๋ก๋ด ๊ณตํ ํํ).
- [์ด๋ฏธ์ง: JetBot ์ฌ์ง ๋๋ ๋ก๊ณ ]
- ํ๋ก์ ํธ ๋ชฉํ:
- JetBot ํ๋ซํผ์ ํ์ฉํ์ฌ ๋ค์ํ AI ๊ธฐ๋ฐ ๋ก๋ด ์ ์ด ๋ฐ ์ํธ์์ฉ ์์คํ ๊ฐ๋ฐ ๋ฐ ํ๊ตฌ.
- ๊ธฐ๋ณธ์ ์ธ AI ์ฃผํ๋ถํฐ ์ต์ ์ธ์ด/๋น์ ๋ชจ๋ธ์ ํ์ฉํ ์์จ ์ ์ด๊น์ง ๋จ๊ณ๋ณ ๊ตฌํ.
- ์ํ ํ๋ก์ ํธ ์์ฝ:
- ๊ธฐ๋ณธ AI ์ฃผํ (JetBot AI Following):
- ๋๋ก ๋ฐ๋ผ๊ฐ๊ธฐ (Road Following)
- ์ปต๋ผ๋ฉด ๋ฐ๋ผ๊ฐ๊ธฐ (Object Following - Cup Ramen)
- LLM ๊ธฐ๋ฐ ์ ์ด (JetBot Gemma Control):
- ๋ก์ปฌ LLM (Ollama +
gemma3:4b
)์ ์ด์ฉํ ์ค์๊ฐ ์์ ๋ถ์ ๋ฐ ์ ์ด. - ์์ฑ ํผ๋๋ฐฑ (Edge TTS - ํ๊ตญ์ด) ๊ธฐ๋ฅ ๊ตฌํ.
- ๋ก์ปฌ LLM (Ollama +
- ๋น์ LLM ๊ธฐ๋ฐ ์ ์ด (JetBot IBM Control):
- ๋น์ ํนํ LLM (Ollama + IBM
granite3.2-vision
) ํ์ฉ. - ์๋/์์จ/์ค๋ช /์ปค์คํ ๋ฑ ๋ค์ํ ์ ์ด ๋ชจ๋ ๊ตฌํ.
- Streamlit ๊ธฐ๋ฐ ์น ์ธํฐํ์ด์ค ๋ฐ ์ถ๊ฐ ๊ธฐ๋ฅ (์ผ๊ตด ํน์ง ๋ถ์ ๋ฐ๋ชจ).
- ๋น์ ํนํ LLM (Ollama + IBM
- ๊ธฐ๋ณธ AI ์ฃผํ (JetBot AI Following):
- ์ฃผ์ ์ฌ์ฉ ๊ธฐ์ :
- ํ๋์จ์ด: NVIDIA Jetson Nano, JetBot ํคํธ
- ์ํํธ์จ์ด: Python, FastAPI, Streamlit, WebSockets, HTML/CSS/JS, Docker
- AI/ML:
- ๋ฅ๋ฌ๋ (Road/Object Following ๋ชจ๋ธ - Hugging Face)
- ๋๊ท๋ชจ ์ธ์ด ๋ชจ๋ธ (LLM): Ollama (
gemma3:4b
, IBMgranite3.2-vision
) - ์์ฑ ํฉ์ฑ (TTS): Edge TTS
- ์์ฑ ์ธ์: Web Speech API
02 ํ๋ก์ ํธ ํ ๊ตฌ์ฑ ๋ฐ ์ญํ (Team Composition and Roles)
- ํ ๊ตฌ์ฑ: ๋ณธ ํ๋ก์ ํธ๋ [hwkims]์ ์ํด ๊ธฐํ ๋ฐ ๊ฐ๋ฐ๋์์ต๋๋ค. (Assuming it's an individual project based on the repo owner)
- ์ํ ์ญํ :
- ๊ธฐํ: JetBot ํ์ฉ ์์ด๋์ด ๊ตฌ์ ๋ฐ ๋จ๊ณ๋ณ ํ๋ก์ ํธ ๋ชฉํ ์ค์ .
- ํ๋์จ์ด: JetBot ์กฐ๋ฆฝ ๋ฐ ์ค์ .
- ์ํํธ์จ์ด ๊ฐ๋ฐ:
- JetBot ์ ์ด ๋ก์ง ๊ตฌํ (Python).
- ๋ฐฑ์๋ API ๊ฐ๋ฐ (FastAPI).
- ํ๋ก ํธ์๋ ์ธํฐํ์ด์ค ๊ฐ๋ฐ (HTML/JS/CSS, Streamlit).
- ์ค์๊ฐ ํต์ ๊ตฌํ (WebSockets).
- AI ๋ชจ๋ธ ํ์ฉ:
- ๋ฐ์ดํฐ์ ์์ง/ํ์ฉ (Road/Object Following).
- ์ฌ์ ํ๋ จ๋ ๋ชจ๋ธ ํ์ฉ ๋ฐ ์ฐ๋ (Hugging Face).
- Ollama ๊ธฐ๋ฐ LLM/Vision LLM ์ค์ ๋ฐ API ์ฐ๋.
- TTS/์์ฑ์ธ์ API ์ฐ๋.
- ํ ์คํธ ๋ฐ ๋๋ฒ๊น : ๊ธฐ๋ฅ ํ ์คํธ ๋ฐ ์ค๋ฅ ์์ .
- ๋ฌธ์ํ ๋ฐ ๊ณต์ : GitHub README ์์ฑ, ๊ฒฐ๊ณผ๋ฌผ ๊ณต์ (Hugging Face, YouTube).
03 ํ๋ก์ ํธ ์ํ ์ ์ฐจ ๋ฐ ๋ฐฉ๋ฒ (Project Execution Procedure and Method)
- 1๋จ๊ณ: ํ๊ฒฝ ๊ตฌ์ถ ๋ฐ ๊ธฐ๋ณธ ์ค์
- JetBot ํ๋์จ์ด ์กฐ๋ฆฝ ๋ฐ Jetson Nano OS ์ค์ .
- ๊ธฐ๋ณธ JetBot ์ํํธ์จ์ด ์ค์น (SD ์นด๋ ์ด๋ฏธ์ง ๋๋ Docker ํ์ฉ).
- ๋คํธ์ํฌ ์ค์ (Wi-Fi ์ฐ๊ฒฐ) ๋ฐ PC์์ ํต์ ํ์ธ.
- 2๋จ๊ณ: ๊ธฐ๋ณธ AI ์ฃผํ ๊ธฐ๋ฅ ๊ตฌํ (
jetbot.kr
)- ์ฃผํ ๋ฐ์ดํฐ ์์ง (๋๋ก, ์ปต๋ผ๋ฉด ์ด๋ฏธ์ง).
- AI ๋ชจ๋ธ ํ์ต ๋๋ ์ฌ์ ํ๋ จ๋ ๋ชจ๋ธ ํ์ฉ (Hugging Face).
- Jupyter Notebook ์์ ๋ฅผ ์ฐธ๊ณ ํ์ฌ ๊ธฐ๋ณธ ๋์(ํํผ, ๊ฒฝ๋ก/๊ฐ์ฒด ์ถ์ข ) ๋ก์ง ๊ตฌํ.
- ๊ฒฐ๊ณผ๋ฌผ(๋ชจ๋ธ, ๋ฐ์ดํฐ์ ) ๊ณต์ .
- 3๋จ๊ณ: LLM ๊ธฐ๋ฐ ์ ์ด ์์คํ
๊ฐ๋ฐ (
jetbot_gemma
)- Ollama ์ค์น ๋ฐ
gemma3:4b
๋ชจ๋ธ ๋ค์ด๋ก๋. - FastAPI ๋ฐฑ์๋ ์๋ฒ ๊ตฌ์ถ:
- JetBot ์นด๋ฉ๋ผ ์์ ์คํธ๋ฆฌ๋ฐ ์์ .
- Ollama API ์ฐ๋ํ์ฌ ์์ ๋ถ์ ์์ฒญ.
- ๋ถ์ ๊ฒฐ๊ณผ ๊ธฐ๋ฐ JetBot ์ ์ด ๋ช ๋ น ์์ฑ (์ ์ง, ํ์ง, ํ์ ๋ฑ).
- WebSocket์ ์ด์ฉํ JetBot ๋ฐ ์น ํด๋ผ์ด์ธํธ์์ ์ค์๊ฐ ํต์ .
- Edge TTS ์ฐ๋ํ์ฌ ๋ถ์ ๊ฒฐ๊ณผ ์์ฑ ์ถ๋ ฅ (ํ๊ตญ์ด).
- ๊ธฐ๋ณธ ์น UI ๊ฐ๋ฐ (HTML/JS/CSS)ํ์ฌ ์ ์ด ๋ฐ ๊ฒฐ๊ณผ ํ์ธ.
- Ollama ์ค์น ๋ฐ
- 4๋จ๊ณ: ๋น์ LLM ๊ธฐ๋ฐ ๊ณ ๊ธ ์ ์ด ์์คํ
๊ฐ๋ฐ (
jetbot_IBM
)- Ollama์ IBM
granite3.2-vision
๋ชจ๋ธ ์ถ๊ฐ. - FastAPI ๋ฐฑ์๋ ํ์ฅ:
- ๋ค์ํ ์ ์ด ๋ชจ๋(์๋, ์์จ, ์ค๋ช , ์ปค์คํ ) ๋ก์ง ๊ตฌํ.
- ๋น์ ๋ชจ๋ธ ํนํ ํ๋กฌํํธ ์ค๊ณ.
- Web Speech API ํ์ฉ ์์ฑ ๋ช ๋ น ์ธ์ ๊ธฐ๋ฅ ์ถ๊ฐ (์ ํ ์ฌํญ).
- Streamlit์ ์ด์ฉํ ์ธํฐ๋ํฐ๋ธ ์น ํ๋ก ํธ์๋ ๊ฐ๋ฐ:
- ์ค์๊ฐ ์์, ์ ์ด ๋ฒํผ, ๋ถ์ ๊ฒฐ๊ณผ ์๊ฐํ.
- (๋ถ๊ฐ ๊ธฐ๋ฅ) ๋ณ๋ Streamlit ์ฑ์ผ๋ก ์ผ๊ตด ํน์ง ๋ถ์ ๋ฐ๋ชจ ๊ตฌํ.
- Ollama์ IBM
- 5๋จ๊ณ: ํ
์คํธ, ๊ฐ์ ๋ฐ ๊ณต์
- ๊ฐ ๊ธฐ๋ฅ๋ณ ๋จ์ ํ ์คํธ ๋ฐ ํตํฉ ํ ์คํธ ์ํ.
- ์ฑ๋ฅ ์ธก์ (์๋ต ์๋ ๋ฑ) ๋ฐ ๊ฐ์ ์ ๋์ถ.
- GitHub ํตํด ์์ค ์ฝ๋ ๋ฐ README ๋ฌธ์ ์ ๋ฐ์ดํธ ๋ฐ ๊ณต์ .
- ๋ฐ๋ชจ ์์ ์ ์ ๋ฐ ๊ณต์ (YouTube Shorts).
04 ํ๋ก์ ํธ ์ํ ๊ฒฐ๊ณผ (Project Execution Results)
- ๊ฒฐ๊ณผ๋ฌผ 1: ๊ธฐ๋ณธ AI ์ฃผํ ๊ธฐ๋ฅ (
jetbot.kr
)- JetBot ๋๋ก ๋ฐ๋ผ๊ฐ๊ธฐ ๊ธฐ๋ฅ ๊ตฌํ ๋ฐ ๋ฐ๋ชจ ์์ ๊ณต๊ฐ.
- [์์: JetBot AI Road Following (YouTube Short ๋งํฌ)]
- JetBot ์ปต๋ผ๋ฉด ๋ฐ๋ผ๊ฐ๊ธฐ ๊ธฐ๋ฅ ๊ตฌํ ๋ฐ ๋ฐ๋ชจ ์์ ๊ณต๊ฐ.
- [์์: JetBot Cup Ramen Following (YouTube Short ๋งํฌ)]
- ๊ด๋ จ ๋ฐ์ดํฐ์
๋ฐ ํ์ต ๋ชจ๋ธ Hugging Face ํตํด ๊ณต๊ฐ.
- [๋งํฌ/์คํฌ๋ฆฐ์ท: Hugging Face ๋ฐ์ดํฐ์ ๋ฐ ๋ชจ๋ธ ํ์ด์ง]
- JetBot ๋๋ก ๋ฐ๋ผ๊ฐ๊ธฐ ๊ธฐ๋ฅ ๊ตฌํ ๋ฐ ๋ฐ๋ชจ ์์ ๊ณต๊ฐ.
- ๊ฒฐ๊ณผ๋ฌผ 2: LLM ๊ธฐ๋ฐ ์ ์ด ์์คํ
(
jetbot_gemma
)gemma3:4b
๋ชจ๋ธ์ ํ์ฉ, ์ค์๊ฐ ์์ ๋ถ์ ๊ธฐ๋ฐ JetBot ์ ์ด ์์คํ ํ๋กํ ํ์ ์์ฑ.- ์น ์ธํฐํ์ด์ค๋ฅผ ํตํ ์๊ฒฉ ์ ์ด ๋ฐ ์ค์๊ฐ ์์/๋ถ์ ๊ฒฐ๊ณผ ํ์ธ ๊ฐ๋ฅ.
- ์ํฉ ๋ถ์ ๊ฒฐ๊ณผ๋ฅผ ํ๊ตญ์ด ์์ฑ(Edge TTS)์ผ๋ก ์ถ๋ ฅํ๋ ๊ธฐ๋ฅ ๊ตฌํ.
- [์คํฌ๋ฆฐ์ท: jetbot_gemma ์น ์ธํฐํ์ด์ค]
- ๊ฒฐ๊ณผ๋ฌผ 3: ๋น์ LLM ๊ธฐ๋ฐ ๊ณ ๊ธ ์ ์ด ์์คํ
(
jetbot_IBM
)- IBM
granite3.2-vision
๋ชจ๋ธ ํ์ฉ, ํฅ์๋ ๋น์ ๊ธฐ๋ฐ ์ ์ด ์์คํ ๊ตฌ์ถ. - ์๋ ์ ์ด, ์์จ ์ฃผํ, ์ฅ๋ฉด ์ค๋ช , ์ฌ์ฉ์ ์ ์ ๋ช ๋ น ๋ฑ ๋ค์ค ๋ชจ๋ ์ง์.
- Streamlit ๊ธฐ๋ฐ์ ์๊ฐ์ ์ด๊ณ ์ธํฐ๋ํฐ๋ธํ ์ ์ด ์ธํฐํ์ด์ค ์ ๊ณต.
- [์คํฌ๋ฆฐ์ท: jetbot_IBM Streamlit ์ธํฐํ์ด์ค]
- (๋ถ๊ฐ ๊ฒฐ๊ณผ) ์ผ๊ตด ํน์ง ๋ถ์ Streamlit ๋ฐ๋ชจ ์ฑ ๊ฐ๋ฐ.
- IBM
- ๊ณตํต ๊ฒฐ๊ณผ:
- ๋ชจ๋ ํ๋ก์ ํธ ์์ค ์ฝ๋ ๋ฐ ์ค์ ๋ฐฉ๋ฒ GitHub ํตํด ๊ณต๊ฐ.
- JetBot์ ํ์ฉํ ๋ค์ํ ์ต์ AI ๊ธฐ์ ์ ์ฉ ์ฌ๋ก ์ ์.
05 ์์ฒด ํ๊ฐ ์๊ฒฌ (Self-Assessment Opinion)
- ์๋ ์ (Strengths):
- ์ ๋ ดํ JetBot ํ๋ซํผ์ ํ์ฉํ์ฌ ์ต์ AI ๊ธฐ์ (LLM, Vision LLM, TTS) ์ ๋ชฉ ์ฑ๊ณต.
- ๋จ๊ณ๋ณ ํ๋ก์ ํธ ์งํ์ ํตํด AI ๋ก๋ด ์ ์ด ๊ธฐ์ ์ฌ์ธต ํ์ต ๋ฐ ๊ตฌํ ๊ฒฝํ ํ๋ณด.
- FastAPI, WebSockets, Streamlit ๋ฑ ์ต์ ์น ๊ธฐ์ ์ ํ์ฉํ์ฌ ์ฌ์ฉ์ ์นํ์ ์ธ ์ธํฐํ์ด์ค ๋ฐ ์ค์๊ฐ ์ ์ด ์์คํ ๊ตฌ์ถ.
- ์คํ์์ค(Ollama, JetBot)๋ฅผ ์ ๊ทน ํ์ฉํ์ฌ ๊ฐ๋ฐ ํจ์จ์ฑ ์ฆ๋.
- ๊ฒฐ๊ณผ๋ฌผ(์ฝ๋, ๋ชจ๋ธ, ์์)์ ์ฒด๊ณ์ ์ผ๋ก ์ ๋ฆฌํ๊ณ ๊ณต๊ฐํ์ฌ ๊ณต์ ๋ฐ ์ฌํ ๊ฐ๋ฅ์ฑ ๋์.
- ์ด๋ ค์ ๋ ์ ๋ฐ ๊ฐ์ ํ ์ (Weaknesses & Improvements):
- ์ฑ๋ฅ ํ๊ณ: Jetson Nano์ ์ฐ์ฐ ๋ฅ๋ ฅ ๋ฐ ๋คํธ์ํฌ ํ๊ฒฝ์ ๋ฐ๋ฅธ ์ค์๊ฐ ์ฒ๋ฆฌ ์ง์ฐ(latency) ๋ฐ์ ๊ฐ๋ฅ์ฑ.
- LLM ์์กด์ฑ ๋ฐ ์ ๋ขฐ๋: LLM์ ๋ถ์ ๊ฒฐ๊ณผ๊ฐ ํญ์ ์ ํํ๊ฑฐ๋ ์ผ๊ด๋์ง ์์ ์ ์์ผ๋ฉฐ, ์ด๋ ๋ก๋ด ์ ์ด์ ์์ ์ฑ์ ์ํฅ. (์: ๋ถ์ ํํ ์ฅ์ ๋ฌผ ์ธ์, ์์์น ๋ชปํ ๋ช ๋ น ์์ฑ)
- ์ฅ์ ๋ฌผ ํํผ ๋ก์ง: ํ์ฌ ๊ตฌํ๋ ํํผ ๋ก์ง์ด ๋จ์ํ์ฌ(์: 'obstacle' ๋จ์ด ๊ฐ์ง ์ ๋ฌด์กฐ๊ฑด ์ขํ์ ), LLM ์ถ๋ ฅ์ ๋ ์ ๊ตํ๊ฒ ๋ถ์ํ์ฌ ์ํฉ์ ๋ง๋ ํํผ ๊ธฐ๋(์ข/์ฐ/ํ์ง ๋ฑ)์ด ํ์ํจ (
jetbot_gemma
๊ฐ์ ์ ). - ํ๋กฌํํธ ์์ง๋์ด๋ง: ์ํ๋ ๋ก๋ด ํ๋์ ์ ๋ํ๊ธฐ ์ํ ํจ๊ณผ์ ์ธ ํ๋กฌํํธ ์ค๊ณ์ ์ด๋ ค์.
- UI/UX: ์ฌ์ฉ์ ๊ฒฝํ์ ๋์ฑ ํฅ์์ํค๊ธฐ ์ํ ์ธํฐํ์ด์ค ๊ฐ์ ํ์.
- ์๋ฌ ํธ๋ค๋ง: ์๊ธฐ์น ์์ ์ํฉ(ํต์ ์ค๋ฅ, ๋ชจ๋ธ ์๋ต ์คํจ ๋ฑ)์ ๋ํ ์์ ์ฑ ๊ฐํ ํ์.
- ๋ฐฐ์ด ์ (Lessons Learned):
- ์ฃ์ง ๋๋ฐ์ด์ค(Jetson Nano) ํ๊ฒฝ์์ AI ๋ชจ๋ธ ๋ฐฐํฌ ๋ฐ ์ต์ ํ์ ์ค์์ฑ ์ฒด๊ฐ.
- ํ๋์จ์ด(๋ก๋ด)-์ํํธ์จ์ด(์ ์ด ๋ก์ง)-AI(๋ถ์/ํ๋จ) ๊ฐ์ ์ ๊ธฐ์ ์ธ ์์คํ ํตํฉ ๋ฅ๋ ฅ ํฅ์.
- LLM/Vision LLM์ ๋ก๋ณดํฑ์ค ๋ถ์ผ ์ ์ฉ ๊ฐ๋ฅ์ฑ ๋ฐ ํ์ฌ ๊ธฐ์ ์ ํ๊ณ์ ๋ช ํํ ์ธ์ง.
- ์คํ์์ค ์ปค๋ฎค๋ํฐ ๋ฐ ๋ฌธ์ ํ์ฉ ๋ฅ๋ ฅ ์ฆ๋.
- ํฅํ ๊ณํ (Future Work):
- ์ ๊ตํ ์ฅ์ ๋ฌผ ํํผ ๋ฐ ๊ฒฝ๋ก ๊ณํ ์๊ณ ๋ฆฌ์ฆ ๋์ .
- ํน์ ๊ฐ์ฒด ์ธ์ ๋ฐ ์ถ์ ๊ธฐ๋ฅ ๊ณ ๋ํ.
- ๋ ๋ค์ํ ๋ก๋ด ๋ช ๋ น์ด ๋ฐ ์ํธ์์ฉ ์๋๋ฆฌ์ค ์ถ๊ฐ (์: ์์ฑ ๋ํ ๊ธฐ๋ฐ ์ ์ด).
- ์ฑ๋ฅ ์ต์ ํ (๋ชจ๋ธ ๊ฒฝ๋ํ, ์ฝ๋ ์ต์ ํ ๋ฑ).
- ๋ค์ํ AI ๋ชจ๋ธ ํ ์คํธ ๋ฐ ๋น๊ต ํ๊ฐ.
jetbot_IBM granite3.2-vision control
https://ollama.com/library/granite3.2-vision
https://jetbot.org/master/index.html
This project provides a comprehensive system for controlling a JetBot robot using both direct commands and autonomous, vision-based navigation powered by Ollama. It leverages FastAPI for the backend API, WebSockets for real-time communication, and edge-tts for text-to-speech feedback. The system supports a Streamlit-based web interface for manual control and visualization of the autonomous process.
- Direct Control: Issue basic movement commands (forward, backward, left, right, stop, dance) to the JetBot via a web interface.
- Vision-Based Autonomous Navigation: Utilize the Ollama large language model (specifically
granite3.2-vision
) for image analysis and autonomous decision-making. The JetBot can navigate, avoid obstacles, and describe its environment. - Real-time Image Streaming: View a live video stream from the JetBot's camera in the web interface.
- Text-to-Speech (TTS) Feedback: Receive spoken feedback from the JetBot, describing its actions and observations, using
edge-tts
. - Custom Commands: Define custom actions based on the vision model's analysis of the scene.
- Multiple Control Modes: Switch between manual control, descriptive mode (where the JetBot describes what it sees), custom command mode, and full autonomous mode.
- Physiognomy Analysis: Includes a Streamlit application demonstrating how to analyze a person's face and classify different characteristics.
- FastAPI Backend: A robust and efficient backend API built with FastAPI.
- WebSocket Communication: Real-time communication between the web interface, the backend server, and the JetBot.
- Streamlit Frontend: An interactive web interface built with Streamlit.
The project consists of the following main components:
app.py
(FastAPI Backend): This is the core of the system. It handles:- WebSocket connections to both the JetBot and the web client.
- Communication with the Ollama API for vision processing.
- Text-to-speech generation using
edge-tts
. - Processing commands from the client and sending them to the JetBot.
- Serving the static files for the web interface.
static/
(Web Interface): Contains the HTML, CSS, and JavaScript files for the basic web interface that interacts with the FastAPI backend.physiognomy_app.py
(Streamlit App): A separate Streamlit application demonstrating the use of Ollama for facial analysis.requirements.txt
: Contains the python dependencies.
- JetBot: A fully assembled and configured JetBot robot. You must have the JetBot's WebSocket server running on the JetBot itself (see JetBot documentation for details). The default WebSocket URL is
ws://192.168.137.181:8766
. You may need to adjust this based on your JetBot's IP address. - Ollama: Ollama must be installed and running. Download and install Ollama from https://ollama.ai/. You'll need to pull the
granite3.2-vision
model:ollama pull granite3.2-vision
- Python 3.7+: This project requires Python 3.7 or higher.
- Dependencies: Install the required Python packages:
pip install -r requirements.txt
- Edge-TTS:
edge-tts
is used for voice generation. It is included in the requirements.txt.
-
Clone the Repository:
git clone https://github.com/hwkims/jetbot_IBM.git cd jetbot_IBM
-
Configure (if necessary):
app.py
: If your Ollama server or JetBot WebSocket URL are different from the defaults, modify theOLLAMA_HOST
andJETBOT_WEBSOCKET_URL
variables inapp.py
.physiognomy_app.py
: If your Ollama server is different from the defaults, modify theOLLAMA_HOST
inphysiognomy_app.py
.
-
Start the FastAPI Server:
uvicorn app:app --host 0.0.0.0 --port 8000
This will start the backend server, making the web interface available at
http://localhost:8000
. The--host 0.0.0.0
makes the server accessible from other devices on your network. -
Start the Streamlit App (Optional - for physiognomy analysis): In a separate terminal, navigate to the project directory and run:
streamlit run physiognomy_app.py ``` This will start the Streamlit application, typically at `http://localhost:8501`.
-
Connect your Jetbot Ensure your Jetbot is powered on, and the Jetbot websocket server is running.
-
Access the Web Interface: Open a web browser and go to
http://localhost:8000
(or the appropriate address if you changed the host/port).
The main interface provides buttons for direct control (Forward, Backward, Left, Right, Stop, Dance) and input fields for more complex interactions:
- Direct Control Buttons: These send immediate commands to the JetBot.
- Iterations: Specifies how many times a command should be repeated.
- Text Input: Used for custom prompts and text input for Ollama.
- Describe: Sends the current camera image to Ollama and displays/speaks a description of the scene.
- Custom: Sends the current camera image and the text prompt to Ollama, then executes the returned commands.
- Autonomous: Enters autonomous mode, where the JetBot repeatedly analyzes the scene and navigates based on Ollama's output.
The Streamlit app allows you to either upload an image or use your webcam to capture an image of a face. It then sends the image to Ollama with a prompt to analyze 32 facial features and provide a physiognomy reading in JSON format. The results are displayed, including a radar chart of the facial features.
- JetBot Not Connecting:
- Ensure the JetBot is powered on and connected to the same network as your computer.
- Verify that the JetBot's WebSocket server is running.
- Double-check the
JETBOT_WEBSOCKET_URL
inapp.py
.
- Ollama Not Responding:
- Make sure Ollama is running.
- Verify that you have pulled the
granite3.2-vision
model (ollama pull granite3.2-vision
). - Check the
OLLAMA_HOST
variable inapp.py
andphysiognomy_app.py
.
- Web Interface Not Working:
- Ensure the FastAPI server is running (
uvicorn app:app ...
). - Check your browser's developer console for any JavaScript errors.
- Ensure the FastAPI server is running (
- TTS Not Working
- Ensure you have a working internet connection for
edge-tts
to download the required voice data the first time it runs.
- Ensure you have a working internet connection for
- Streamlit Webcam Issues:
- Modern browsers often require secure contexts (HTTPS) for webcam access. If you are experiencing trouble with the webcam in the Streamlit app, you might need to set up HTTPS or use a workaround like
streamlit run physiognomy_app.py --server.enableCORS=false --server.enableXsrfProtection=false
. Note: Disabling CORS and XSRF protection is generally not recommended for production environments, but may be acceptable for local development and testing. A better solution for production would be to set up a proper HTTPS server.
- Modern browsers often require secure contexts (HTTPS) for webcam access. If you are experiencing trouble with the webcam in the Streamlit app, you might need to set up HTTPS or use a workaround like
Contributions are welcome! Please feel free to submit pull requests or open issues on the GitHub repository.
This project is licensed under the MIT License - see the LICENSE file for details.
JetBot in action - Replace this with an actual image URL or path.
JetBot Control์ NVIDIA Jetson Nano ๊ธฐ๋ฐ์ ๊ต์ก์ฉ AI ๋ก๋ด JetBot์ ์ํ ์ ์ด ์์คํ
์
๋๋ค. IBM์ granite3.2-vision
๋ชจ๋ธ์ ํ์ฉํ์ฌ ์ด๋ฏธ์ง ๋ถ์ ๋ฐ ์์จ ์ฃผํ์ ์ง์ํ๋ฉฐ, ์๋ ๋ฒํผ ์กฐ์๊ณผ ์ฌ์ฉ์ ์ ์ ๋ช
๋ น๋ ๊ฐ๋ฅํฉ๋๋ค. ์ด ํ๋ก์ ํธ๋ ๋ก๋ด ๊ณตํ, AI, ๋น์ ์ฒ๋ฆฌ์ ๊ด์ฌ ์๋ ํ์๊ณผ ๊ฐ๋ฐ์๋ค์๊ฒ ์ค์ต ๊ฒฝํ์ ์ ๊ณตํฉ๋๋ค.
- ์๋ ์ ์ด: ๋ฒํผ์ผ๋ก "Forward", "Backward", "Left", "Right", "Stop", "Dance" ๋์์ ์ง์ ์คํ.
- ๋น์ ๊ธฐ๋ฐ ์์จ ์ฃผํ:
granite3.2-vision
์ ์ฌ์ฉํด ์ค์๊ฐ ์ด๋ฏธ์ง ๋ถ์ ํ ์์จ ์ฃผํ. - ์ค๋ช ๊ธฐ๋ฅ: ์นด๋ฉ๋ผ ํผ๋๋ฅผ ๋ถ์ํด ์ฅ๋ฉด ์ค๋ช ์ ๊ณต (์: "์ค๋ฅธ์ชฝ์ ํ ์ด๋ธ, ์์ ์ด๋ฆฐ ๊ฒฝ๋ก").
- ์ฌ์ฉ์ ์ ์ ๋ช ๋ น: ํ ์คํธ ์ ๋ ฅ ๋๋ ์์ฑ์ผ๋ก ์์ ๋ก์ด ๋ช ๋ น ์คํ (์: "spin around").
- ์์ฑ ์ธ์: ํ๊ตญ์ด(
ko-KR
) ์ง์์ผ๋ก "์๋ " ๊ฐ์ ๋ช ๋ น ์ฒ๋ฆฌ. - ๋ฐ๋ณต ์คํ: ๋ชจ๋ ๋ช ๋ น์ ๋ํด ๋ฐ๋ณต ํ์ ์ค์ ๊ฐ๋ฅ.
- ํ๋์จ์ด: NVIDIA Jetson Nano, JetBot ํ๋ซํผ
- ๋ฐฑ์๋: FastAPI (Python), WebSocket ํต์
- ๋น์ ๋ชจ๋ธ: IBM
granite3.2-vision
(Ollama ํธ์คํ ) - ํ๋ก ํธ์๋: HTML/CSS/JavaScript (ํ๋์ UI)
- ์์ฑ ์ฒ๋ฆฌ: Web Speech API, Edge TTS (Jenny Neural ์์ฑ)
- ๋ก๋ด ์ ์ด: JetBot Python ๋ผ์ด๋ธ๋ฌ๋ฆฌ
- NVIDIA Jetson Nano ๋ฐ JetBot ํ๋์จ์ด
- Python 3.6+ (JetBot์ฉ), Python 3.8+ (FastAPI์ฉ)
- Ollama 0.5.13+ (
granite3.2-vision
์ค์น) ding.mp3
ํ์ผ (static/
๋๋ ํ ๋ฆฌ์ ์ถ๊ฐ)
- JetBot์ ์ ์:
ssh jetbot@192.168.137.181
- ์ ์ฅ์ ํด๋ก :
git clone https://github.com/hwkims/jetbot_IBM.git cd jetbot_IBM
- ์ข
์์ฑ ์ค์น:
pip install jetbot
- JetBot ์คํ:
python3.6 jetbot.py
- ๋ก์ปฌ ๋จธ์ ์์ ์ ์ฅ์ ํด๋ก :
git clone https://github.com/hwkims/jetbot_IBM.git cd jetbot_IBM
- ๊ฐ์ ํ๊ฒฝ ์์ฑ ๋ฐ ํ์ฑํ:
python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows
- ์ข
์์ฑ ์ค์น:
pip install fastapi uvicorn httpx edge-tts websockets
- Ollama ์คํ ๋ฐ ๋ชจ๋ธ ์ค์น:
ollama serve ollama run granite3.2-vision
- ์๋ฒ ์คํ:
uvicorn main:app --host 0.0.0.0 --port 8000
- ๋ธ๋ผ์ฐ์ ์์
http://localhost:8000
์ด๊ธฐ.
-
์๋ ์ ์ด:
- ๋ฒํผ ํด๋ฆญ: "Forward", "Backward", "Left", "Right", "Stop", "Dance".
- "Iterations" ์ ๋ ฅ์ผ๋ก ๋ฐ๋ณต ํ์ ์ค์ .
-
๋น์ ์ค๋ช :
- "Describe" ๋ฒํผ ํด๋ฆญ โ ํ์ฌ ์ฅ๋ฉด ์ค๋ช ์ถ๋ ฅ ๋ฐ TTS ์ฌ์.
-
์ฌ์ฉ์ ์ ์ ๋ช ๋ น:
- ํ ์คํธ ์ ๋ ฅ: "spin around" ์ ๋ ฅ ํ "Execute" ํด๋ฆญ.
- ์์ฑ: "Voice" ๋ฒํผ ํด๋ฆญ ํ "์๋ " ๋๋ "go forward" ๋งํ๊ธฐ.
-
์์จ ์ฃผํ:
- "Iterations" ์ค์ ํ "Autonomous" ํด๋ฆญ โ ๋น์ ๊ธฐ๋ฐ ์ฃผํ ์์.
- ์๋: "Forward" ๋ฒํผ โ 1์ด๊ฐ ์ ์ง.
- ์ค๋ช : "Describe" โ "์ค๋ฅธ์ชฝ์ ์์, ์์ ์ด๋ฆฐ ๊ณต๊ฐ์ ๋๋ค."
- ์ปค์คํ : "spin around" โ ์ค๋ฅธ์ชฝ์ผ๋ก 2์ด ํ์ .
- ์์จ: Iterations 3 โ ์ด๋ฏธ์ง ๋ถ์ ํ 3๋ฒ ์ฃผํ (์: "forward", "left", "stop").
- ์ด์ ์ ์ถ: ๋ฒ๊ทธ๋ ์ ์์ Issues์์.
- ํ ๋ฆฌํ์คํธ: ํฌํฌ ํ ๋ธ๋์น ์์ฑ, ๋ณ๊ฒฝ ํ PR ์ ์ถ.
์ด ํ๋ก์ ํธ๋ MIT License ํ์ ๋ฐฐํฌ๋ฉ๋๋ค.
- GitHub: hwkims
- Email: hwkims@example.com (์ค์ ์ด๋ฉ์ผ๋ก ๊ต์ฒด ํ์)
์ด ๋ฆฌ๋๋ฏธ๋ GitHub Markdown ํ์์ผ๋ก ์์ฑ๋์์ผ๋ฉฐ, hwkims/jetbot_IBM
์ ์ฅ์์ README.md
ํ์ผ๋ก ๋ฐ๋ก ์ฌ์ฉํ ์ ์์ต๋๋ค. ์ด๋ฏธ์ง URL(https://via.placeholder.com/...
)์ ์์๋ก ๋ฃ์ ๊ฒ์ด๋, ์ค์ JetBot ์ฌ์ง์ผ๋ก ๊ต์ฒดํ์ธ์. ์ถ๊ฐ ์์ ์ด๋ ์์ฒญ ์์ผ๋ฉด ๋ง์ํด์ฃผ์ธ์!