Convert AADB caffe model to TensorFlow. And run it with a Streamlit Demo.
- Environment Configuration
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
mkdir data
- Download
initModel.data
andmean_AADB.txt
and move them todata
folder. - Run Demo
streamlit run demo.py
Although the code can run with TensorFlow >= 2.0.0, the whole structure is actually based on TensorFlow 1.x.
So I need to convert make code 2.0-native.
Use repo caffe-tensorflow to convert original caffe model to TensorFlow code and model.
The repo is really old, it only support python2 and TensorFlow < 1.0.0.
I convert the model successfully with following environment on Ubuntu 18.04
:
python==2.7
tensorflow==0.12.0
numpy==1.16.1
Besides, I build caffe with this guide.