This repository contains deep learning models optimized for inference using OpenVino and served as REST APIs using FastAPI
- Create a virtual environment
python -m venv <VENV_NAME>
- Update pip and Install requirements (install fastapi and uvicorn)
python pip install --upgradepip install requirements.txt
- Locate your .h5 model and run following command that will save your model as saved_model format for tensorflow
python h5_to_saved_model.py
- Convert saved_model to openvino mode.xml using following command
mo --saved_model_dir <SAVED_MODEL_DIRECTORY>- Example:
mo --saved_model_dir local/saved_model/
- Modify the bees_openvino_fastapi.py as per you requirements and run following command
uvicorn bees_openvino_fastapi:app --reload
- Open the link in the browser and start testing your API.
- Work on optimization of open source off-the-shelf object detection models
- Write a detailed tutorial
- Working on PyTorch and other popular frameworks model optimization.
- Trained a Keras like model on Ants vs Bees (dataset available at this link)
- Converted .h5 model to tensorflow saved_model
- Optimzied model using OpenVino model optimizer to get model.xml
- Developed a FastAPI for serving this model