Install
Clone repo and install requirements.txt in a Python>=3.7.0 environment, including PyTorch>=1.7
git clone https://github.com/luosaidage/yolov5_server.git # clone
pip install fastapi
pip install uvicorn[standard]
pip install python-multipart # install
RunServer
uvicorn main:app --reload --host 0.0.0.0
# visit 127.0.0.1:8000/docs(try it out)
vi ./det_api.py
# find def(run)
# change weight default path in this def.
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple