for installing necessary libraries you can run the following commands
for database connectivity we need Pymongo
pip install pymongo
for using machine learning algorithms we need TensorFlow backend
pip install tensorflow==1.14
For detention we are using imageai
pip install imageai
For image reading and writing we need cv2
pip install opencv
Please go through this document : HERE