This repository has been archived on 2020-09-28. You can view files and clone it, but cannot push or open issues or pull requests.
AIParking_Engine_deploy2/README.md

54 lines
1.0 KiB
Markdown

# Init
## For dev
```bash
sudo apt install python2.7 python-pip
git clone http://gitea.beetai.com/sonnhh/engine-plate-v2-dev
cd engine-plate-v2-dev
sudo apt install -y libsm6 libxext6
pip install -r requirements.txt
python server.py
```
## For deployment
```bash
sudo apt install python2.7 python-pip libsm6 libxext6 git libxrender-dev
git clone http://gitea.beetai.com/sonnhh/engine-plate-v2-deploy
cd engine-plate-v2-deploy
pip install -r requirements.txt
python server.py
```
# API
## POST: http://localhost:8080/get-from-plate
Body (json):
```bash
{
"img64": "img-base64-string...",
"mode": "long" or "square"
"display": "full" or "row2"
}
```
Result (json):
```bash
{
"ocr": "51A-23445"
}
```
## POST: http://localhost:8080/get-from-frame
Body (json):
```bash
{
"img64": "img-base64-string...",
"mode": "long" or "square"
"display": "full" or "row2"
}
```
Result (json):
```bash
{
"ocr": "51A-23445",
"plate": "img-base64-string..."
}
```
# Config server
Config address and port in file server.py