┌────────────────────────────────────────────────┐ ┌────────────────────────────────────────┐
│ │ │ │
│ Heroku │ │ Google Cloud Platform (GCP) │
│ │ │ │
│ │ │ │
│ RESTful │ │ ┌────────────────┐ ┌──────────────┐ │
xxxxx │ ┌──────────────┐ ┌─────────────┐ │ │ │ inerence │ │ training │ │
x x │ │ UI ├───────►│ API │ │ │ │ │ │ │ │
xxxx │ │ │ │ └────┼───────►──┤Model as service│ │ │ │
xxxxxx ─────────┼────►│ │ │ ◄────┼───────┬──┤ │ │ │ │
xx x xx │ │ │◄───────┤ │ │ │ └────────────────┘ └──────────────┘ │
x ◄────────┼─────┤ │ │ │ │ │ │
xxxx │ └──────────────┘ └───────┬─────┘ │ │ ┌─────────────┐ │
xx xx │ │ │ │ │ dataset │ │
│ │ │ │ └─────────────┘ │
│ │ │ │ │
└─────────────────────────────────────┼──────────┘ └────────────────────────────────────────┘
│
┌────────────┬────────────┤
│ │ │
┌───────────┼────────────┼────────────┼──────────┐
│ │ │ │ │
│ MongoDB │ │ │ │
│ │ │ │ │
│ │ │ │ │
│ ┌────────▼──┐ ┌───────▼────┐ ┌─────▼──────┐ │
│ │ │ │ │ │ │ │
│ │ pod 1 │ │ pod 2 │ │ pod 3 │ │
│ │ │ │ │ │ │ │
│ └───────────┘ └────────────┘ └────────────┘ │
│ │
│ │
└────────────────────────────────────────────────┘
- 建立virtual env (Optional)
- python -m venv alert-sender
- activate.bat
-
安裝套件 pip install uvicorn pip install fastapi
-
安裝heroku CLI https://devcenter.heroku.com/articles/heroku-cli
-
model weughts 下載,並放置在model/yolov3-obj_v1.weights https://drive.google.com/file/d/1PtL0wfcyOBZ4CbgxKGoCaA2eVV_kwE6L/view?usp=sharing